wood burning stoves 2.0*
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Query regarding Dynamic JAX-WS Client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Query regarding Dynamic JAX-WS Client" Watch "Query regarding Dynamic JAX-WS Client" New topic

Query regarding Dynamic JAX-WS Client

Jolly Tiwari
Ranch Hand

Joined: Mar 26, 2006
Posts: 77

This is with refernce to 4.9 JAX-WS Web Service Client from IVan's guide

As per to the notes ,for Dynamic clients we need not generate any artifacts.But in that case how will these references in the below shown part of client code be resolved at the time of client code compilation.This is a part of that dynamic client code page No -172

please clarify...


Lee Assam

Joined: Oct 24, 2008
Posts: 7

What he is trying to say here is that you do not have to generate any web service client artifacts (e.g. using the wsimport tool) when you use a Dynamic Client. In order to perform marshalling of xml which will be used for the payload though, you will still have to use JAXB to create the Java classes (using the XJC plugin for eclipse). That is how you will be able to create and return the JAXBElement.

So in that aspect, you still have to generate those Java artifacts for the JAXB classes from the XSD which was imported in the WSDL. The actual WSDL client though involves no generated artifacts.

Hope this helps.

Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
Thanks for the assistance Lee, I couldn't have said it better myself!
I used JAXB in those examples because it was simple. However, it is important to note that JAXB is not the only alternative! If you want to write a truly dynamic client, without ANY generated artifacts, then you can use SAAJ, for instance, to assemble SOAP messages. There is at least one example in my study notes showing how to assemble SOAP messages using SAAJ.
Best wishes!
Jolly Tiwari
Ranch Hand

Joined: Mar 26, 2006
Posts: 77
Thanks to both of you for your nice explaination


Consider Paul's rocket mass heater.
subject: Query regarding Dynamic JAX-WS Client
Similar Threads
want to send pdf file to client from server. pdf is generated at server
Passing Set<java.lang.Object> and List<java.lang.Object> in Axis 2.0
Calculator example
unable to generate correct xml using jaxb
JAX-WS There's no ObjectFactory / IllegalAnnotationsError JAX-WS