3

我正在使用 Eclipse BPEL Designer 插件创建服务编排,但它自动生成的 WSDL 文件存在问题。

这是 WSDL:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws.invocation.import" xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" xmlns:wsdl="http://services.lolsystem.it" name="ImportOrchestration" targetNamespace="http://ws.invocation.import">

   <plnk:partnerLinkType name="ImportType">
      <plnk:role name="ImportRole" portType="wsdl:ImportServicePortType"/>
   </plnk:partnerLinkType>
   <import location="ImportModule.wsdl" namespace="http://services.italsystem.it"/>
<types>
   <schema xmlns="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://ws.invocation.import">

     <element name="ImportOrchestrationRequest" type="tns:ImportOrchestrationReqType">
           </element>

   <element name="singleEntry">
            <complexType>
                <sequence>
                    <element minOccurs="0" name="name" nillable="true" type="string"/>
                    <element minOccurs="0" name="content" nillable="true" type="base64Binary"/>
                </sequence>
            </complexType>
        </element>

              <element name="ImportOrchestrationResponse">
            <complexType>
                <sequence>
                    <element name="result" type="string"/>
                </sequence>
            </complexType>
        </element>

        <complexType name="ImportOrchestrationReqType">
            <sequence minOccurs="1" maxOccurs="unbounded">
                <element name="file" type="tns:SingleFile"></element>
            </sequence>
        </complexType>

        <complexType name="SingleFile">
            <sequence>
                <element name="name" type="string"></element>
                <element name="content" type="base64Binary"></element>
            </sequence>
        </complexType>
    </schema>
</types>


<message name="ImportOrchestrationRequestMessage">
    <part name="payload" type="tns:ImportOrchestrationReqType"/>
</message>
<message name="ImportOrchestrationResponseMessage">
    <part element="tns:ImportOrchestrationResponse" name="payload"/>
</message>


<!-- portType implemented by the ImportOrchestration BPEL process -->
<portType name="ImportOrchestration">
    <operation name="process">
        <input message="tns:ImportOrchestrationRequestMessage"/>
        <output message="tns:ImportOrchestrationResponseMessage"/>
    </operation>
</portType>   

<plnk:partnerLinkType name="ImportOrchestration">
    <plnk:role name="ImportOrchestrationProvider" portType="tns:ImportOrchestration"/>
</plnk:partnerLinkType>


<binding name="ImportOrchestrationBinding" type="tns:ImportOrchestration">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="process">
        <soap:operation soapAction="http://ws.invocation.import/process"/>
        <input>
            <soap:body use="literal"/>
        </input>
        <output>
            <soap:body use="literal"/>
        </output>
    </operation>
</binding>


<service name="ImportOrchestration">
    <port binding="tns:ImportOrchestrationBinding" name="ImportOrchestrationPort">
        <soap:address location="http://localhost:8080/ode/processes/ImportOrchestration"/>
    </port>
</service>
</definitions>

现在,问题在于 Eclipse for Eclipse 验证器的 WSDL 格式正确。我使用 Apache ODE 作为 BPEL 引擎,它基于 Axis2。问题是当我尝试部署我的 BPEL 进程时,Axis 引擎给了我一个错误,它是:

“没有为消息 ImportOrchestrationRequestMessage 定义元素类型”

有人可以给我一些建议来理解这个错误以及如何纠正它吗?提前致谢 :)

4

1 回答 1

5

你可以尝试以下
<message name="ImportOrchestrationRequestMessage"> <part name="payload" element="tns:ImportOrchestrationRequest"/> </message>

问题是您的绑定是文档文字,在这种情况下,应该使用“元素”而不是“类型”来配置消息部分

高温高压

于 2012-06-13T11:00:46.657 回答