JAX-WS Tutorial

JAX-WS Tutorial:

As we know there is two types of web services.

  1. SOAP
  2. Restful



Here I am talking about SOAP based web services.

Java provides a set of APIs to develop web services in XML format is called JAX-WS. JAX-WS provides many annotation to simplify the development and deployment for both web service clients and web service providers which we called web service endpoint also.

There is two ways to develop JAX-WS web services.

In JAX-WS, a web service operation based on an XML-based protocol, such as SOAP. The SOAP specification defines the envelope structure, encoding rules, and conventions for representing web service invocations and responses. These calls and responses are transmitted as SOAP messages (XML files) over HTTP.

As we know SOAP messages are complex but JAX-WS APIs hides the complexity from the developer. Developer needs to define operations in java interface and developers need to implement interface methods in other classes.

For developer client program also easy to code. A client creates a proxy (a local object representing the service) and simply invokes methods on the proxy. With JAX-WS, the developer does not generate or parse SOAP messages. It is the JAX-WS runtime system that converts the API calls and responses to and from SOAP messages.

JAX-WS client and web services are platform independent (independent from programming language).

AX-WS is not restrictive: A JAX-WS client can access a web service that is not running on the Java platform, and vice versa. This is because JAX-WS uses technologies defines in W3C – HTTP, WSDL, and SOAP.

WSDL specifies an XML format for describing a service as a set of endpoints operating on messages.

10article.com Tutorials

10article.com Tutorials

Leave a Reply

Your email address will not be published. Required fields are marked *