• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query regarding Dynamic JAX-WS Client

 
Jolly Tiwari
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks to both of you for your nice explaination


Regards

Jolly
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic