You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Anatoly Rybalchenko <an...@zedo.com> on 2008/09/10 15:54:54 UTC

Axis 1.3 generates object instead of null.

Hello,

We have service with Axis2 1.3 running and I faced following issue:
For nillable elements in WSDL like 

<xs:element maxOccurs="unbounded" minOccurs="0" name="zipTargeting"
nillable="true" type="ax24:CreativeZipTargeting"/>

server receive soap envelope that contains empty placeholder, e.g.

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header>
....
</SOAP-ENV:Header>
<SOAP-ENV:Body>
...
<zipTargeting/>
...
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Expected behavior in this case is that null object for zipTargeting
should be created, but instead of this zipTargeting object with default
constructor is created. Is this a bug known for 1.3 version or I missed
something?

best regards,
Anatoly Rybalchenko.


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


Re: Axis 1.3 generates object instead of null.

Posted by keith chapman <ke...@gmail.com>.
Hi,

The behavior of Axis2 in your case is correct. If zipTargeting was to be
null then your payload should have been something like

<zipTargeting xsi:nill="true" smlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"/>

That instructs axis2 that this element is null.

Thanks,
Keith.

On Wed, Sep 10, 2008 at 7:24 PM, Anatoly Rybalchenko <an...@zedo.com>wrote:

> Hello,
>
> We have service with Axis2 1.3 running and I faced following issue:
> For nillable elements in WSDL like
>
> <xs:element maxOccurs="unbounded" minOccurs="0" name="zipTargeting"
> nillable="true" type="ax24:CreativeZipTargeting"/>
>
> server receive soap envelope that contains empty placeholder, e.g.
>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
> <SOAP-ENV:Header>
> ....
> </SOAP-ENV:Header>
> <SOAP-ENV:Body>
> ...
> <zipTargeting/>
> ...
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> Expected behavior in this case is that null object for zipTargeting
> should be created, but instead of this zipTargeting object with default
> constructor is created. Is this a bug known for 1.3 version or I missed
> something?
>
> best regards,
> Anatoly Rybalchenko.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org