my dog learned polymorphism
The moose likes Web Services and the fly likes Getting xml contents from wsdl2java class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Getting xml contents from wsdl2java class" Watch "Getting xml contents from wsdl2java class" New topic

Getting xml contents from wsdl2java class

jee lim

Joined: Sep 09, 2010
Posts: 1
I am not sure whether it is possible or not. I've heard that getting xml contents from wsdl2java classes.
From wsdl files, I can generate java classes waiting to be implemented using wsdl2java from cxf.
It is all good so far but what I also need is to get xml contents instead of getting values from java classes
generated from wsdl2java.

I wonder there is a method called "getXmlContent()", etc

Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
If you use JAXB, then you should have a look at the javax.xml.bind.Marshaller class that is available either in Java SE 6 or JAXB library JAR.
The Javadoc of the Java SE 6 API contains some code snippets that should get you started.
Best wishes!

My free books and tutorials:
Lester Burnham

Joined: Oct 14, 2008
Posts: 1337
Can you give an example of what you mean by "XML content"? wsdl2java is a build-time tool; are you asking about something happening at runtime?
I agree. Here's the link:
subject: Getting xml contents from wsdl2java class
jQuery in Action, 3rd edition