axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sagara Gunathunga <sagara.gunathu...@gmail.com>
Subject Re: Silly question about wsdl2java
Date Wed, 18 Mar 2009 15:06:35 GMT
Hi Edu,
I'm not sure is there any other option to change this behavior  or it
is  a bug with ADB code generation.

I think ADB code generation tool should have little knowledge before
it un-wrap the omplexType response messages to ensure that is it
possible to un-wrap or not.


Thanks ,


On Wed, Mar 18, 2009 at 5:41 PM, Eduard Martínez
<martinez.bernal@gmail.com> wrote:
> Thank you Sagara, I've tried your suggestion and it appears to work. But
> then the code generated is a void method when should return an object.
>
> Types are:
>
>             <xs:element name="idstr">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element name="id" type="xs:string"
> nillable="false" />
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>
>             <xs:element name="fullTest">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element name="id" type="xs:string"
> nillable="false"/>
>                         <xs:element name="testName" type="xs:string"
> nillable="false"/>
>                         <xs:element name="questionsGroup"
> type="tns:questionsGroup" minOccurs="0" maxOccurs="unbounded" />
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>
>
> Messages:
>
>     <wsdl:message name="getTestRequest" >
>         <wsdl:part name="id" element="tns:idstr" />
>     </wsdl:message>
>     <wsdl:message name="getTestResponse">
>         <wsdl:part name="test" element="tns:fullTest" />
>     </wsdl:message>
>
> And the operation:
>
>         <wsdl:operation name="getTest">
>             <wsdl:input message="tns:getTestRequest" />
>             <wsdl:output message="tns:getTestResponse" />
>         </wsdl:operation>
>
> Without the -uw option, method signature is like this:
>
> public FullTest getTest(Idstr id);
>
> With the -uw option:
>
> public void getTest(String id);
>
>
> Cheers,
>
> Edu
> On Tue, Mar 17, 2009 at 1:02 PM, Sagara Gunathunga
> <sagara.gunathunga@gmail.com> wrote:
>>
>> Hi Edu,
>> adding  -uw  (un-wrapping) option will solve your problem.
>>
>> WSDL2Code -uri <Location of WSDL> -uw
>>
>> Thanks ,
>>
>
>



-- 
Sagara Gunathunga

Blog - http://ssagara.blogspot.com
Web - http://sagaras.awardspace.com/
Mime
View raw message