Axis2 WSDL2Java: Missing no-arg operation in generated stub

I have a simple service in my webservice public boolean isAlive()

. I have defined it in my WSDL:

<wsdl:types>
    <xsd:element name="isAliveResponse" type="xsd:boolean">
    </xsd:element>
</wsdl:types>
<wsdl:message name="isAliveResponse">
    <wsdl:part element="ns:isAliveResponse" name="parameters"/>
</wsdl:message>
<wsdl:portType name="myService">
    <wsdl:operation name="isAlive">
        <wsdl:output message="ns:isAliveResponse"/>
    </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="myServiceSOAP" type="ns:myService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="isAlive">
    <soap:operation soapAction="http://myServiceURL/isAlive" />
    <wsdl:input>
        <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
        <soap:body use="literal" />
    </wsdl:output>
</wsdl:operation>
</wsdl:binding>

      

When I create the skeleton of the service, the method is generated, but not in the client. Is there a problem with the WSDL? Should I put wsdl: input even if the method has no arguments (I didn't put the whole WSDL, and all the other method with the 'request' argument is well generated)? And if I need to put wsdl: input, what would that message be?

Edit : After checking the WSDL in Eclipse, I have a warning WS-I: (BP2208) wsdl:operation was not a request/response or one-way operation

after searching. I found the description here: http://www.ws-i.org/Testing/Tools/2005/01/BP11_TAD_1-1.htm#BP2208 (the anchor doesn't seem to work) so I think the error is probably is the absence of wsdl: input.

0


source to share


2 answers


As my edit said, the problem was the lack of wsdl: input. By adding

<wsdl:input message="ns:isAliveRequest" />

      

and



<wsdl:message name="isAliveRequest"></wsdl:message>

      

then my original problem is solved ... conclusion, I should have looked more myself before asking about SO :(

+1


source


I'm not sure if this is your problem, but there is no closing tag on the next line:

<wsdl:types>
    <xsd:element name="isAliveResponse" type="xsd:boolean">
</wsdl:types>

      

It should be like this:



<wsdl:types>
    <xsd:element name="isAliveResponse" type="xsd:boolean"/>
</wsdl:types>

      

Hope it helps.

0


source







All Articles