axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Fox <anthony...@gmail.com>
Subject deserialization failing on client
Date Thu, 08 Sep 2005 19:28:06 GMT
I am encountering a problem where deserialization is returning null on
the client side even though the server is returning the appropriate
data.  I have a webservice that returns a complex type ServiceStatus. 
ServiceStatus is an abstract class so the actual return type is a
class that extends ServiceStatus.  The relevant wsdl:


   <complexType abstract="true" name="ServiceStatus">
	<sequence>
               <element name="currentStep" type="xsd:int"/>
               <element name="currentStepName" nillable="true"
type="xsd:string"/>
               <element name="currentStepPosition" type="xsd:int"/>
               <element name="currentStepSize" type="xsd:int"/>
               <element name="done" type="xsd:boolean"/>
               <element name="stepCount" type="xsd:int"/>
               <element maxOccurs="unbounded" name="stepName"
nillable="true" type="xsd:string"/>
         </sequence>
     </complexType>

When I monitor this service with tcpmon, i see the following SOAP exchange:


==============
Listen Port: 9876
Target Host: 127.0.0.1
Target Port: 9991
==== Request ====
POST /pfframework/services/SearchService HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.2.1
Host: 127.0.0.1:9876
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 1188

<?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>
         <ns1:getStatus
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="urn:com.mycompany.lib.engine.service">
            <in0 href="#id0"/>
         </ns1:getStatus>
         <multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:ServiceId"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="http://service.lib.mycompany.com">
            <id href="#id1"/>
            <keyProperties soapenc:arrayType="xsd:anyType[1]"
xsi:type="soapenc:Array">
               <keyProperties href="#id2"/>
            </keyProperties>
         </multiRef>
         <multiRef id="id1" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:long"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">59</multiRef>
         <multiRef id="id2" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="soapenc:long"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">59</multiRef>
      </soapenv:Body>
   </soapenv:Envelope>==== Response ====
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=utf-8
Date: Thu, 08 Sep 2005 19:16:35 GMT
Connection: close

<?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>
         <ns1:getStatusResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="urn:com.mycompany.lib.engine.service">
            <getStatusReturn href="#id0"/>
         </ns1:getStatusResponse>
         <multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:ServiceStatus"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="http://service.lib.mycompany.com">
            <currentStep xsi:type="xsd:int">0</currentStep>
            <currentStepName xsi:type="xsd:string">Searching
databases</currentStepName>
            <currentStepPosition xsi:type="xsd:int">0</currentStepPosition>
            <currentStepSize xsi:type="xsd:int">1</currentStepSize>
            <done xsi:type="xsd:boolean">false</done>
            <stepCount xsi:type="xsd:int">1</stepCount>
         </multiRef>
      </soapenv:Body>
   </soapenv:Envelope>
==============


So there appears to be a valid response.  However, my test class gets
a null return object.  I am not sure what is going wrong here.  Is it
the fact that a different class is actually being returned?  It
appears to be serializing to the appropriate xml.  Any thoughts?

Thanks in advance,
Anthony

Mime
View raw message