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 "Fernando Mato Mira (JIRA)" <ax...@ws.apache.org> on 2006/02/03 10:57:03 UTC

[jira] Created: (AXIS-2393) Arrays not properly deserialized in wrapped/literal mode

Arrays not properly deserialized in wrapped/literal mode
--------------------------------------------------------

         Key: AXIS-2393
         URL: http://issues.apache.org/jira/browse/AXIS-2393
     Project: Apache Axis
        Type: Bug
  Components: Serialization/Deserialization  
    Versions: 1.3    
 Environment: All
    Reporter: Fernando Mato Mira
    Priority: Critical


A method returning a String[], for example, which has a response type like follows:

<element name="fooResponse">
  <complexType>
    <sequence>
       <element maxOccurs="unbounded" name="fooReturn" type="xsd:string"/>
    </sequence>
  </complexType>
</element>  

results in a cast exception in the client implemented with Axis 1.3, as Axis is returning an ArrayList instead of an array.

Exception in thread "main" java.lang.ClassCastException: java.util.ArrayList
	at $Proxy1.foo(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.springframework.remoting.rmi.RmiClientInterceptorUtils.doInvoke(RmiClientInterceptorUtils.java:103)
        ...

The same program works if the service is in rpc/encoded mode (the interfaces do not change).

This problem has been reported by other people to the Spring forums last year and it was determined by the Spring developers
not to be an issue with Spring, but with the JAX-RPC provider:
http://forum.springframework.org/showthread.php?t=16879





-- 
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