2

私は Eclipse BPEL Designer と Apache ODE を使用しています。デプロイすると、次のエラーが発生します。

error: [MessageVariableRequired] Cannot use non-message variable "getDetailInfoRequest" in this context (message variable is required).

ここに私のBPELコードがあります:

<?xml version="1.0" encoding="UTF-8"?>
<bpel:process exitOnStandardFault="yes" name="lngProcess.bpel"
    targetNamespace="http://services.lng"
    xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:ns="http://services.lngArtifacts" xmlns:ns0="http://services.lng">
    <bpel:import importType="http://schemas.xmlsoap.org/wsdl/"
        location="Main.wsdl" namespace="http://services.lng"/>
    <bpel:import importType="http://schemas.xmlsoap.org/wsdl/"
        location="lngProcessArtifacts.wsdl" namespace="http://services.lngArtifacts"/>
    <bpel:partnerLinks>
        <bpel:partnerLink myRole="MainPortTypeRole"
            name="bpelProcessPartner" partnerLinkType="ns:MainPortTypePLT"/>
    </bpel:partnerLinks>
    <bpel:variables>
        <bpel:variable element="ns0:getDetailInfo" name="getDetailInfoRequest"/>
        <bpel:variable element="ns0:getDetailInfoResponse" name="getDetailInfoResponse"/>
        <bpel:variable element="ns0:getSummaryInvoice" name="getSummaryInvoiceRequest"/>
    </bpel:variables>
    <bpel:sequence name="MainSequence">
        <bpel:pick createInstance="yes" name="SwitchInvokedOperation">
            <bpel:onMessage operation="getDetailInfo"
                partnerLink="bpelProcessPartner"
                portType="ns0:MainPortType" variable="getDetailInfoRequest">
                <bpel:reply name="ReplyToGetDetailInfo"
                    operation="getDetailInfo"
                    partnerLink="bpelProcessPartner"
                    portType="ns0:MainPortType" variable="getDetailInfoResponse"/>
            </bpel:onMessage>
            <bpel:onMessage operation="getSummaryInvoice"
                partnerLink="bpelProcessPartner"
                portType="ns0:MainPortType" variable="getSummaryInvoiceRequest">
                <bpel:reply name="ReplyToGetSummaryInvoice"
                    operation="getSummaryInvoice"
                    partnerLink="bpelProcessPartner"
                    portType="ns0:MainPortType" variable="getSummaryInvoiceResponse"/>
            </bpel:onMessage>
        </bpel:pick>
        <bpel:assign validate="no" name="AssignGetDetailInfo">
            <bpel:copy>
                <bpel:from>
                    <literal>
                        <message xmlns="">
                            <parameters></parameters>
                        </message>
                    </literal>
                </bpel:from>
                <bpel:to></bpel:to>
            </bpel:copy>
        </bpel:assign>
    </bpel:sequence>
</bpel:process>

私のWSDLソースMain.wsdlにはメッセージタイプが含まれていません:

<wsdl:message name="getDetailInfoRequest">
        <wsdl:part name="parameters" element="ns:getDetailInfo"/>
    </wsdl:message>
    <wsdl:message name="getDetailInfoResponse">
        <wsdl:part name="parameters" element="ns:getDetailInfoResponse"/>
    </wsdl:message>
    <wsdl:message name="getSummaryInvoiceRequest">
        <wsdl:part name="parameters" element="ns:getSummaryInvoice"/>
    </wsdl:message>

いくつかの検索の後、次のコードを追加する必要があることがわかりました。

<bpel:assign validate="no" name="AssignGetDetailInfo">
            <bpel:copy>
                <bpel:from>
                    <literal>
                        <message xmlns="">
                            <parameters></parameters>
                        </message>
                    </literal>
                </bpel:from>
                <bpel:to></bpel:to>
            </bpel:copy>
        </bpel:assign>

bpel:fromしかし、との値がわかりませんbpel:to。WSDL にメッセージ タイプが明示的に含まれていないことが原因です。

どうすれば修正できますか?ありがとうございました。

4

1 に答える 1