axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Schlesinger (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Commented: (AXIS-2250) AXIS array serialization: Incorrect element names of items in a list
Date Tue, 18 Oct 2005 16:26:46 GMT
    [ http://issues.apache.org/jira/browse/AXIS-2250?page=comments#action_12332374 ] 

Denis Schlesinger commented on AXIS-2250:
-----------------------------------------

I solved it to my own needs by adding an "else" branch at org.apache.axis.encoding.ser.ArraySerializer,
line 404:

  [...] else 
              elementName = new QName(elementName.getNamespaceURI(), "item"); [...]

Making the whole if-block:

if (!maxOccursUsage) {
            serializeAttr = null;  // since we are putting them here
            context.startElement(name, attributes);
            if (itemQName != null)
                elementName = itemQName;
            else if(componentQName != null)
                elementName = componentQName;
            else 
            	elementName = new QName(elementName.getNamespaceURI(), "item");
        }

Anyway, this needs to be checked by some other people as well...

> AXIS array serialization: Incorrect element names of items in a list
> --------------------------------------------------------------------
>
>          Key: AXIS-2250
>          URL: http://issues.apache.org/jira/browse/AXIS-2250
>      Project: Apache Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message