使用WSO2开发人员Studio在BPEL中导入wsdl错误

时间:2014-01-09 09:38:47

标签: wsdl wso2 bpel wso2carbon apache-ode

我正在研究Eclipse WSO2 Developer studio中的BPEL示例,

我创建了3个BPEL工作流程加法,减法,乘法。

现在我想调用那些BPEL流程 我正在使用新的Bpel工作流程。

我正在尝试添加之前创建的合作伙伴链接,但我无法调用partnerlink(即使我尝试使用加法,减法,乘法)。

我收到了以下错误。

../WS_NumberAdderCarbon/AdderProcess/AdderProcessArtifacts.wsdl的导入位置不是  由此实施支持

我的BPEL代码: -

<bpel:process name="AdderProcess1"
         targetNamespace="http://NumberAdder.com"
         suppressJoinFailure="yes"
         xmlns:tns="http://NumberAdder.com"
         xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
         >

    <!-- Import the client WSDL -->
    <bpel:import namespace="http://NumberAdder.com" location="../WS_NumberAdderCarbon/AdderProcess/AdderProcessArtifacts.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"></bpel:import>
    <bpel:import location="AdderProcess1Artifacts.wsdl" namespace="http://NumberAdder.com" 
            importType="http://schemas.xmlsoap.org/wsdl/" />

    <!-- ================================================================= -->         
    <!-- PARTNERLINKS                                                      -->
    <!-- List of services participating in this BPEL process               -->
    <!-- ================================================================= -->         
    <bpel:partnerLinks>
        <!-- The 'client' role represents the requester of this service. -->
        <bpel:partnerLink name="client"
                     partnerLinkType="tns:AdderProcess1"
                     myRole="AdderProcess1Provider"
                     />
        <bpel:partnerLink name="fsdf" partnerLinkType="tns:AdderProcess" partnerRole="AdderProcessProvider"></bpel:partnerLink>
        <bpel:partnerLink name="getaddition" partnerLinkType="tns:AdderProcess" partnerRole="AdderProcessProvider"></bpel:partnerLink>
    </bpel:partnerLinks>

    <!-- ================================================================= -->         
    <!-- VARIABLES                                                         -->
    <!-- List of messages and XML documents used within this BPEL process  -->
    <!-- ================================================================= -->         
    <bpel:variables>
        <!-- Reference to the message passed as input during initiation -->
        <bpel:variable name="input"
                  messageType="tns:AdderProcess1RequestMessage"/>

        <!-- 
          Reference to the message that will be returned to the requester
          -->
        <bpel:variable name="output"
                  messageType="tns:AdderProcess1ResponseMessage"/>
        <bpel:variable name="fff" element="tns:AdderProcessRequest"></bpel:variable>
        <bpel:variable name="getvvar1" element="tns:AdderProcessRequest"></bpel:variable>
        <bpel:variable name="getvar2" element="tns:AdderProcessResponse"></bpel:variable>
    </bpel:variables>

    <!-- ================================================================= -->         
    <!-- ORCHESTRATION LOGIC                                               -->
    <!-- Set of activities coordinating the flow of messages across the    -->
    <!-- services integrated within this business process                  -->
    <!-- ================================================================= -->         
    <bpel:sequence name="main">

        <!-- Receive input from requester. 
             Note: This maps to operation defined in AdderProcess1.wsdl 
             -->
        <bpel:receive name="receiveInput" partnerLink="client"
                 portType="tns:AdderProcess1"
                 operation="process" variable="input"
                 createInstance="yes"/>

        <!-- Generate reply to synchronous request -->

        <bpel:invoke name="Invoke" partnerLink="fsdf">
            <bpel:toParts>
                <bpel:toPart part="payload" fromVariable="getvar2"></bpel:toPart>
            </bpel:toParts>
            <bpel:fromParts>
                <bpel:fromPart part="payload" toVariable="getvvar1"></bpel:fromPart>
            </bpel:fromParts>
        </bpel:invoke>
        <bpel:reply name="replyOutput" 
               partnerLink="client"
               portType="tns:AdderProcess1"
               operation="process" 
               variable="output"
               />
    </bpel:sequence>
</bpel:process>

1 个答案:

答案 0 :(得分:0)

在BPEL包中,在导入或调用新的webservice或wsdl时,将此wsdl放入BPEL Packge floder并转到BPEL的源视图并更正BPEL导入标记中新添加的wsdl位置。

`例如: -

 `<bpel:import namespace="http://NumberAdder.com" location="AdderProcessArtifacts.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"></bpel:import>`