You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Robert McIntosh <RE...@kcc.usda.gov> on 2003/05/14 21:28:11 UTC

Array deserialization

I posted a question concerning this this morning to the user list with
no responses, but I have found a possibly solution.

Environment: Tomcat 4.1.24 with Axis 1.1rc2 on jdk 1.3
Problem: I have a service that returns a list of Farm objects. Each
Farm object contains an array of FarmYear objects. The Farm object list
gets deserialized just fine, but the FarmYear object array does not, as
a Simple deserializer is being invoked.

By default the serialization looks something like (minus a few
namespaces):
<GetCustomerFarmsReturn xsi:type="soapenc:Array"
soapenc:arrayType="xsd:anyType[1]" >    
               <item xsi:type="ns2:Farm">     
                  <dirty>false</dirty>     
                  <farmYears soapenc:arrayType="ns2:FarmYear[1]">     

                     <item> 
....
....
Notice the farmYears tag has the soapenc:arrayType attribute. With this
the deserialization does NOT work. Now, if I add 
xsi:type="soapenc:Array" to the farmYears tag, all is fine, such as:
<farmYears xsi:type="soapenc:Array"
soapenc:arrayType="ns2:FarmYear[1]">

So, my question is, is this a bug? If not, then I need to modify
something to the serializer to add this attribute to get my service to
work. I can do this, but I'm having trouble finding exactly where this
would be. Could someone point me to the right place where this attribute
could be added to the right tag?

Thanks a bunch,
Robert