operation specified in binding is not defined for 'Porttype', but it is there, wsdl.. help

15.2k views Asked by At

this thing is driving me crazy... Whenever I try to validate it.. it gives me error at

<wsdl:operation name="ComposedClassOpt">

complete definition is below...

that "The operation specified for the 'Binding' binding is not defined for port type 'ComposedClassPortType'. All operations specified in this binding must be defined in port type 'ComposedClassPortType'."

But the operation is in the PortType

plz thank you.

    <?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="compose" targetNamespace="http://composeWsdl/"
 xmlns:wsdl2="http://BookService2/" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
 xmlns:wsdl1="http://BookService1/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
 xmlns:tns="http://composeWsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
 xmlns:xsdcomp="http://ComposedClass/">
 <wsdl:import namespace="http://BookService1/"
  location="/Users/adnan/Documents/workspace/TestBpel/BookService1.wsdl">
 </wsdl:import>
 <wsdl:import namespace="http://ComposedClass/"
  location="/Users/adnan/Documents/workspace/wsdlparse/ComposedClass.xsd">
 </wsdl:import>
 <wsdl:import namespace="http://BookService2/"
  location="/Users/adnan/Documents/workspace/TestBpel/BookService2.wsdl">
 </wsdl:import>
 <wsdl:message name="ComposedClassINMsg">
  <wsdl:part name="ComposedClassINMsgPayload" element="xsdcomp:ComposedClassIN">
  </wsdl:part>
 </wsdl:message>
 <wsdl:message name="fault">
  <wsdl:part name="FaultPayload" type="xsd:string">
  </wsdl:part>
 </wsdl:message>
 <wsdl:message name="ComposedClassResponseMsg">
  <wsdl:part name="ComposedClassResponseMsgPayload" element="xsdcomp:ComposedClassResponse">
  </wsdl:part>
 </wsdl:message>
 <wsdl:portType name="ComposedClassPortType">
  <wsdl:operation name="ComposedClassOpt">
   <wsdl:input name="ComposedClassINMsg" message="tns:ComposedClassINMsg">
   </wsdl:input>
   <wsdl:output name="ComposedClassResponseMsg" message="tns:ComposedClassResponseMsg">
   </wsdl:output>
   <wsdl:fault name="generalFault" message="tns:fault">
   </wsdl:fault>
  </wsdl:operation>
 </wsdl:portType>
 <wsdl:binding name="Binding" type="tns:ComposedClassPortType">
  <soap:binding style="rpc"
   transport="http://schemas.xmlsoap.org/soap/http" />
  <wsdl:operation name="ComposedClassOpt">

   <wsdl:input name="ComposedClassbindIn">
    <soap:body use="literal" />
   </wsdl:input>
   <wsdl:output name="ComposedClassbindOut">
    <soap:body use="literal" />
   </wsdl:output>
   <wsdl:fault name="BindingFault">
   </wsdl:fault>
  </wsdl:operation>
 </wsdl:binding>
 <wsdl:service name="service">
  <wsdl:port name="BindingPort" binding="tns:Binding">
   <soap:address location="http://localhost:8181/ode/processes/BindingPort" />
  </wsdl:port>
 </wsdl:service>
 <plnk:partnerLinkType name="BookServicePLT">
  <plnk:role name="BookServiceRole" portType="tns:ComposedClassPortType">
  </plnk:role>
 </plnk:partnerLinkType>
</wsdl:definitions>
2

There are 2 answers

0
Purnima On BEST ANSWER

I had a similar issue and looked around for a solution. This is what worked for me.

For the Binding/Operation/[Input, Output] - remove the "name" attributes.

This should fix the issue. Though I'm late in answering this, I hope in future some one might make use of this info and not struggle like I did.

Refer to the point 4 here: http://article.gmane.org/gmane.text.xml.axis.devel/6085/match=matching+portType

1
Dave B On

I had the same error, I changed the operation messages to include name and it went away:

i.e.

  <wsdl:operation name="fetch">
    <wsdl:input message="impl:fetchRequest"/>
    <wsdl:output message="impl:fetchResponse"/>
  </wsdl:operation>

to

  <wsdl:operation name="fetch">
    <wsdl:input message="impl:fetchRequest" name="fetchRequest"/>
    <wsdl:output message="impl:fetchResponse" name="fetchResponse" />
  </wsdl:operation>
  • Fixed XML formatting.