axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Benua <dbe...@panix.com>
Subject Calling BeanDeserializer ?
Date Fri, 11 Jan 2008 03:33:10 GMT
I have a problem trying to use the BeanDeserializer outside of the 
standard SOAP message processing.  I wonder if this is possible.

I have an object that is normally transmitted via Web Services that I 
want to persist as an XML file, and then re-use it at a later date as an 
Object.  This Object was generated with WSDL2Java, and has both a 
getSerializer() and a getDeserializer() method.

I can serialize the Object to XML easily like this:

       StringWriter output = new StringWriter();
       QName qn = new QName("urn...","Item");
       Serializer serial = Item.getSerializer(Constants.AXIS_SAX, 
Item.class, item);
       SerializationContext ctx = new SerializationContext(output);
       Attributes attribs = new AttributesImpl();
       serial.serialize(qn , attribs, item, ctx);
       return output.toString();

What I cannot figure out how to do is deserialize the XML back to the 
Object.

I've seen this question asked a couple of times in the archives, but 
never any answer.

Any suggestions most welcome

Dave

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


Mime
View raw message