绑定中指定的操作没有为“Porttype”定义,但它是存在的,wsdl..帮助

发布于 2024-08-30 13:46:47 字数 3244 浏览 12 评论 0原文

这件事让我发疯...... 每当我尝试验证它时..它都会

<wsdl:operation name="ComposedClassOpt">

在下面的完整定义中给出错误...

“为“Binding”绑定指定的操作未为端口类型“CompositeClassPortType”定义。必须定义此绑定中指定的所有操作在端口类型“CompositionClassPortType”中。”

但操作是在PortType

plz谢谢。

    <?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>

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>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

挥剑断情 2024-09-06 13:46:50

我遇到了同样的错误,我将操作消息更改为包含名称,然后它就消失了:

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

固定

  <wsdl:operation name="fetch">
    <wsdl:input message="impl:fetchRequest" name="fetchRequest"/>
    <wsdl:output message="impl:fetchResponse" name="fetchResponse" />
  </wsdl:operation>
  • XML 格式。

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.
韵柒 2024-09-06 13:46:49

我遇到了类似的问题,并四处寻找解决方案。这对我有用。

对于绑定/操作/[输入、输出] - 删除“名称”属性。

这应该可以解决问题。虽然我回答这个问题很晚,但我希望将来有人可以利用这些信息,而不是像我一样挣扎。

参考这里的第4点:
http://article.gmane.org/gmane .text.xml.axis.devel/6085/match=matching+portType

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文