• Post Reply Bookmark Topic Watch Topic
  • New Topic

Soap response error

 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I'm calling a WS (Soap-PC) wich argument is a custom java class containing a java.util.set
In my client code, I had to add :
smr.mapTypes("http://schemas.xmlsoap.org/soap/encoding/", new QName("http://util.java/","Set"),java.util.Set.class, serializer, deSerializer);
in order to marshall the class propely. Actually, it sounds it work not so bad.

But the SOAP response received is :
<faultstring>Unable to instantiate 'java.util.Set': java/util/Set</faultstring>

Why ?
In my dds.xml, I have :
<isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:x="http://util.java/" qname="x:Set" javaType="java.util.Set" xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer" java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
And I thouht it was enough to umarshall the class
Any tip ?
Soap engine : Apache SOAP within WebSphere 5
[ March 20, 2003: Message edited by: Jean-Louis Marechaux ]
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jean-Louis,
There's a very limited number of Java collection types supported by Apache SOAP. You can use Arrays, Vectors, Enumerations (but only on the other allowed collections), Hashtables and Maps and that's it. Each of these types has a standard Serializer built for it -- you can't use the BeansSerializer in this case since these aren't JavaBeans. You could try to extend this using one of the other Colleciton serializers as a template, but it will be more trouble than it's worth.
Kyle
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, I missed the fact that java.util.Set was not supported !!
That's what occurs when you try to read the Apache Soap documentation too quickly :roll:
Thanks Kyle.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!