axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dies Koper <>
Subject Re: SOAP - literal x encoded
Date Thu, 20 Apr 2006 23:46:16 GMT
Hello Daniel,

I'm sorry, I misunderstood what you wrote. You wrote "wrapper types", 
and I was thinking "wrapper classes" (that wrap multiple method 
arguments) and their complexType definitions in the WSDL.

Now that you mention that your original Integer gets generated as int I 
understand your problem. Forget my previous reply.

I'm afraid what you are seeing is probably a bug.
Does the definition of your parameter in the generated WSDL contain the 
attribute nillable="true"? If not, then the problem is with the WSDL 
generation code and you can manually try fixing the WSDL. If the 
attribute is specified, then the problem could be in the Java generation 
code. The only workaround I can think of that might work is to add 
minOccurs="0" to the element definition.

Either way, no clean solution until someone volunteers to fix it.

Good luck,

Daniel Destro wrote:
> Hi Dies,
> I did my testing following your hints and I did not get the point.
> I generated my WSLD using the 3 different options for -s (style) - DOCUMENT,
> RPC and WRAPPED, and also -u (use) - LITERAL.
> All this combination ignored the fact that I am using Integer and Double.
> Instead, the server binding classes were generated using int and double.
> This is because I am not using ENCODED anynore?
> Thanks
> Daniel
> On 4/13/06, Dies Koper <> wrote:
>> Hello Daniel,
>> When you use DOCUMENT/LITERAL with the "wrapped" convention, the SOAP
>> message will still contain a wrapper element under the body, but this
>> element will not be mapped to a Java class (the corresponding JavaBean
>> will not be generated).
>> If you do not use the "wrapped" convention, a wrapper class is generated
>>   and used.
>> If you start with a Java interface, specify WRAPPED instead of DOCUMENT
>> in the option to Java2WSDL to get a WSDL with the "wrapped" convention.
>> If you work from the WSDL, follow the criteria in the JAX-RPC 1.1 spec
>> and change your WSDL. I believe WSDL2Java also has an option to ignore
>> the criteria and generate and use the wrapper beans anyway.
>> Note that for arrays (complexType with one element with maxOccurs >1)
>> wrapper classes are not generated by default. Use WSDL2Java's
>> --wrapArrays option to use wrapper classes for arrays (again, this
>> should not affect the SOAP message).
>> Regards,
>> Dies
>> Daniel Destro wrote:
>>> Someone told me here to use DOCUMENT/LITERAL instead of ENCODED SOAP,
>>> because I wanted a more simple SOAP response message.
>>> Well, it does work, BUT the problem is, it no longer uses Wrapper Types,
>>> instead it uses primitives.
>>> Is it possible to use wrappers using literal soap style?
>>> thanks
>>> Daniel

View raw message