You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Praveen Peddi <pp...@contextmedia.com> on 2003/12/17 20:07:09 UTC
No serializer for java.until.List
I get the following error when I called a soap method that returns a java.util.List.
No Serializer found to serialize a 'java.util.List' using encoding style
Doesn't soap has built in serilizer for List just like String. If not, could any one tell me how add the mapping.
Thanks.
Praveen
Re: No serializer for java.until.List
Posted by Scott Nichol <sn...@scottnichol.com>.
I cannot guarantee that it will work, but effort was made to keep everything compatible, so there is a good chance it will work.
Alternatively, you might try to just grab the CollectionSerializer (http://cvs.apache.org/viewcvs.cgi/*checkout*/ws-soap/java/src/org/apache/soap/encoding/soapenc/CollectionSerializer.java), compile it, and include it as part of your service and/or client. The mappings from the latest SOAPMappingRegistry, which your code or deployment descriptor would need, look like this (with exception handling, etc., to allow people to fail gracefully if they use JDK 1.x):
Class collectionClass = Class.forName("java.util.Collection");
CollectionSerializer collectionSer = new CollectionSerializer();
mapTypes(soapEncURI, new QName(Constants.NS_URI_XML_SOAP, "Collection"),
collectionClass, collectionSer, collectionSer);
collectionClass = Class.forName("java.util.List");
mapTypes(soapEncURI, new QName(Constants.NS_URI_XML_SOAP, "List"),
collectionClass, collectionSer, collectionSer);
collectionClass = Class.forName("java.util.Set");
mapTypes(soapEncURI, new QName(Constants.NS_URI_XML_SOAP, "Set"),
collectionClass, collectionSer, collectionSer);
collectionClass = Class.forName("java.util.SortedSet");
mapTypes(soapEncURI, new QName(Constants.NS_URI_XML_SOAP, "SortedSet"),
collectionClass, collectionSer, collectionSer);
collectionClass = Class.forName("java.util.ArrayList");
mapTypes(soapEncURI, new QName(Constants.NS_URI_XML_SOAP, "ArrayList"),
collectionClass, collectionSer, collectionSer);
collectionClass = Class.forName("java.util.LinkedList");
mapTypes(soapEncURI, new QName(Constants.NS_URI_XML_SOAP, "LinkedList"),
collectionClass, collectionSer, collectionSer);
collectionClass = Class.forName("java.util.HashSet");
mapTypes(soapEncURI, new QName(Constants.NS_URI_XML_SOAP, "HashSet"),
collectionClass, collectionSer, collectionSer);
collectionClass = Class.forName("java.util.TreeSet");
mapTypes(soapEncURI, new QName(Constants.NS_URI_XML_SOAP, "TreeSet"),
collectionClass, collectionSer, collectionSer);
collectionClass = Class.forName("java.util.Stack");
mapTypes(soapEncURI, new QName(Constants.NS_URI_XML_SOAP, "Stack"),
collectionClass, collectionSer, collectionSer);
} catch (ClassNotFoundException cnfe) {
} catch (NoClassDefFoundError ncdfe) {
// If the class can't be loaded, continue without it...
}
Scott Nichol
Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message -----
From: "Praveen Peddi" <pp...@contextmedia.com>
To: <so...@ws.apache.org>
Sent: Wednesday, December 17, 2003 2:56 PM
Subject: Re: No serializer for java.until.List
> It may sound funny but we are still using soap-2-2.jar which was the final
> release couple of years ago. Can I get the latest nightly build and make it
> work w/o affecting my current application.
>
> Praveen
> ----- Original Message -----
> From: "Scott Nichol" <sn...@scottnichol.com>
> To: <so...@ws.apache.org>
> Sent: Wednesday, December 17, 2003 2:16 PM
> Subject: Re: No serializer for java.until.List
>
>
> I believe the nightly build has this built in, but 2.3.1 does not.
>
> Scott Nichol
>
> Do not send e-mail directly to this e-mail address,
> because it is filtered to accept only mail from
> specific mail lists.
> ----- Original Message -----
> From: "Praveen Peddi" <pp...@contextmedia.com>
> To: <so...@ws.apache.org>
> Sent: Wednesday, December 17, 2003 2:07 PM
> Subject: No serializer for java.until.List
>
>
> I get the following error when I called a soap method that returns a
> java.util.List.
>
> No Serializer found to serialize a 'java.util.List' using encoding style
>
> Doesn't soap has built in serilizer for List just like String. If not, could
> any one tell me how add the mapping.
>
> Thanks.
> Praveen
>
>
Re: No serializer for java.until.List
Posted by Praveen Peddi <pp...@contextmedia.com>.
It may sound funny but we are still using soap-2-2.jar which was the final
release couple of years ago. Can I get the latest nightly build and make it
work w/o affecting my current application.
Praveen
----- Original Message -----
From: "Scott Nichol" <sn...@scottnichol.com>
To: <so...@ws.apache.org>
Sent: Wednesday, December 17, 2003 2:16 PM
Subject: Re: No serializer for java.until.List
I believe the nightly build has this built in, but 2.3.1 does not.
Scott Nichol
Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message -----
From: "Praveen Peddi" <pp...@contextmedia.com>
To: <so...@ws.apache.org>
Sent: Wednesday, December 17, 2003 2:07 PM
Subject: No serializer for java.until.List
I get the following error when I called a soap method that returns a
java.util.List.
No Serializer found to serialize a 'java.util.List' using encoding style
Doesn't soap has built in serilizer for List just like String. If not, could
any one tell me how add the mapping.
Thanks.
Praveen
Re: No serializer for java.until.List
Posted by Scott Nichol <sn...@scottnichol.com>.
I believe the nightly build has this built in, but 2.3.1 does not.
Scott Nichol
Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message -----
From: "Praveen Peddi" <pp...@contextmedia.com>
To: <so...@ws.apache.org>
Sent: Wednesday, December 17, 2003 2:07 PM
Subject: No serializer for java.until.List
I get the following error when I called a soap method that returns a java.util.List.
No Serializer found to serialize a 'java.util.List' using encoding style
Doesn't soap has built in serilizer for List just like String. If not, could any one tell me how add the mapping.
Thanks.
Praveen