You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Ashutosh Somani <as...@MIT.EDU> on 2001/02/27 21:29:48 UTC

Serializers

Hi-
I was wondering if anyone could help me out with obtaining/building a proper ser
ializer for my needs. I have used the Constants.NS_URI_LITERAL_XML encoding sche
me for Element objects and the Constants.NS_URI_SOAP_ENC encoding scheme for Str
ing objects but not want to try to pass objects other than simple constants or l
iteral XML.
One object is a class with simply 5 fields (each of which holds a String or an i
nt). The other object is a Vector that holds Strings. Anyone have any idea how I
 can set the proper encoding style for these objects?
For instance, when I pass XML objects, I use the following encoding style:
"call.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML);"

I need a similar mechanism to encode my two other objects. 
If anyone has any idea how I can go about doing this, it would be very helpful.
I haven't found good documentation on building/obtaining proper serilizers.

Thanks in advance for any help.
Ash

Re: Serializers

Posted by Olivier Brand <ol...@intraware.com>.
The BeanSerializer and the VectorDeserializer should do the trick.
See the addressbook sample.

Olivier

Ashutosh Somani wrote:

> Hi-
> I was wondering if anyone could help me out with obtaining/building a proper ser
> ializer for my needs. I have used the Constants.NS_URI_LITERAL_XML encoding sche
> me for Element objects and the Constants.NS_URI_SOAP_ENC encoding scheme for Str
> ing objects but not want to try to pass objects other than simple constants or l
> iteral XML.
> One object is a class with simply 5 fields (each of which holds a String or an i
> nt). The other object is a Vector that holds Strings. Anyone have any idea how I
>  can set the proper encoding style for these objects?
> For instance, when I pass XML objects, I use the following encoding style:
> "call.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML);"
>
> I need a similar mechanism to encode my two other objects.
> If anyone has any idea how I can go about doing this, it would be very helpful.
> I haven't found good documentation on building/obtaining proper serilizers.
>
> Thanks in advance for any help.
> Ash

Re: Serializers

Posted by Olivier Brand <ol...@intraware.com>.
The BeanSerializer and the VectorDeserializer should do the trick.
See the addressbook sample.

Olivier

Ashutosh Somani wrote:

> Hi-
> I was wondering if anyone could help me out with obtaining/building a proper ser
> ializer for my needs. I have used the Constants.NS_URI_LITERAL_XML encoding sche
> me for Element objects and the Constants.NS_URI_SOAP_ENC encoding scheme for Str
> ing objects but not want to try to pass objects other than simple constants or l
> iteral XML.
> One object is a class with simply 5 fields (each of which holds a String or an i
> nt). The other object is a Vector that holds Strings. Anyone have any idea how I
>  can set the proper encoding style for these objects?
> For instance, when I pass XML objects, I use the following encoding style:
> "call.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML);"
>
> I need a similar mechanism to encode my two other objects.
> If anyone has any idea how I can go about doing this, it would be very helpful.
> I haven't found good documentation on building/obtaining proper serilizers.
>
> Thanks in advance for any help.
> Ash