You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Nicolas De Loof <ni...@capgemini.com> on 2006/01/26 12:06:37 UTC

serialization issue

My web service returns this object structure :

NumeroGta[] verifierTrancheNumero(args...)
"NumeroGta" is a javabean having a property of type Collection 
(LinkedList) containing "PrefixeCaa" beans.

Axis SOAP response is incorect as my collection is serialized as a 
NumeroGta array, not a PrefixeCaa array.
Using debuger, I've found that axis get collection item type from 
SerialisationContext.getItemType(). This property is set for top level 
collection (my NumeroGta[]) but not when encoding sub-collections.

IS this a known bug ?
What to do to solve this !

Nico.


When Axis generates SOAP message as service invocation response, I get  :
(simplified XML, but still long...)

<soapenv:Body>
    <ns1:verifierTrancheNumeroResponse>
        <verifierTrancheNumeroReturn 
soapenc:arrayType="ns2:NumeroGta[2]"          // OK I've got a NumeroGta 
array
            xsi:type="soapenc:Array">
            <verifierTrancheNumeroReturn href="#id0"/>
            <verifierTrancheNumeroReturn href="#id1"/>
        </verifierTrancheNumeroReturn>
    </ns1:verifierTrancheNumeroResponse>
    <multiRef id="id0" soapenc:root="0"
        xsi:type="ns3:NumeroGta">
        <prefixeCaas xsi:type="soapenc:Array" xsi:nil="true"/>         
                           // First NumeroGta has prefixeCaas = null
    </multiRef>
    <multiRef id="id1" soapenc:root="0"
        xsi:type="ns4:NumeroGta">  
        <prefixeCaas href="#id12"/>                                    
   // 2d NumeroGta has prefixeCaas != null
    </multiRef>
    <multiRef id="id12"
        soapenc:arrayType="*ns11:NumeroGta[2]*" 
xsi:type="soapenc:Array">      // Linked list is encoded a Array : OK
                                                                      
   *  // BUT arrayType should be PrefixeCaa[2], not NumeroGta[2] !!!!!*
        <multiRef href="#id14"/>
        <multiRef href="#id15"/>
    </multiRef>
...



This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,  distribute, or use this message or any part thereof. If you receive this  message in error, please notify the sender immediately and delete all  copies of this message.