Java Web Services Disclosure Limitations Using javax.xml.ws.Endpoint?

I am trying to expose some Java web services so that I can interact with C # (see this SO question ). The proof of concept code below works great with WCF!

My question is about using the class javax.xml.ws.Endpointto publish my service:

  • What will I lose by going this route instead of a full-blown application server?
  • Is this the right solution for long-term, low-call service?

The following is an example of a WSDL that is purely callable from .Net and works well. Why don't I use it?

@javax.jws.WebService
public class TestSvc { 
    @javax.jws.WebMethod()
    public String sayHello() {
        return "Hello!";
    }
}

import javax.xml.ws.Endpoint;
public class Main  {
    public static void main(String[] args) throws Exception {
        Endpoint.publish("http://localhost:8181/Test", new TestSvc());
    }
}
+3
source share
2

( ..) , .

, . , , , .

, .

.

, Java EE , - . EJB v Spring v... debate. , , , - , , , , , , ; App Server. , , EJB3 + JPA Spring, - App Server. Java , , .

+4

, , .

WSDL java. - , , , , . WCF - WSDL, VS , ( , .)

( , , , , ) . , ..

+2

Source: https://habr.com/ru/post/1722498/


All Articles