axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ruiz González, Jose de Jesus" <jjr...@mapfre.com>
Subject RE: AXIS object to XML String
Date Thu, 07 Apr 2005 17:05:07 GMT
See J2SE API java.beans.XMLEncoder and java.beans.XMLDecoder
Regards


José de Jesús Ruiz Gonzalez
Departamento de Sistemas
México Asistencia S.A. de C.V.
Sistema Internacional de Asistencia Mapfre

* mailto:jjruiz@mapfre.com 
*(52) 55 + 54801298

*Fax(52) 55 + 56112011

<http://www.mexicoasistencia.com/> 


-----Mensaje original-----
De: Antonio Casqueiro [mailto:acasq_ml@yahoo.co.uk] 
Enviado el: Jueves, 07 de Abril de 2005 11:28 a.m.
Para: axis-user@ws.apache.org
Asunto: AXIS object to XML String

Hello!

I think this is a easy question, but I can´t seam to find the answer...

After building sucessfully my WebServices, I can up with the following
problem:
I wish to write the XML that represents the state of object to a file, so I
would like to call a method like "toXmlString()"


Example:

=> Simple Object Class
MyObject (generated by AXIS)
    private String myField1;
    private String myField2;

=> Application Code
MyObject o = new MyObject();
o.setField1("1");
o.setField2("2");

// How can I do this?
String xml = o.toXmlString();


=> Desired value
<root>
    <myField1>1</myField1>
    <myField2>2</myField2>
</root>


Thanks in advance
---
Antonio Casqueiro

Mime
View raw message