I'm writing a WSDL file and I can't get rid of this warning from the Eclipse validator:
WS-I: (BP2208) wsdl:operation was not a request/response or one-way operation.
This is the WSDL source I wrote:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="Master"
targetNamespace="http://pad.polito.it/ACSAuth"
xmlns:tns="http://pad.polito.it/ACSAuth"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0"
targetNamespace="http://pad.polito.it/ACSAuth"
xmlns:tns="http://pad.polito.it/ACSAuth">
<xs:element name="AccessDB" type="tns:AccessDBType">
<!-- OMITTED COMPLEX TYPE AccessDBType -->
<xs:element name="passThrough" type="tns:passThroughType"/>
<!-- OMITTED COMPLEX TYPE passThroughType -->
</xs:schema>
</types>
<message name="updatedDB">
<part name="db" element="tns:AccessDB"/>
</message>
<message name="passThroughNotice">
<part name="info" element="tns:passThrough"/>
</message>
<portType name="myPorts">
<operation name="updateManager">
<output name="newUpdate" message="tns:updatedDB"/>
</operation>
<operation name="noticeManager">
<input name="newNotice" message="tns:passThroughNotice"/>
</operation>
</portType>
<binding name="myBindings" type="tns:myPorts">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="updateManager">
<soap:operation soapAction="" />
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="noticeManager">
<soap:operation soapAction="" />
<input>
<soap:body use="literal"/>
</input>
</operation>
</binding>
<service name="MyServices">
<port name="ACSAuth" binding="tns:myBindings">
<soap:address location="http://localhost:8181/ACSAuth"/>
</port>
</service>
</definitions>
Here you can find the complete WSDL file: https://dl.dropboxusercontent.com/u/33459047/StackOverflow/Master.wsdl
I believe that the source of the problem is the operation "updateManager", but I don't know how to fix it. Can someone help me please? Thank you in advance.
An endpoint can support 4 types of operations. From the WSDL specs:
WSDL has four transmission primitives that an endpoint can support:
- One-way. The endpoint receives a message.
- Request-response. The endpoint receives a message, and sends a correlated message.
- Solicit-response. The endpoint sends a message, and receives a correlated message.
- Notification. The endpoint sends a message.
The WS-I Profile seems to have a rule for supporting only two of them. From WS-I, Test Assertion: BP2208:
Context:
For a candidate wsdl:operation in a wsdl:portType definitionAssertion Description:
The wsdl:operation element is either a WSDL request/response or a one-way operation (no Notification or Sollicit-Response).Failure Message:
wsdl:operation was not a request/response or one-way operation.
Your updateManager
operation is a Notification
and from here your warning.
Clearing the error depends on you interoperability compliance needs. You can either ignore the warning (and then your service won't be 100% interoperability compliant) or you can fix it by changing the operation type (which depends on your application).