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 ke...@jpmorgan.com on 2005/07/14 21:50:58 UTC

incorrect serialization?

Given the following snippet of xsd code:

<complexType name="GetMyContactListResponse">
    <complexContent>
     <extension base="tns3:Response">
      <sequence>
       <element name="contactListTOArray" nillable="true" 
type="impl:ArrayOf_tns5_ContactListTO"/>
      </sequence>
     </extension>
    </complexContent>
   </complexType>

 <complexType name="ArrayOf_tns5_ContactListTO">
    <sequence>
     <element maxOccurs="unbounded" minOccurs="0" name="ContactListTOitem" 
type="tns5:ContactListTO"/>
    </sequence>
   </complexType>

I would expect to get output like:

<soapenv:Body>
         <getMyContactListResponse xmlns="http://test.com">
            <getMyContactListReturn>
               <contactListTOArray>
                  <contactListTOitem>
                     <address1 xsi:nil="true"/>
                     <address2 xsi:nil="true"/>

However, what I'm getting in my soap response looks like:

<soapenv:Body>
         <getMyContactListResponse xmlns="http://test.com">
            <getMyContactListReturn>
               <contactListTOArray>
                  <contactListTOArray>
                     <address1 xsi:nil="true"/>
                     <address2 xsi:nil="true"/>

Can anyone explain to me why the item element has the same name as the 
array element?

Thanks,

Ken



-----------------------------------------
This communication is for informational purposes only. It is not intended
as an offer or solicitation for the purchase or sale of any financial
instrument or as an official confirmation of any transaction. All market
prices, data and other information are notwa rranted as to completeness or
accuracy and are subject to change without notice. Any comments or
statements made herein do not necessarily reflect those of J.P. Morgan
Chase & Co., its subsidiaries and affiliates.

Re: incorrect serialization?

Posted by Anne Thomas Manes <at...@gmail.com>.
Please log a bug.

On 7/15/05, kenneth.r.katsma@jpmorgan.com <ke...@jpmorgan.com> wrote:
>  
> FYI: It appears that this is a namespace related issue and appears to be a
> bug in the serializer.  If I bring all the objects into the same namespace,
> then I get the expected results: 
>  
>  <getMyContactListReturn> 
>               <contactListTOArray> 
>                   <item> 
>                      <address1 xsi:nil="true"/> 
>                      <address2 xsi:nil="true"/> 
>  
> Should this be filed as a bug or is there a better way to define my
> namespaces to Axis? 
>  
> Thanks, 
>  
> Ken 
> 
>  
>  
>  
>  
> 
>  Given the following snippet of xsd code: 
>  
>  <complexType name="GetMyContactListResponse"> 
>     <complexContent> 
>      <extension base="tns3:Response"> 
>       <sequence> 
>        <element name="contactListTOArray" nillable="true"
> type="impl:ArrayOf_tns5_ContactListTO"/> 
>       </sequence> 
>      </extension> 
>     </complexContent> 
>    </complexType> 
>  
>  <complexType name="ArrayOf_tns5_ContactListTO"> 
>     <sequence> 
>      <element maxOccurs="unbounded" minOccurs="0" name="ContactListTOitem"
> type="tns5:ContactListTO"/> 
>     </sequence> 
>    </complexType> 
>  
>  I would expect to get output like: 
>  
>  <soapenv:Body> 
>          <getMyContactListResponse xmlns="http://test.com"> 
>             <getMyContactListReturn> 
>                <contactListTOArray> 
>                   <contactListTOitem> 
>                      <address1 xsi:nil="true"/> 
>                      <address2 xsi:nil="true"/> 
>  
>  However, what I'm getting in my soap response looks like: 
>  
>  <soapenv:Body> 
>          <getMyContactListResponse xmlns="http://test.com"> 
>             <getMyContactListReturn> 
>                <contactListTOArray> 
>                   <contactListTOArray> 
>                      <address1 xsi:nil="true"/> 
>                      <address2 xsi:nil="true"/> 
>  
>  Can anyone explain to me why the item element has the same name as the
> array element? 
>  
>  Thanks, 
>  
>  Ken 
> 
>  ________________________________
>  
> 
> This communication is for informational purposes only. It is not intended as
> an offer or solicitation for the purchase or sale of any financial
> instrument or as an official confirmation of any transaction. All market
> prices, data and other information are notwa rranted as to completeness or
> accuracy and are subject to change without notice. Any comments or
> statements made herein do not necessarily reflect those of J.P. Morgan Chase
> & Co., its subsidiaries and affiliates. 
> 
>  
> 
> 
> 
>

Re: incorrect serialization?

Posted by ke...@jpmorgan.com.
FYI: It appears that this is a namespace related issue and appears to be a 
bug in the serializer.  If I bring all the objects into the same 
namespace, then I get the expected results:

 <getMyContactListReturn>
              <contactListTOArray>
                  <item>
                     <address1 xsi:nil="true"/>
                     <address2 xsi:nil="true"/>

Should this be filed as a bug or is there a better way to define my 
namespaces to Axis?

Thanks,

Ken





Given the following snippet of xsd code: 

<complexType name="GetMyContactListResponse"> 
    <complexContent> 
     <extension base="tns3:Response"> 
      <sequence> 
       <element name="contactListTOArray" nillable="true" 
type="impl:ArrayOf_tns5_ContactListTO"/> 
      </sequence> 
     </extension> 
    </complexContent> 
   </complexType> 

 <complexType name="ArrayOf_tns5_ContactListTO"> 
    <sequence> 
     <element maxOccurs="unbounded" minOccurs="0" name="ContactListTOitem" 
type="tns5:ContactListTO"/> 
    </sequence> 
   </complexType> 

I would expect to get output like: 

<soapenv:Body> 
         <getMyContactListResponse xmlns="http://test.com"> 
            <getMyContactListReturn> 
               <contactListTOArray> 
                  <contactListTOitem> 
                     <address1 xsi:nil="true"/> 
                     <address2 xsi:nil="true"/> 

However, what I'm getting in my soap response looks like: 

<soapenv:Body> 
         <getMyContactListResponse xmlns="http://test.com"> 
            <getMyContactListReturn> 
               <contactListTOArray> 
                  <contactListTOArray> 
                     <address1 xsi:nil="true"/> 
                     <address2 xsi:nil="true"/> 

Can anyone explain to me why the item element has the same name as the 
array element? 

Thanks, 

Ken 

This communication is for informational purposes only. It is not intended 
as an offer or solicitation for the purchase or sale of any financial 
instrument or as an official confirmation of any transaction. All market 
prices, data and other information are notwa rranted as to completeness or 
accuracy and are subject to change without notice. Any comments or 
statements made herein do not necessarily reflect those of J.P. Morgan 
Chase & Co., its subsidiaries and affiliates.