web-services - WSDL:没有为消息定义元素类型

标签 web-services wsdl axis2 bpel apache-ode

我正在使用 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 的 Eclipse 验证器 WSDL 结构良好。 我使用 Apache ODE 作为 BPEL 引擎,它基于 Axis2。 问题是当我尝试部署我的 BPEL 过程时,Axis 引擎给我一个错误,它是:

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

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

最佳答案

你能试试看
<message name="ImportOrchestrationRequestMessage"> <part name="payload" element="tns:ImportOrchestrationRequest"/> </message>

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

HTH

关于web-services - WSDL:没有为消息定义元素类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11012074/

相关文章:

c# - WCF 服务在第一次调用时达到高内存使用率

android - 如何检测另一个应用程序何时使用我的网络服务?

java - 为 Java 中的 WCF 服务生成代理和 PHP 重复消息错误

xml - 在 Axis2 中使用 XML 1.1

java - 请求 POJO AXIS2 Web 服务的参数未传递给 POJO

asp.net - 从 wsdl 生成 Web 服务

java - 使用 Sonar Web 服务 Java 客户端

web-services - 如何在 WSDL 中将 SOAP header 标记为可选?

PHP 解析来自 SOAP 客户端的 SOAP XML 响应