views:

1065

answers:

2

Hi, I've got in my webservice a simple public boolean isAlive() service. I 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 generate the Service skeleton the method is generated but not in the client stub. Is there a problem in the WSDL ? Should I put a wsdl:input even if the method don't have arguments (I didn't put the whole WSDL but all the other method with a "request" arg are well generated) ? And if I have to put a wsdl:input what would be it's message ?

Edit : After validating the WSDL under Eclipse I have the warning WS-I: (BP2208) wsdl:operation was not a request/response or one-way operation after searching I found a description here : http://www.ws-i.org/Testing/Tools/2005/01/BP11_TAD_1-1.htm#BP2208 (it seems the anchor doesn't work) so I guess the error is probably the missing wsdl:input.

A: 

I'm not sure if this is your problem but the following line seems to have no closing tag:

<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 this helps.

redspike
it was just an error in my copy/paste but the original was correct... I edited the question to correct that.
Vinze
A: 

As said in my edit the problem was the missing 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 searched more by myself before to ask on SO :(

Vinze