bpel invoke 报参数错误?

小猫王 发布于 2016/05/26 22:16
阅读 202
收藏 0
SOA

最近学习soa,照着网上的例子弄bpel,遇到个问题,没有解决的思路。

报这个异常:

Multiple annotations found at this line:
    - !!BPELC_PA__MSG_TYPE! [0=bpel:invoke,1=addOrder,2={http://schemas.xmlsoap.org/wsdl/}output,3=addOrderResponse,4={4},5={5}]
    - !!BPELC_PA__OMIT! [0=java.lang.IllegalArgumentException: Choice Pattern incorrect: 0#node <{4}> |2#attribute "{4}",1=java.lang.IllegalArgumentException,2={2},3={3},4={4},
     5={5}]
    - !!BPELC_PA__MSG_TYPE! [0=bpel:invoke,1=addOrder,2={http://schemas.xmlsoap.org/wsdl/}input,3=addOrder,4={4},5={5}]

bpel文件中,红色字体的地方报错:

<!-- orderPs BPEL Process [Generated by the Eclipse BPEL Designer] -->
<!-- Date: Thu May 26 21:15:56 CST 2016 -->
<bpel:process name="orderPs"
         targetNamespace="http://www.nonmore.com/bpel/order"
         suppressJoinFailure="yes"
         xmlns:tns="http://www.nonmore.com/bpel/order"
         xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
         xmlns:ns1="http://order/">

    <!-- Import the client WSDL -->
    <bpel:import namespace="http://order/" location="addOrder.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"></bpel:import>
    <bpel:import location="orderPsArtifacts.wsdl" namespace="http://www.nonmore.com/bpel/order"
            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:orderPs"
                     myRole="orderPsProvider"
                     />
        <bpel:partnerLink name="addPL" partnerLinkType="tns:addPLT" partnerRole="addProvider"></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:orderPsRequestMessage"/>
                  
        <!--
          Reference to the message that will be returned to the requester
          -->
        <bpel:variable name="output"
                  messageType="tns:orderPsResponseMessage"/>
        
        <bpel:variable name="addResponse" messageType="ns1:addOrderResponse"></bpel:variable>
        <bpel:variable name="addRequest" messageType="ns1:addOrder"></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 orderPs.wsdl
             -->
        <bpel:receive name="receiveInput" partnerLink="client"
                 portType="tns:orderPs"
                 operation="process" variable="input"
                 createInstance="yes"/>
        
        <!-- Generate reply to synchronous request -->
        
        <bpel:if name="If">
            <bpel:condition expressionLanguage="urn:oasis:names🇹🇨wsbpel:2.0:sublang:xpath1.0"><![CDATA[$input.payload/tns:orderid='abc']]></bpel:condition>
            <bpel:sequence name="Sequence">
                
                <bpel:assign validate="no" name="Assign">
                    <bpel:copy>
                        <bpel:from><bpel:literal><p:addOrder xmlns:p="http://order/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ordername>ordername</ordername>
  <price>price</price>
</p:addOrder>
</bpel:literal></bpel:from>
                        <bpel:to variable="addRequest" part="addOrder"></bpel:to>
                    </bpel:copy>
                    <bpel:copy>
                        <bpel:from part="payload" variable="input">
                            <bpel:query queryLanguage="urn:oasis:names🇹🇨wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:ordername]]></bpel:query>
                        </bpel:from>
                        <bpel:to part="addOrder" variable="addRequest">
                            <bpel:query queryLanguage="urn:oasis:names🇹🇨wsbpel:2.0:sublang:xpath1.0"><![CDATA[ordername]]></bpel:query>
                        </bpel:to>
                    </bpel:copy>
                    <bpel:copy>
                        <bpel:from part="payload" variable="input">
                            <bpel:query queryLanguage="urn:oasis:names🇹🇨wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:price]]></bpel:query>
                        </bpel:from>
                        <bpel:to part="addOrder" variable="addRequest">
                            <bpel:query queryLanguage="urn:oasis:names🇹🇨wsbpel:2.0:sublang:xpath1.0"><![CDATA[price]]></bpel:query>
                        </bpel:to>
                    </bpel:copy>
                </bpel:assign>
                
                <bpel:invoke name="Invoke" partnerLink="addPL" operation="addOrder" portType="ns1:Order" inputVariable="addRequest" outputVariable="addResponse"></bpel:invoke>
                <bpel:assign validate="no" name="Assign1">
                    <bpel:copy>
                        <bpel:from><bpel:literal><tns:orderPsResponse xmlns:tns="http://www.nonmore.com/bpel/order" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <tns:result>tns:result</tns:result>
</tns:orderPsResponse>
</bpel:literal></bpel:from>
                        <bpel:to variable="output" part="payload"></bpel:to>
                    </bpel:copy>
                    <bpel:copy>
                        <bpel:from part="addOrderResponse" variable="addResponse">
                            <bpel:query queryLanguage="urn:oasis:names🇹🇨wsbpel:2.0:sublang:xpath1.0"><![CDATA[return]]></bpel:query>
                        </bpel:from>
                        <bpel:to part="payload" variable="output">
                            <bpel:query queryLanguage="urn:oasis:names🇹🇨wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query>
                        </bpel:to>
                    </bpel:copy>
                </bpel:assign>
                
            </bpel:sequence>
        </bpel:if>
        <bpel:reply name="replyOutput" partnerLink="client" portType="tns:orderPs" operation="process" variable="output" />
    </bpel:sequence>
</bpel:process>



加载中
返回顶部
顶部