2014-01-20 2 views
0

낙타 루트에서 신체에서 요청을 기록하는 방법이 있습니까? 로그카멜 루트로 요청 표시

<camel:log message="RequestType [${request.body.request}]" loggingLevel="INFO" /> 

오류 :

Caused by: org.apache.camel.language.simple.types.SimpleParserException: Unknown function: request.body.request 

이 일부 작동하지만 필드에 가져 오는 방법을 몰라한다 : 확실히

 <camel:log message="RequestType ${in.body}" loggingLevel="INFO" /> 
     <camel:log message="RequestType2 [${body}]" loggingLevel="INFO" /> 

요청 필드 것은 나중에 난 becaue 빈 아니다 확인 :

<camel:ognl>request.body.request instanceof ... 

답변

3

<camel:log message="RequestType [${body.request}]" loggingLevel="INFO" /> 

낙타와 시도 : 로그는 여기에 대한 자세한 내용을보실 수 있습니다 간단한 언어를 사용하고 있습니다 : http://camel.apache.org/simple

+0

오류 [# 3 낙타 (ccgwContext) 스레드 - 스레드] coreV2 : (145) - 예기치 않은 예외가 발생 coure route v2.0을 처리하는 중 [메소드 : : org.apache.camel.language.bean.bean.RuntimeBeanExpressionException으로 인해 .request를 호출하지 못했습니다 : 메소드를 호출하는 데 실패했습니다 잠시 후 이상한 원인이 있습니다. 이걸 사용하고 있으면 작동합니다 : request.body.request instanceof pl.gtp.vas.ccgw.model.transport. ChargeRequest

+0

$ {body} 및 $ {body.class}을 (를) 기록하면 어떻게됩니까? – vikingsteve

+0

그것은 작동, 나는 몸 안에있는 모든 필드를 받게됩니다. 또한 요청하십시오! –