You might try XMLbeans or Castor.

On 4/20/06, Holden, Robert M (Robert) <[EMAIL PROTECTED]> wrote:

Since my AXIS 1.2 client also needs to read/write, using XML, several of my wsdl2java objects it seems to me the conversion capability AXIS has internally should be perfect for the job.  I already figured out how to serialize those objects, but remain stumped on deserialization.  I hope someone can prove me wrong, but it seems to me, for deserialization, AXIS support for XML is restricted to SOAP messages.

 

For reference, here is my XML serialization code which does work:

        MessageContext msgContext = new MessageContext(new AxisServer());

        msgContext.setProperty(Call.SEND_TYPE_ATTR,false);

        Writer stringWriter = new StringWriter();

        SerializationContext serializeContext = new SerializationContext(stringWriter, msgContext);

        serializeContext.setPretty(true);

        TypeDesc typeDesc = myObject.getTypeDesc();

        serializeContext.serialize(typeDesc.getXmlType(), null, myObject, typeDesc.getXmlType(), Boolean.FALSE, Boolean.FALSE );

 

 

Thanks in advance for any de-serialization suggestions!  My attempt to use DeserializationContext was unsuccessful.

 

Rob


Reply via email to