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 Silvano Maffeis <si...@pyx.ch> on 2004/10/25 10:25:37 UTC

Serializer bug with WSDL sequences holding 0 elements?

Hi.

Can somebody pleas help clarifying this issue? I'm not sure
whether its a bug or a feature 8-}

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