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 "Karthik R (JIRA)" <ax...@ws.apache.org> on 2008/05/30 03:37:44 UTC

[jira] Commented: (AXIS-2250) AXIS array serialization: Incorrect element names of items in a list

    [ https://issues.apache.org/jira/browse/AXIS-2250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600994#action_12600994 ] 

Karthik R commented on AXIS-2250:
---------------------------------

Hello Narayan,

Changing WSDD is possible only if you expose the service rite. In our Case, we are consuming from .Net.

How to Solve in that case?

Scenario is simple and similar to my previous user

<soapenv:Body>
<ns1:getEmployeeDetails soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://service.three.com">
  <listOfEmps soapenc:arrayType="ns1:Employee[5]" xsi:type="soapenc:Array"                            xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
     <listOfEmps href="#id0"/>   <!-- Note here item tag is not coming -->
     <listOfEmps href="#id1"/>
     <listOfEmps href="#id2"/>
     </listOfEmps>
</ns1:getEmployeeDetails>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:Employee" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://service.three.com">
 <empName xsi:type="soapenc:string">
   Ganesh
 </empName>
 <empNo xsi:type="soapenc:string">
   1111
 </empNo>
 <salary xsi:type="soapenc:string">
  30000
 </salary>
</multiRef>

<multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:Employee" xmlns:ns4="http://service.three.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<empName xsi:type="soapenc:string">
 Ranesh
</empName>
<empNo xsi:type="soapenc:string">
 2111
</empNo>
<salary xsi:type="soapenc:string">
 30000
</salary>
</multiRef>

<multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns5:Employee" xmlns:ns5="http://service.three.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<empName xsi:type="soapenc:string">Karthik</empName>
<empNo xsi:type="soapenc:string">3111</empNo>
<salary xsi:type="soapenc:string">30000</salary>
</multiRef>

</soapenv:Body>
</soapenv:Envelope>

Can anyone please advise on this of client?

> AXIS array serialization: Incorrect element names of items in a list
> --------------------------------------------------------------------
>
>                 Key: AXIS-2250
>                 URL: https://issues.apache.org/jira/browse/AXIS-2250
>             Project: Axis
>          Issue Type: Bug
>          Components: Serialization/Deserialization
>    Affects Versions: current (nightly)
>         Environment: plattform: i386, OS: WinXP Pro, Java: 1.4.2_06
>            Reporter: Denis Schlesinger
>            Priority: Critical
>         Attachments: beans.zip
>
>
> -Web Service deployed as "wrapped/literal"
> The web service returns a custom bean style class which has an array of another custom bean style class as a member.
> In the WSDL-file the array of the custom type is being described correctly:
> <complexType name="ArrayOf_tns1_EntityTypeBean">
> 	<sequence>
>             <element maxOccurs="unbounded" minOccurs="0" name="item" type="tns1:EntityTypeBean"/>
>         </sequence>
> </complexType>
> But when the Java object is being serialized during runtime the array is being transfered to a list whose member elements DO NOT have the name "item" as expected from the WSDL-file. All members of the list have the same name as the list itself:
> <entities>
>     <entities>
>         ...
>     </entities>
>     <entities>
>           ... 
>     </entities>
>     <entities>
>           ... 
>     </entities>
> </entities>
> But this is expected: 
> <entities>
>     <item>
>         ...
>     </item>
>     <item>
>           ... 
>     </item>
>     <item>
>           ... 
>     </item>
>  </entities>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org