2013-03-11 1 views
0

오류 순서를 처리 할 수 ​​있지만, 나는 1을 삭제해야 오류가 두번째 테이블 삽입에 발생하면 내가이 개 테이블에 삽입하고있는 동안 내 시나리오는 삭제 작업로를 사용자 정의 할 세인트 행 삽입 또한 내 구성은어떻게 내가 잘못 순서를 사용하여 오류를 처리 할 WSO2ESB

<proxy xmlns="http://ws.apache.org/ns/synapse" name="ErrorHandling" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> 
    <target > 
     <inSequence onError="fault"> 
     <property name="eno" expression="//eno/text()" scope="default" type="STRING"/> 
     <property name="ename" expression="//ename/text()" scope="default" type="STRING"/> 
     <property name="esal" expression="//esal/text()" scope="default" type="STRING"/> 
     <property name="deptname" expression="//deptname/text()" scope="default" type="STRING"/> 
     <property name="deptid" expression="//deptid/text()" scope="default" type="STRING"/> 
     <payloadFactory> 
      <format> 
       <p:insert_emp_operation xmlns:p="http://ws.wso2.org/dataservice"> 
        <xs:eno xmlns:xs="http://ws.wso2.org/dataservice">$1</xs:eno> 
        <xs:ename xmlns:xs="http://ws.wso2.org/dataservice">$2</xs:ename> 
        <xs:esal xmlns:xs="http://ws.wso2.org/dataservice">$3</xs:esal> 
       </p:insert_emp_operation> 
      </format> 
      <args> 
       <arg expression="get-property('eno')"/> 
       <arg expression="get-property('ename')"/> 
       <arg expression="get-property('esal')"/> 
      </args> 
     </payloadFactory> 
     <send receive="Error_Seq"> 
      <endpoint> 
       <address uri="http://localhost:9764/services/emp_DataService/" format="soap11"/> 
      </endpoint> 
     </send> 
     <log level="full"/> 
     </inSequence> 
     <outSequence onError="fault"> 
     <send/> 
     <log level="full"/> 
     </outSequence> 
    </target> 
    <description></description> 
</proxy> 

미만이

<sequence xmlns="http://ws.apache.org/ns/synapse" name="Error_Seq" onError="fault"> 
    <property xmlns:f="http://ws.wso2.org/dataservice" xmlns:ns="http://org.apache.synapse/xsd" name="ID" expression="//f:ID/text()" scope="default" type="STRING"/> 
    <log> 
     <property xmlns:ns="http://org.apache.synapse/xsd" name="faisal" expression="get-property('ID')"/> 
    </log> 
    <payloadFactory> 
     <format> 
     <p:insert_dept_operation xmlns:p="http://ws.wso2.org/dataservice"> 
      <xs:deptno xmlns:xs="http://ws.wso2.org/dataservice">$1</xs:deptno> 
      <xs:deptname xmlns:xs="http://ws.wso2.org/dataservice">$2</xs:deptname> 
      <xs:deptid xmlns:xs="http://ws.wso2.org/dataservice">$3</xs:deptid> 
     </p:insert_dept_operation> 
     </format> 
     <args> 
     <arg xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('ID')"/> 
     <arg xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('deptname')"/> 
     <arg xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('deptid')"/> 
     </args> 
    </payloadFactory> 
    <send> 
     <endpoint> 
     <address uri="http://localhost:9764/services/dept_DataService/" format="soap11"/> 
     </endpoint> 
    </send> 
</sequence> 

결함이

같은 sequenceis 유사 서열은

하지만 그것 DSS는 DSS 어떻게 업데이트가 DSS에 실패 할 때 시나리오에서는 1 테이블 행

답변

0

을 삭제하는 운전 모드에있을 때 알려 OFF 모드에있는 동안 그 작업을 작동하지 않습니다, 그것은 다시 보내드립니다 ESB에 대한 SOAP 오류. ESB 이후로 이것은 여전히 ​​또 다른 메시지 응답이며, 명시 적으로 메시지를 확인하고 필요한 조치를 취하지 않는 한 오류 순서를 따르지 않습니다. 그래서 당신은 오기 메시지를 SOAP_FAULT로 선언해야합니다. 그래서 당신은 그것이 SOAP_FAULT이고 에러 sequence로 강제적이라고 말할 수 있습니다. 이것은 [1]에 설명되어 있습니다.

[1] http://maharachchi.blogspot.com/2012/09/now-you-can-send-soapfaults-to-fault.html

+0

다른 4 개의 테이블에 삽입되는 4 개의 시퀀스가 ​​있습니다. 그래서 나는 단지 insequence에있는 다른 모든 순서에서이 속성을 정의 할 수 있습니다. – Faisal

+0

이것은 쿼리를 실행할 DSS 서비스를 호출하려고하는 모든 서비스 호출에 적용됩니다. 4 개의 테이블을 참조하는 4 개의 DSS 연산이 있고 ESB에서 4 개의 시퀀스로 호출 한 경우 네 개의 시퀀스 모두를 추가해야합니다. 많이 dharshana의 누군 시나리오 고맙습니다 – Dharshana

+0

내가 성공적으로 완료 모든 insertion..my 1 삽입 반환 genrated있는 키를 사용하여 insert..and 3 개 테이블을 사용하고 난 2 테이블하지만 오류로 데이터를 삽입하고 하나를 위반했다고 사용하여 키를 반환하고있다 두 번째 테이블에서 .i 첫 번째 테이블 데이터를 롤백하고 싶습니다.이 작업을 수행 할 수 있습니다. – Faisal

관련 문제