Posts

Showing posts with the label Endpoint

JAX-WS Webservice Endpoint and Client

JAX-WS based Webservice and Client Design Options. JAX-WS stands for Java Api for XML Web services. JAX-WS supports both SOAP 1.1 and SOAP 1.2. The following section tries to snapshot the different ways we can use JAX-WS to write both Web Services and Clients. What is Web service Endpoint? A web service endpoint is an server side resource that can be referenced by client and to which web services messages can be addressed. Generally, web services will have endpoint and a WSDL file to share its descriptions with clients. Clients use the web service endpoint description to generate/write code that can send SOAP messages to and receive SOAP messages from the web service endpoint. In JAX-WS the endpoints are annotated with the javax.jws.WebService annotation or   javax.jws.WebServiceProvider annotation, but not both at a time. Services designe options  . JAX-WS broadly supports two Webservice  models, SEI Interface Annotated with the javax.jws.WebServic...

Publishing Web Service Quickly with Java Technology

javax.xml.ws.EndPoint can be used to publish a webservice without any Application Server or Servlet Container. It uses HTTP Server that comes with Java. The static method  publish takes the String endpoint address and web service implementor class object as parameter. public class EndpointPublish { public static void main(String[] args) { Endpoint.publish("http://localhost:8088/ws/SiddMyTestWS", new SimpleHellowServiceImpl ()); } } For example just running the above stand alone java program, we are able to publish a webservice with the address   http://localhost:8088/ws/SiddMyTestWS . Where  MyWSTest is the implemented Endpoint class. Implemented EndPoint class in JAX-WS should have the following properties The implemented class should be annotated  javax.jws.WebService or javax.jws.WebServiceProvider. The implemented class should not be final or abstract . Exposed web service method should be annotated with javax.jws.WebMethod. Web service meth...