Meaningless Drivel is fun!*
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


Win a copy of Spring in Action this week in the Spring forum!
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
Author

Query regarding Dynamic JAX-WS Client

Jolly Tiwari
Ranch Hand

Joined: Mar 26, 2006
Posts: 77
Hi!

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...


Regards

Jolly
Lee Assam
Greenhorn

Joined: Oct 24, 2008
Posts: 7
Jolly,

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.


SCJP 5, SCWCD 5, SCDJWS 5
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
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


Regards

Jolly
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Query regarding Dynamic JAX-WS Client