axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allen, Michael E." <Michael.Al...@ACNielsen.com>
Subject RE: no deserializer defined for array type
Date Wed, 30 Apr 2003 16:46:57 GMT
This has been submitted as a bug:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18530

Here is what I had to do:
I spent quite a bit of time trying to get a gSoap server to talk to a Java
client.  I used gSoap (2.2.3) to generate a .wsdl file.  I then fed that
wsdl to WSDL2Java and kept get the message "no deserializer defined for
array of type ..."  I finally tracked the problem down to way that the
de/serializer for my array type (AcnInfoRow) was constructed in
...BindingStub.java.  My code defines a namespace (urn:stuff) for my web
services and data types.  The WSDL2Java code said:
[...]
            qName = new javax.xml.namespace.QName("urn:stuff",
"AcnInfoRow");
            cachedSerQNames.add(qName);
            cls = acn_infoserver_webservice.AcnInfoRow.class;
            cachedSerClasses.add(cls);
            cachedSerFactories.add(beansf);
            cachedDeserFactories.add(beandf);
[...]

When I replace "urn:stuff" with "" in the qName, the error message went away
and I was able to correctly parse the incoming soap response.  I don't know
if this is a bug in the way gSoap generates responses or the was WSDL2Java
generates deserializers, or just something a bit flaky with the standard, or
me doing something wrong (in which case I would at least claim the
documentation needs a tweak or two...).  In any case, I have submitted a bug
to axis and I am posting here for others who are having this problem.

-Michael


-----Original Message-----
From: Adrian Roston [mailto:akroston@pacbell.net]
Sent: Tuesday, April 29, 2003 7:14 PM
To: axis-user@ws.apache.org
Subject: no deserializer defined for array type

Hi,

I'm trying to use stubs generated by wsdl2java, and when I invoke the
appropriate method, I get a SAXException:

org.xml.sax.SAXException: No deserializer defined for array type
{http://soap.am
azon.com}Details
        at
org.apache.axis.encoding.ser.ArrayDeserializer.onStartElement(ArrayDe
serializer.java:296)
        at
org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerIm
pl.java:428)
        at
org.apache.axis.encoding.DeserializationContextImpl.startElement(Dese
rializationContextImpl.java:962)
        at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.ja
va:198)
        at
org.apache.axis.message.MessageElement.publishToHandler(MessageElemen
t.java:718)
        at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:232)
        at org.apache.axis.message.RPCElement.getParams(RPCElement.java:346)


Is this either because the complex type being returned is not mapped
(in which case I have to go down the
org.apache.axis.encoding.TypeMappingImpl road)?

Or is it because the parser cant find the custom return-type class stub?


TIA,

Adrian


Mime
View raw message