axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "R J Scheuerle Jr" <sc...@us.ibm.com>
Subject nill Deserialization Problems
Date Thu, 01 Nov 2001 20:01:12 GMT
I am working on an WSDL function test/sample that tests multi-reference
serialization.

In the WSDL, I have defined a tree node:

      <xsd:complexType name="node">
        <xsd:all>
            <xsd:element name="left" type="typens:node" xsd:nillable
="true"/>
            <xsd:element name="right" type="typens:node" xsd:nillable
="true"/>
            <xsd:element name="data" type="xsd:int"/>
        </xsd:all>
      </xsd:complexType>

The first test is:
    1) construct a three node tree on the client side (root node + left
node + right node)
    2) pass the tree to the remote service operation testSimpleTree, which
makes sure that the tree is a simple tree of 3 nodes.
    3) pass back the return value and the tree.

Using tcpmon, I verified that the serialization is correct:

 <SOAP-ENV:Body>
  <ns3:testSimpleTree xmlns:ns3="urn:MultiRefTest2">
   <root href="#id0"/>
  </ns3:testSimpleTree>
  <multiRef id="id0" xsi:type="ns5:Node" xmlns:ns5="urn:MultiRefTest2">
   <right href="#id1"/>
   <data xsi:type="xsd:int">0</data>
   <left href="#id2"/>
  </multiRef>
  <multiRef id="id1" xsi:type="ns11:Node" xmlns:ns11="urn:MultiRefTest2">
   <right xsi:nil="true"/>
   <data xsi:type="xsd:int">2</data>
   <left xsi:nil="true"/>
  </multiRef>
  <multiRef id="id2" xsi:type="ns17:Node" xmlns:ns17="urn:MultiRefTest2">
   <right xsi:nil="true"/>
   <data xsi:type="xsd:int">1</data>
   <left xsi:nil="true"/>
  </multiRef>
 </SOAP-ENV:Body>

However the test fails.  Looking at the Response (which should be the same
tree) I noticed that the
nil values were not deserialized properly.  Instead of being deserialized
as null, they were deserialized as
default Node objects.  Thus my tree on the server side has 7 nodes instead
of 3!  And when I get the tree returned
on the client side it has 15 nodes....sigh.

Does anyone know whether this is just a problem related to the
BeanSerializer or whether it is a deeper problem?
I am going to go ahead and try to debug it.


P.S. When completed, the MultiRefTest will do a 'simple tree test', a
'diamond test', and a couple 'chained loop tests'.

Thanks,
Rich Scheuerle
ORB/IDLC Development
512-838-5115  (TL 678-5115)


Mime
View raw message