Doc/Wrapped service turns a non-null, empty array into a null object
--------------------------------------------------------------------

         Key: AXIS-2279
         URL: http://issues.apache.org/jira/browse/AXIS-2279
     Project: Apache Axis
        Type: Bug
  Components: Serialization/Deserialization  
    Versions: 1.3    
    Reporter: Glanville, Jay Dickon


I have a service in which a non-null, empty array is returned:
   public XYZ[] getArray() throws AxisFault {
      return new XYZ[ 0 ];
   }
I then allow Axis to automatically generate the WSDL.  With this WSDL, I use 
the WSDL2Java tool to generate the client side libraries.

When my client calls the getArray() operation, it doesn't receive a non-null, 
empty array.  Instead, it receives a null object.

For example, if the client code was:
   XYZ[] ret = binding.getArray()
   if ( ret == null ) {
      System.out.println( "null" );
   } else {
      System.out.println( ret.length );
   }
then the output would be
   null

The client should be receiving what the service gave it.

The service is a document/literal-wrapped encoded service.  If I change the 
service to an RPC/encoded service, then everything works as expected (i.e.: the 
output of the client program would be "0").



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

Reply via email to