Use a databinding framework, like JAXB, JiBX, or XMLBeans. The Axis
BeanSerializer and BeanSerializer are not designed to be used as a
generic databinding framework.
Anne
On Jan 10, 2008 10:33 PM, David Benua <[EMAIL PROTECTED]> wrote:
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]