I am using Eclipse BPEL Designer and Apache ODE. When i deploy, i get this error :
error: [MessageVariableRequired] Cannot use non-message variable "getDetailInfoRequest" in this context (message variable is required).
Here is my BPEL Code :
<?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>
In my WSDL Source Main.wsdl
not include the message type :
<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>
After some search, i know i must add this following code :
<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>
But i don't know what the value of bpel:from
and bpel:to
. Cause my WSDL not explicitly include message type.
How can i fix it? Thank you.