[ https://issues.apache.org/activemq/browse/CAMEL-2384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57032#action_57032 ]
Claus Ibsen commented on CAMEL-2384: ------------------------------------ You can also enable TRACE logging at: {{log4j.logger.org.apache.camel.component.bean=TRACE}} Which would output some info when Camel introspects the bean. Then it should output details about @Headers etc. In your bean you could try to see if you can get the parameter annotations using {code} Annotation[][] parametersAnnotations = method.getParameterAnnotations(); {code} > Getting header value in pojo using @Header annotation > ------------------------------------------------------ > > Key: CAMEL-2384 > URL: https://issues.apache.org/activemq/browse/CAMEL-2384 > Project: Apache Camel > Issue Type: Bug > Components: camel-core > Affects Versions: 2.1.0 > Environment: Windows xp, jdk 1.6 > Reporter: preben > > Header value (and body) is not bound in pojo method: > Route definiton: > camel:route trace="true" id="RapNotificationRoute"> > <camel:from > uri="oracleQueue:queue:FURTHERELEMENTS_TEST?jmsMessageType=Text"/> > <camel:transacted ref="PROPAGATION_REQUIRED"/> > <camel:wireTap uri="seda:audit"/> > <camel:to uri="mock:result"/> > </camel:route> > <camel:route id="AuditRoute"> > <camel:from uri="seda:audit"/> > <camel:bean ref="auditMessageDAO" method="audit"/> > </camel:route> > auditMessageDAO interface: > public void audit(@Body String body, @Header(value="JMSMessageID" > String jmsMessageId) > Trace from log when running: > [Camel thread 0: seda://audit] 20 jan. 2010 - 12:22:09,858 INFO > org.apache.camel.processor.interceptor.Tracer > [42a5443b-0a62-4477-885f-c6f6c40274b1 >>> (AuditRoute) from(seda://audit) --> > ref:auditMessageDAO method: audit <<< Pattern:InOnly, > Headers:{JMSDestination=PLAYLISTE.FURTHERELEMENTS_TEST, JMS_OracleDelay=0, > JMSDeliveryMode=2, JMSRedelivered=true, JMS_OracleTimestamp=1263986526156, > JMSType=null, JMSCorrelationID=null, JMSXRecvTimestamp=1263986529858, > JMSXState=0, JMSXDeliveryCount=2, > JMSMessageID=ID:7D97CBE346B7CAA2E040650A0A103AC2, JMSTimestamp=1263986526156, > JMSPriority=1, JMSXGroupID=null, JMS_OracleDeliveryMode=2, > JMSXUserID=playliste, JMSExpiration=0, JMSReplyTo=null}, BodyType:byte[], > Body:<?xml version="1.0" encoding="UTF-8" > standalone="yes"?><Publication>hidden</Publication>] > The exchange gets send (Evenen when using Oracle AQ) ;-) to the seda:audit > endpoint and the auditMessageDAO gets called. Body is bound to correct > payload but the header element JMSMessageID is null. If i change the > parameter to include @Headers Map the parameter is still null. > Current workaround is to use the Message, or Exchange as parameter, but then > my pojo will have dependencies on Camel - ok for now. > See thread : > http://old.nabble.com/wiretap-getting-header-value-ts27238444.html for > further details. > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.