axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sagara Gunathunga (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (AXIS2-3840) Spring ArrayList doesn't work
Date Fri, 22 Jul 2011 18:12:58 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-3840?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sagara Gunathunga  resolved AXIS2-3840.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.7.0

With AXIS2-5090 ADB can process any implementation of java.util.List. 

> Spring ArrayList doesn't work
> -----------------------------
>
>                 Key: AXIS2-3840
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3840
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.4
>         Environment: XP SP2/JDK1.6.0_06/Apache 2.2/Tomcat 5.5/Axis 2 1.4 using war install.
>            Reporter: Stephen Kilburn
>            Assignee: Sagara Gunathunga 
>             Fix For: 1.7.0
>
>
> ArrayLists apparently are not correctly recreated by Axis2 when using Spring.
> To replicate behaviour:
> Using the WeatherSpringService example code, I modify the Weather class to contain ArrayList<String>
comments.  I add getter and setter methods.  I set a comment.
> Generated WSDL shows:
> <xs:complexType name="Weather">
> <xs:sequence>
> <xs:element minOccurs="0" name="comments" nillable="true" type="xs:anyType"/>
> <xs:element minOccurs="0" name="forecast" nillable="true" type="xs:string"/>
> <xs:element minOccurs="0" name="howMuchRain" type="xs:float"/>
> <xs:element minOccurs="0" name="rain" type="xs:boolean"/>
> <xs:element minOccurs="0" name="temperature" type="xs:float"/>
> </xs:sequence>
> </xs:complexType>
> When I execute the getWeather method the SOAP passed back shows:
> <ns:return type="sample.spring.bean.Weather">
> <ax21:comments>it's nice now!</ax21:comments>
> <ax21:forecast>le matin</ax21:forecast>
> <ax21:howMuchRain>0.1</ax21:howMuchRain>
> <ax21:rain>true</ax21:rain>
> <ax21:temperature>37.2</ax21:temperature>
> </ns:return>
> (i.e. the set value is being transported) 
> However, the ArrayList generates errors when I attempt to use it.  Set client up as follows:
> ArrayList<String> comments = result.getComments();
> // (Check that the variable isn't null - it isn't and has one element.)
> System.out.println("comments exists and is of type " + comments.getClass());
> Object o;
> o = comments.get(i);
> System.out.println("comment " + i + " class is " + o.getClass());
> This returned:
> comments exists and is of type class java.util.ArrayList
> comment 0 class is class org.apache.axiom.om.impl.llom.OMElementImpl  [it should be String]

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message