Also uses Stax,SAAJ 1.3 for message processing.
Both these jars are part of JDK 6.

Web service Endpoint

Lets start with a POJO annotated with @WebService annotation. This annotation
tells JAXWS that its a Web Service endpoint. You may like to annotate the
methods that will be exposed as web services method with @WebMethod annotation.
You dont need to specify it if all the methods will be exposed as web services
method.

in your web browser to see the published WSDL. No need to provide deployment
descriptor, starting a container etc. Its all done for you internally by JAXWS
using light-weight HTTP server available in JDK 6. In short - extremely fast
prototyping!

Web Services Client

Lets see how we develop a client based on proxy.

Run wsimport

This step will generates and compile some classes. Notice -keep switch, you need it to keep the generated Java source files.
By default wsimport only leaves behind the compiled class files. In this example the classes that
matters are

Calculator.java - Service Endpoint Interface or SEI

CalculatorService - Generated Service, instantiate it
to get the proxy

Running latest JAXWS RI on JDK6

The obvious question might be that how would you use latestJAXWS 2.1 RI on top of JDK6. JAXWS
2.1 RI is feature complete and we are busy fixing bug. For list of JAXWS 2.1
features and plan refer to the JAXWS 2.1roadmap.

Comments

Hi Vivek,
This tutorial is really useful for beginners like me.
I have one doubt. How to create web application (.war) and deploy it on the appliaction server.
In above tutorial, we are running the provider class as server only. But if i want to deploy this as a web service provider on a app server, how shall I do that.
Thanks,
Paresh