You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Nikolay Metchev <N....@teamphone.com> on 2003/06/12 17:23:37 UTC

standalone deserialization

Hello Axis developers,
I have searched the axis-user mailing list for the answer to my question and
it seems that it has been asked several times but never answered. I thought
I would try my luck here and see if anyone would be so kind to help me out.
I am trying do some serialization/deserialization so that I can store
certain objects used in my web service and reuse them in the future but also
allow people to change those objects by just editing the xml which
represents those objects. Serialization was easy and in fact I found two
ways of doing so
1. Create a BeanSerializer and call the serialize method on it
2. Create a SerializationContext and call its serialize method

It is a little worrying that there are two ways to achieve the same things
(not a very clean API).
Nevertheless I was stumped at how to do the inverse (i.e. from the xml
produced in the method outlined above recreate the objects that were
serialized). I would appreciate if someone could give me some sample code
which serializes an object produced from wsdl2java and then deserializes it
back.

Re: standalone deserialization

Posted by Davanum Srinivas <di...@yahoo.com>.
take a look at TestBeanDeser*.java (http://cvs.apache.org/viewcvs/xml-axis/java/test/encoding/)

-- dims

--- Nikolay Metchev <N....@teamphone.com> wrote:
> Hello Axis developers,
> I have searched the axis-user mailing list for the answer to my question and
> it seems that it has been asked several times but never answered. I thought
> I would try my luck here and see if anyone would be so kind to help me out.
> I am trying do some serialization/deserialization so that I can store
> certain objects used in my web service and reuse them in the future but also
> allow people to change those objects by just editing the xml which
> represents those objects. Serialization was easy and in fact I found two
> ways of doing so
> 1. Create a BeanSerializer and call the serialize method on it
> 2. Create a SerializationContext and call its serialize method
> 
> It is a little worrying that there are two ways to achieve the same things
> (not a very clean API).
> Nevertheless I was stumped at how to do the inverse (i.e. from the xml
> produced in the method outlined above recreate the objects that were
> serialized). I would appreciate if someone could give me some sample code
> which serializes an object produced from wsdl2java and then deserializes it
> back.


=====
Davanum Srinivas - http://webservices.apache.org/~dims/

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com