2015-09-02 4 views
2

Я использую Eclipse BPEL Designer и Apache ODE. Когда я разворачивать, я получаю эту ошибку:BPEL Ошибка: [MessageVariableRequired] Невозможно использовать переменную non-message

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 явно не включает тип сообщения.

Как я могу это исправить? Спасибо.

ответ

2

ODE не поддерживает определение переменной как элемента, который будет использоваться в действиях получения и вызова. Пожалуйста, обратитесь к here! Следовательно, определите переменные bpel с типом messageType, который соответствует соответствующему сообщению wsdl.

Смежные вопросы