Communication between a JAX-WS Web Service and a Client by R4R Team

Communication between a JAX-WS Web Service and a Client:-



The above Diagram shows Communication between a JAX-WS Web Service and a Client .The starting point for developing a JAX-WS web service is a Java class annotated with the javax.jws.WebService annotation. The @WebService annotation defines the class as a web service endpoint.

A service endpoint interface or service endpoint implementation (SEI) is a Java interface or class, respectively, that declares the methods that a client can invoke on the service. An interface is not required when building a JAX-WS endpoint. The web service implementation class implicitly defines an SEI.

You may specify an explicit interface by adding the endpointInterface element to the @WebService annotation in the implementation class. You must then provide an interface that defines the public methods made available in the endpoint implementation class.


These are the basic steps for creating the web service and client:

1 Code the implementation class.

2 Compile the implementation class.

3 Use wsgen to generate the artifacts required to deploy the service.

4 Package the files into a WAR file.

5 Deploy the WAR file. The web service artifacts (which are used to communicate with clients) are generated by the Application Server during deployment.

6 Code the client class.

7 Use wsimport to generate and compile the web service artifacts needed to connect to the service.

8 Compile the client class.

9 Run the client.
  

Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!