jQuery in Action, 2nd edition*
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Dynamic Client example in Ivan Kriz's tutorial Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Dynamic Client example in Ivan Kriz Watch "Dynamic Client example in Ivan Kriz New topic
Author

Dynamic Client example in Ivan Kriz's tutorial

Kumar Sonu
Ranch Hand

Joined: Apr 05, 2011
Posts: 36
In the section (4.9) JAX-WS Web Service Clients a sentence says:
A JAX-WS web service client can be either a dynamic client, for which no artifacts have been generated

Now if I jump to the example for creating a Dynamic client in the immediate next sub-section I see that the program uses classes such as:
- ObjectFactory
- PrintNumber

There are occurrences of these classes in the method: createOnewayRequestPayload()

As per the definition if the artifacts are not generated then do these classes need to coded by hand?
If yes, then the code for these two classes is missing in the example.

Please clarify.


SCJP,SCWCD, SCDJWS
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
The example may be a little unclear in that the JAXB classes are excluded from the client artifacts - this may be inappropriate.
The logic behind this is that SAAJ, or some other alternative, could have been used to generate the requests and interpret the responses from the service.
Including such code in the example would, in my opinion, have shifted the focus from the dynamic client example to an exercise in generating and interpreting XML.
Yes, the classes you mention are generated by the XJC JAXB schema compiler.
By the way, my last name is still Krizsan.
Best wishes!

My free books and tutorials: http://www.slideshare.net/krizsan
Kumar Sonu
Ranch Hand

Joined: Apr 05, 2011
Posts: 36
Thanks Ivan for the clarification.
And I am terribly sorry for the calling you with the wrong name. I sometimes pay the price for typing too fast
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamic Client example in Ivan Kriz's tutorial
 
Similar Threads
WSIMPORT TO REFRER WEB APPLICATION WSDL AS END POINT
JAX-WS Web Service Clients- Dynamic Clients Query
Regarding javax.xml.ws.Provider interface
JBoss WSDL - custom schema types issues
Objective 4.7 - Describe creating a Web Service using JAX-WS