Once I switched from wrapped style to rpc/encoded my service started working. I 
guess I was registering my typeMappings on the client side with the wrong 
encoding style http://schemas.xmlsoap.org/soap/encoding/
Do I need to use a different URL when registering type mappings with the 
wrapped style?

________________________________

From: Oleg Lebedev [mailto:[EMAIL PROTECTED]
Sent: Sat 4/16/2005 1:01 PM
To: axis-user@ws.apache.org
Subject: Bug in Deserializer code?! onStartChild(..)



I've been getting a lot of deserializer errors on the client side from Axis 1.2 
RC3. The client make a findSchoolByName(String) call and the server finds the 
school and sends it back to the client. The error occurs on the client side 
when trying to deserialize the message. The message from the server and the 
error stack trace are shown at the end of this message.

I started debugging the code and found out that in RPCHandler.onStartChild(..) 
method the following piece of code:
            // If that didn't work, try position
            // FIXME : Do we need to be in EITHER named OR positional
            //         mode?  I.e. will it screw us up to find something
            //         by position if we've already looked something up
            //         by name?  I think so...
            if (paramDesc == null) {
                if (isResponse) {
                    paramDesc = operation.getReturnParamDesc();
                }
                else {
                    paramDesc = 
operation.getParameter(rpcElem.getParams().size() - 1);
                }
            }

finds paramDesc, with the following field values:

                    javaType = null
                    name.localPart = 
">findSchoolByNameResponse>findSchoolByNameReturn"

This doesn't look right to me because of the first ">" sign.

Since javaType is null the following sets destClass to null.

                    destClass = paramDesc.getJavaType();

Later in the code, dser is set to null by the following:

                    dser = context.getDeserializer(destClass, type);

This causes the error message below to be thrown.

Is this a bug? Has it been fixed? Is there a work around?

Any help would be greatly appreciated!



Here is how I registered the School type in WSDD which is returned by 
findSchoolByNameResponse:
<beanMapping qname="ns:School" xmlns:ns="urn:dss.sww.com" 
languageSpecificType="java:com.sww.dss.domain.model.hibernate.School"/>

Here is the XML response from the server:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <soapenv:Body>
  <findSchoolByNameResponse xmlns="urn:dss.sww.com">
   <findSchoolByNameReturn>
    <name>Shkola</name>
   </findSchoolByNameReturn>
  </findSchoolByNameResponse>
 </soapenv:Body>
</soapenv:Envelope>


Here is the error stack trace:

org.xml.sax.SAXException: Deserializing parameter 'findSchoolByNameReturn': 
could not find deserializer for type {urn:dss.sww.com}School

AxisFault

faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

faultSubcode:

faultString: org.xml.sax.SAXException: Deserializing parameter 
'findSchoolByNameReturn': could not find deserializer for type 
{urn:dss.sww.com}School

faultActor:

faultNode:

faultDetail:

{http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: Deserializing 
parameter 'findSchoolByNameReturn': could not find deserializer for type 
{urn:dss.sww.com}School

at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:270)

at 
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)

at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)

at 
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1140)

at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:238)

at org.apache.axis.message.RPCElement.getParams(RPCElement.java:386)

at org.apache.axis.client.Call.invoke(Call.java:2437)

at org.apache.axis.client.Call.invoke(Call.java:2336)

at org.apache.axis.client.Call.invoke(Call.java:1793)







--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
If you have questions about this email, please
contact the IT Help Desk.

Mail



Reply via email to