You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by David Oppenheimer <da...@gmail.com> on 2006/11/16 20:19:43 UTC

How to serialize a data structure into an XML string I can manipulate in my program?

Hi. I have written a WSDL description of a web service, generated the
stub and skeleton code using WSDL2Java, and written the SOAP binding
implementation code for the server side. I'd like to be able to
convert some of datatypes I manpulate in the program (whose classes
were generated from WSDL using WSDL2Java) to/from the XML
representation that Axis uses when it sends them over the wire as part
of a SOAP message.

So ideally, I'd like to be able to invoke a something like a
toString() method on the Java classes that were automatically
generated from their WSDL description ("simpleType" and "complexType"
definitions) and get back the XML representation for a particular
object of that class.

The automatically generated classes have getSerializer() and
getDeserializer() methods, which I assume are hooks to let me access
the appropriate classes to convert objects of these classes to/from
XML, but the documentation didn't say anything about how to use these
functions to do such a conversion.

Thanks for any suggestions!

David

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org