axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Silvano Maffeis <silv...@pyx.ch>
Subject WSDL Sequence holding String[0] being received as Sequence holding null
Date Tue, 19 Oct 2004 12:59:18 GMT
Hi.

In Axis 1.2 RC1 I defined the following WSDL sequence:

<complexType name="StringArray">
    <sequence>
        <element name="string" type="string" minOccurs="0" 
maxOccurs="unbounded"/>       
    </sequence>
</complexType>

as well as a simple "ping" operation returning a StringArray:

<wsdl:message name="PingRequest">
</wsdl:message>
   
<wsdl:message name="PingResponse">
    <wsdl:part name="out" type="StringArray"/>
</wsdl:message>

Now, if my WebService returns a StringArray holding a zero sized
String[]:

return new StringArray(new String[0])

my "ping" client actually will receive a StringArray holding a null 
reference.
Meaning, on the client:

StringArray ret = webservice.ping();
ret.getString() is null

I would rather expect my client to also receive a StringArray bearing a 
String[0]

Is this a bug or a feature?

Cheers,
Silvano

-- 
Dr. Silvano Maffeis, Software Architect, Pyx Engineering AG Zurich
http://www.maffeis.com    http://www.pyx.ch   phone:+41-1-404-1006


Mime
View raw message