Thanks Alin. Your suggested workaround is a good one and does the trick. It's clearly a bug in both java2wsdl and wsdl2java** -- nillable=true is surely the correct thing to emit given that the parameters in question are not arrays.

** and if I can work out how to raise bugs against Axis 1.3 then I'll do so.


From: Alin Simionoiu <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: Re: Axis 1.3 suitable for production env?
Date: Tue, 10 Jan 2006 19:07:39 -0500

That is indeed a problem in Axis code.
I had the same problem before and by looking at Axis source code I found out that you actually need to set minOccurs and maxOccurs to have the functionality that you want.

In your case instead of setting by hand nillable="true" try to set by hand: minOccurs="0" maxOccurs="1".
The Axis client then will use Boolean object instead of boolean.

if you set minOccurs="1" maxOccurs="1" then is setting the base type boolean instead of object Boolean.

Kind of makes sense but I was expecting the same behavior when I set nillable.


On Jan 10, 2006, at 6:32 PM, Jarmo Doc wrote:

If I manually add nillable="true" to the WSDL for these Boolean operation parameters and then generate both Axis 1.3 and gSOAP 2.7.1 clients then:

- the Axis client is wrong: it generates intrinsic booleans which do not allow for null

- the gSOAP client is correct: it generates pointers to a boolean type thus allowing for null

And all of this leads me to the conclusion that Axis 1.3 is bugged in two places. If you write a doc/lit service that contains an operation such as the following:

public void update(Employee [] employees, Boolean sacked);

1. java2wsdl does not generate nillable="true" for 'sacked' when it should, and

2. even if you manually add nillable="true" for 'sacked', wsdl2java does not generate Boolean, instead it generates boolean

So that's not very good.

From: "Jarmo Doc" <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: Re: Axis 1.3 suitable for production env?
Date: Tue, 10 Jan 2006 12:43:16 -0800

It always worked fine for attributes of user-defined classes. It doesn't appear to work at all (or maybe it's illegal?) for parameters to service operations.


From: Todd Orr <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: Re: Axis 1.3 suitable for production env?
Date: Tue, 10 Jan 2006 12:30:25 -0800

My boolean situations is as follows:

bean:
public void setPrimary(Boolean arg0) {

generates:
Doc Lit - <element name="primary" nillable="true"  type="xsd:boolean"/>
RPC Enc - <element name="primary" nillable="true" type="soapenc:boolean"/>

From what I've seen java2wsdl will generate a nillable attribute  only
if the argument is non-primitive. So, Axis must be seeing your
argument as a boolean when it converts it. If you can absolutely
verify that your java2wsdl will not produce the nillable attribute,
file a bug request.


Alin Simionoiu
[EMAIL PROTECTED]

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/

Reply via email to