2017-01-30 8 views
2

wso2 esb에 문제가 있습니다. 프록시를 작성했으며 원래 입력에서 일부 변경을 수행하기 위해 엔드 포인트를 호출합니다. 그러나 호출 전과 호출 후 로그는 동일합니다 (다른 값이어야합니다). 전화가 전혀 작동하지 않는 것 같습니다. 나에게 나가서 나올 때 null입니다. 왜 이런 일이 일어날 수 있을까요?wso2에서 호출이 작동하지 않는 이유 esb

 <inSequence> 
    <property name="transport.vfs.ReplyFileName" value="GET" scope="transport"/> 
    <property name="OUT_ONLY" value="true" scope="default" type="STRING"/> 
    <smooks config-key="smooks-csv1"> 
     <input type="text"/> 
     <output type="xml"/> 
    </smooks> 
    <iterate continueParent="true" 
       preservePayload="true" 
       attachPath="//csv-set" 
       expression="//csv-set/search" 
       sequential="true"> 
     <target> 
      <sequence> 
       <xslt key="gov:/first.xsl"/> 
       <xslt key="gov:/second.xsl"/> 
       **<log level="full"/> 
       <call blocking="true"> 
       <endpoint> 
        <address uri="MyEndPiont"/> 
       </endpoint> 
       </call> 
       <log level="full"/>** 
      </sequence> 
     </target> 
    </iterate> 
    <respond/> 
    </inSequence> 
    <outSequence> 
    <aggregate> 
     <completeCondition> 
      <messageCount min="0" max="100"/> 
     </completeCondition> 
     <onComplete expression="//Guest"> 
     </onComplete> 
    </aggregate> 
    </outSequence> 

답변

1

에서 인용. 변경 목록 :

  • 제거 된 respond 중재자.
  • callsend으로 바꿉니다.
  • send을 out 시퀀스에 추가했습니다.

    <inSequence> 
        <property name="transport.vfs.ReplyFileName" value="GET" scope="transport"/> 
        <property name="OUT_ONLY" value="true" scope="default" type="STRING"/> 
        <smooks config-key="smooks-csv1"> 
         <input type="text"/> 
         <output type="xml"/> 
        </smooks> 
        <iterate continueParent="true" 
           preservePayload="true" 
           attachPath="//csv-set" 
           expression="//csv-set/search" 
           sequential="true"> 
         <target> 
          <sequence> 
           <xslt key="gov:/first.xsl"/> 
           <xslt key="gov:/second.xsl"/> 
           <log level="full"/> 
           <send> 
           <endpoint> 
            <address uri="MyEndPiont"/> 
           </endpoint> 
           </send> 
          </sequence> 
         </target> 
        </iterate> 
        </inSequence> 
        <outSequence> 
        <aggregate> 
         <completeCondition> 
          <messageCount min="0" max="100"/> 
         </completeCondition> 
         <onComplete expression="//Guest"> 
         </onComplete> 
        </aggregate> 
        <send /> 
        </outSequence> 
    
+0

불행히도 이러한 변경 사항을 다시 나는 출력에서 ​​볼 수 없습니다. "VFSTransportSender VFS 파일 시스템 속성을 첨부하는 동안 오류가 발생했습니다 . ERROR - VFSTransportSender 메시지를 보낼 전송 정보를 확인할 수 없습니다."라는 오류 메시지가 나타납니다. 나는 어떻게해야합니까? 미리 감사드립니다 –

+0

'OUT_ONLY' 속성을 제거 해보시겠습니까? – Bee

+0

이것을 삭제하면 결과가 표시됩니다. 하지만 VFS를 사용하기 때문에 오류가 발생합니다. 이것은 비동기입니다. send 부분에서 응답을 파일에 쓰고 있습니다. 이것은 에러입니다 : "VFS 전송은 동기식 응답을 지원하지 않습니다. 적절한 (유일한) 메시지 교환 패턴을 사용하십시오" –

0

blocking="false"을 시도해보십시오 (나는 soupUI 내 엔드 포인트를 테스트 한)

이 내 프록시입니다. 이 변경을한다고해서 호출 중재자가 asynchonus가되는 것은 아닙니다. 블로킹 여부에 관계없이 동기식입니다. 블로킹은 구현 세부 사항 일뿐입니다. 이 시도

The Call mediator is used to send messages out of the ESB to an endpoint. You can invoke services either in blocking or non-blocking manner.

When you invoke a service in non-blocking mode, the underlying worker thread returns without waiting for the response. In blocking mode, the underlying worker thread gets blocked and waits for the response after sending the request to the endpoint. Call mediator in blocking mode is very much similar to the Callout mediator.

In both blocking and non-blocking modes, Call mediator behaves in a synchronous manner. Hence, mediation pauses after the service invocation and resumes from the next mediator in the sequence when the response is received. Call mediator allows you to create your configuration independent from the underlying architecture.

https://docs.wso2.com/display/ESB500/Call+Mediator

+0

나는 차단 = "false"로 변경,하지만 변화 ... –

+0

와이어 로그를 활성화하고 볼 수는 없다. http://lakshanigamage.blogspot.com/2015/03/how-to-enable-wire-logs-in-wso2-esbapim.html – Bee

+0

@ Bhathiya 매우 감사드립니다. 이제 콘솔에서 원하는 출력을 볼 수 있습니다. 하지만 정상적인 상태에서 나는 결과를 볼 수 없었던 이유는 무엇입니까? 이 결과를 어떻게 저장할 수 있습니까? –