Java2WSDL takes any object parameters of custom types and writes them in the WSDL file
as "nillable".
For example, this Java method:
public void addObj(MyObj newObj);
yields the following (among other things) in the WSDL:
<complexType name="MyObj">
<sequence>
<element name="objKey" nillable="true" type="xsd:long"/>
<element name="objName" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<element name="MyObj" nillable="true" type="tns2:MyObj"/>
<wsdl:message name="addObjRequest">
<wsdl:part name="newObj" type="tns2:MyObj"/>
</wsdl:message>
But when I add this Java method (which, for the sake of this example is intended to
get an object by key if specified, or return a "default object" if objKey is null):
public MyObj getObj(Long objKey);
I get the following in WSDL:
<wsdl:message name="getObjRequest">
<wsdl:part name="objKey" type="xsd:long"/>
</wsdl:message>
And running WSDL2Java to get Java stubs out of it, I get a method signature like these
(for the two calls I've mentioned so far):
public void addObj(MyObj newObj);
public MyObj getObj(long objKey);
In other words, Java2WSDL ignores the difference between "long" and "Long", though it
lets other IN parameters be nillable. Has anybody had any experience with this? Is
this a bug? Is there a workaround?
One workaround I found was to wrap my request in a structure, which contains a single
"Long". In this case, Java2WSDL properly marks it (both the structure and the
contained Long) as nillable. But this makes for a badly complex WSDL file, when it
seems like it should just work in the first place. It seems even more like it should
just work based on the behavior of this workaround.
Any help appreciated. Thanks.
--
Dan Kamins
[EMAIL PROTECTED]
--
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup
Get 4 DVDs for $.49 cents! plus shipping & processing. Click to join.
http://adfarm.mediaplex.com/ad/ck/990-1736-3566-59
"Free price comparison tool gives you the best prices and cash back!"
http://www.bestbuyfinder.com/download.htm