Hi,

 

            I’m writing an AXIS client deserializer. However, I had problems with it regarding type identification and handling so, I went back to using the BeanSerialization facilities provided by AXIS. However, that has the same issues. The problem is that when I send out a SessionResponse object which has one element “SessionID”, the engine throws a “Bad Types” exception which is thrown on line 258 of RPCHandler in the org.apache.axis.message package. The exception I receive is as follows:

 

Jan 26, 2004 11:43:13 AM org.apache.axis.client.Call invoke

SEVERE: Exception:

org.xml.sax.SAXException: Bad types (class java.lang.String -> class package.SessionResponse)

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

        at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:963)

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

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

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

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

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

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

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

 

And, the XML being sent out and received by the code above is as follows:

 

<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>

  <ns1:SessionResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="myNS">

   <ns1:SessionID xsi:type="xsd:string">E643B038C5A6EE93ED7B6827B0368338</ns1:SessionID>

  </ns1:SessionResponse>

 </soapenv:Body>

</soapenv:Envelope>

 

However, If I send the XML below, no exception is thrown but the value of SessionID is null.

 

<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>

  <SessionResponse>

   <ns1:SessionID xmlns:ns1="myNS">F002D0BEBAA95491ECD2C15B0EBE1A5E</ns1:SessionID>

  </SessionResponse>

 </soapenv:Body>

</soapenv:Envelope>

 

Any help or ideas would be greatly appreciated.

 

Thank you,

 

 

Brian Abbott

Reply via email to