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 "Narayan Singh (JIRA)" <ax...@ws.apache.org> on 2007/06/21 15:57:27 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#action_12506906 ] 

Narayan Singh commented on AXIS-2250:
-------------------------------------

I am having the same issue where XML produced contains array elements with same name as list. I am using axis1.4, Do you have any work around to the above problem?

Snippet - 
<xs:complexType name="ArrayOfOutputList">
	<xs:complexContent>
		<xs:restriction base="soapenc:Array">
			<xs:sequence>
				<xs:element maxOccurs="unbounded" name="item" type="custom-types:Output"/>
			</xs:sequence>

		</xs:restriction>
	</xs:complexContent>
</xs:complexType>

<xs:complexType name="Output">
	<xs:sequence>
		<xs:element name="OutputDataID" type="xs:unsignedLong"/>
		<xs:element name="DataType" type="xs:string" minOccurs="0"/>
	</xs:sequence>
</xs:complexType>


generated XML from Axis - 

<Output>
	<Output><OutputDataID>1</OutputDataID><DataType>TEST</DataType></Output>
	<Output><OutputDataID>2</OutputDataID><DataType>TEST</DataType></Output>
</Output>



> 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