2017-11-13 3 views
0

저는 BPEL을 처음 사용하기 때문에 시작하는 데 어려움이 있습니다. Apache ODE BPEL soapenv : Server axis2ns1 : selectionFailure

내가 만일/그렇지 워크 플로우 간단한을 만들었지 만 이클립스 웹 서비스 탐색기와 WSDL 파일을 테스트하고 다음과 같은 오류가 점점 :

는 다른 유사한 질문에서 나의 이해는 아마 뭔가 매우 간단
soapenv:Server axis2ns1:selectionFailure 

입니다 if 조건에서 네임 스페이스 또는 변수 이름과 관련되어 있지만 그 이유와 그 해결 방법을 이해할 수 없습니다.

Eclipse 4.7.1 Oxygen 및 Tomcat 8.5에서 Apache ODE 1.3.7을 사용하고 있습니다.

workflow design

BPEL 파일 :

<!-- Flow1 BPEL Process [Generated by the Eclipse BPEL Designer] --> 
<!-- Date: Mon Nov 13 23:18:38 AST 2017 --> 
<bpel:process name="Flow1" 
     targetNamespace="http://Flow1" 
     suppressJoinFailure="yes" 
     xmlns:tns="http://Flow1" 
     xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" 
     > 

    <!-- Import the client WSDL --> 
    <bpel:import location="Flow1Artifacts.wsdl" namespace="http://Flow1" 
      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:Flow1" 
        myRole="Flow1Provider" 
        /> 
    </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:Flow1RequestMessage"/> 

     <!-- 
      Reference to the message that will be returned to the requester 
      --> 
     <bpel:variable name="output" 
        messageType="tns:Flow1ResponseMessage"/> 
    </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 Flow1.wsdl 
      --> 
     <bpel:receive name="receiveInput" partnerLink="client" 
       portType="tns:Flow1" 
       operation="process" variable="input" 
       createInstance="yes"/> 

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



     <bpel:if name="If"> 
      <bpel:condition expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[$input.payload/tns:input="John"]]></bpel:condition> 
     <bpel:sequence name="Sequence"> 
       <bpel:assign validate="no" name="Assign"> 
        <bpel:copy> 
         <bpel:from> 
          <bpel:literal xml:space="preserve">Hi John</bpel:literal> 
         </bpel:from> 
         <bpel:to part="payload" variable="output"> 
          <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query> 
         </bpel:to> 
        </bpel:copy> 
       </bpel:assign> 
       <bpel:reply name="replyOutput" partnerLink="client" portType="tns:Flow1" operation="process" variable="output" /> 

      </bpel:sequence> 
      <bpel:else> 
       <bpel:sequence name="Sequence1"> 
        <bpel:assign validate="no" name="Assign1"> 
         <bpel:copy> 
          <bpel:from> 
           <bpel:literal xml:space="preserve">Not john</bpel:literal> 
          </bpel:from> 
          <bpel:to part="payload" variable="output"> 
           <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query> 
          </bpel:to> 
         </bpel:copy> 
        </bpel:assign> 
        <bpel:reply name="Reply" partnerLink="client" operation="process" portType="tns:Flow1" variable="output"></bpel:reply> 
       </bpel:sequence> 
      </bpel:else> 

     </bpel:if> 
    </bpel:sequence> 
</bpel:process> 

WSDL 파일 :

<?xml version="1.0"?> 
<definitions name="Flow1" 
     targetNamespace="http://Flow1" 
     xmlns:tns="http://Flow1" 
     xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" 
     xmlns="http://schemas.xmlsoap.org/wsdl/" 
     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
     > 

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    TYPE DEFINITION - List of types participating in this BPEL process 
    The BPEL Designer will generate default request and response types 
    but you can define or import any XML Schema type and use them as part 
    of the message types. 
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->  
    <types> 
     <schema attributeFormDefault="unqualified" elementFormDefault="qualified" 
       targetNamespace="http://Flow1" 
       xmlns="http://www.w3.org/2001/XMLSchema"> 

      <element name="Flow1Request"> 
       <complexType> 
        <sequence> 
         <element name="input" type="string"/> 
        </sequence> 
       </complexType> 
      </element> 

      <element name="Flow1Response"> 
       <complexType> 
        <sequence> 
         <element name="result" type="string"/> 
        </sequence> 
       </complexType> 
      </element> 
     </schema> 
    </types> 


<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    MESSAGE TYPE DEFINITION - Definition of the message types used as 
    part of the port type defintions 
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->  
    <message name="Flow1RequestMessage"> 
     <part name="payload" element="tns:Flow1Request"/> 
    </message> 
    <message name="Flow1ResponseMessage"> 
     <part name="payload" element="tns:Flow1Response"/> 
    </message> 

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    PORT TYPE DEFINITION - A port type groups a set of operations into 
    a logical service unit. 
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->  

    <!-- portType implemented by the Flow1 BPEL process --> 
    <portType name="Flow1"> 
     <operation name="process"> 
      <input message="tns:Flow1RequestMessage" /> 
      <output message="tns:Flow1ResponseMessage"/> 
     </operation> 
    </portType> 
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    PARTNER LINK TYPE DEFINITION 
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->  
    <plnk:partnerLinkType name="Flow1"> 
     <plnk:role name="Flow1Provider" portType="tns:Flow1"/> 
    </plnk:partnerLinkType> 


<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    BINDING DEFINITION - Defines the message format and protocol details 
    for a web service. 
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> 
    <binding name="Flow1Binding" type="tns:Flow1"> 
     <soap:binding style="document" 
      transport="http://schemas.xmlsoap.org/soap/http" /> 
     <operation name="process"> 
      <soap:operation 
       soapAction="http://Flow1/process" /> 
      <input> 
       <soap:body use="literal" /> 
      </input> 
      <output> 
       <soap:body use="literal" /> 
      </output> 
     </operation> 
    </binding> 

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    SERVICE DEFINITION - A service groups a set of ports into 
    a service unit. 
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> 
    <service name="Flow1Service"> 
     <port name="Flow1Port" binding="tns:Flow1Binding"> 
      <soap:address location="http://localhost:8084/ode/processes/Flow1" /> 
     </port> 
    </service> 
</definitions> 

및 Deploy.xml

내 워크 플로우 디자인

답변

1

SelectionFailure는 쿼리중인 xml 요소를 찾을 수 없음을 나타냅니다. BPEL을 살펴보면, 출력 변수가 초기화되기 전에 쿼리되고 있다고 가정합니다.

<bpel:assign validate="no" name="initialize"> 
    <bpel:copy> 
     <bpel:from> 
      <bpel:literal xml:space="preserve"> 
       <tns:Flow1Response xmlns:tns="http://Flow1"><tns:result /></tns:Flow1Response> 
      </bpel:literal> 
     </bpel:from> 
     <bpel:to part="payload" variable="output" /> 
    </bpel:copy> 
</bpel:assign> 
:

은/다른 경우가 전에 출력 변수를 초기화

관련 문제