axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eduard Martínez <martinez.ber...@gmail.com>
Subject Re: Silly question about wsdl2java
Date Wed, 18 Mar 2009 12:11:33 GMT
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 ,
>
>

Mime
View raw message