Generating JAX-WS client stubs for JAX-RPC web service?

Arci picture Arci · Sep 11, 2012 · Viewed 20.2k times · Source

Will I be able to connect to a JAX-RPC web service using a JAX-WS (wsimport) generated client stub? What are the effects of consuming a JAX-RPC web service using a JAX-WS client? Are there any advantages and disadvantages?

Answer

Santosh picture Santosh · Sep 11, 2012
  1. The tool wsimport works on a WSDL file which is an XML document describing the web service.
  2. The tool wsimport does not care to the style of the service (RPC/DOCUMENT) as described in the WSDL.
  3. If the WSDL has RPC-style, it will generate the client stubs for consuming RPC-style web services and similarly for document-style.
  4. JAX-WS (which provides wsimport) provides (or rather capable of generating ) both the style (RPC/Document) of web services and both work equally well with respective types of service end points.
  5. Here is an example of using wsimport for generating JAX-RPC client.

Hope this helps.