[WSDL Analyzer] No operation can be associated with the bind

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
daneel
Posts: 2
Joined: Wed Jun 01, 2005 8:11 am

[WSDL Analyzer] No operation can be associated with the bind

Post by daneel » Wed Jun 01, 2005 8:20 am

Hi,

I'm a beginner with web services and I'm trying to test the WSDL Soap analyzer function of OxygenXML/Eclipse to verify a very simple WSDL file :

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://www.larim.polymtl.ca/myapp/webservice"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ec="http://localhost:8080/myapp/webservice/Echo"
xmlns:simple="http://localhost:8080/myapp/ns/simple">
<!-- Type definitions -->
<wsdl:types>
<xs:schema targetNamespace="http://localhost:8080/myapp/ns/simple">
<xs:element name="echo" type="xs:string"/>
</xs:schema>
</wsdl:types>

<!-- Message definitions -->
<wsdl:message name="EchoRequest">
<wsdl:part name="echo" element="simple:echo"/>
</wsdl:message>
<wsdl:message name="EchoResponse">
<wsdl:part name="result" element="simple:echo"/>
</wsdl:message>

<!-- Port type definitions -->
<wsdl:portType name="EchoPortType">
<wsdl:operation name="echo">
<wsdl:input message="ec:EchoRequest"/>
<wsdl:output message="ec:EchoResponse"/>
</wsdl:operation>
</wsdl:portType>

<!-- Binding definitions -->
<wsdl:binding name="EchoSOAPBinding" type="ec:EchoPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="echo">
<soap:operation soapAction="http://localhost:8080/myapp/admin/webservice/Echo/echo"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>

<wsdl:service name="Echo">
<wsdl:port name="Echo" binding="ec:EchoSOAPBinding">
<soap:address location="http://localhost:8080/myapp/admin/webservice/Echo"/>
</wsdl:port>
</wsdl:service>

</wsdl:definitions>
The problem is that I don't manage to access the analyzer as I always get an error dialog box with the following message :
No operation can be associated with the binding:
{http://localhost:8080/myapp/admin/webse ... OAPBinding
Does anyone know how to decypher this enigmatic message ? Can you help me to find my mistake in my WSDL file ?

Thx in advance.
daneel

Radu
Posts: 7529
Joined: Fri Jul 09, 2004 5:18 pm

Post by Radu » Wed Jun 01, 2005 9:09 am

Hi,

The <wsdl:service> specifies a <wsdl:port> which points to a certain binding:

Code: Select all

 <wsdl:port name="Echo" binding="ec:EchoSOAPBinding"> 
The binding being described in the same document has the target namespace http://www.larim.polymtl.ca/myapp/webservice but the port tries to refer it with the proxy "ec" which is from target namespace http://localhost:8080/myapp/webservice/Echo.

So the error above specifies that there can be found no binding called EchoSOAPBinding from target namespace http://localhost:8080/myapp/admin/webservice/Echo

The solution is quite simple: the URLs to which the "targetNamespace" and the "xmlns:ec" attributes in the <wsdl:definitions> tag point to must be identical.


Hope this helps.
Regards, Radu.

daneel
Posts: 2
Joined: Wed Jun 01, 2005 8:11 am

Post by daneel » Wed Jun 01, 2005 6:36 pm

Thx a lot Radu... it's precisely the problem.
daneel

Post Reply