Hi

By default in Camel 1.x when invoking getOut() it will lazy create one.
So you should use getOut(false) and check for != null to avoid it
creating on lazy in case you want to print it to system out.
When an out is created it will not propagate headers from IN so that
could be the reason

There is an hasOut() boolean added in latest Camel release. you can
use to test whether an OUT message already exists.



On Tue, Aug 11, 2009 at 9:23 AM, inter<[email protected]> wrote:
>
> I debug it in eclipse and found  that:
>
> the "javax.jbi.messaging.protocol.headers" property was set in
> org.apache.servicemix.cxfbc.interceptors.JbiInInterceptor
>
> normalizedMessage.setProperty(CxfJbiConstants.PROTOCOL_HEADERS, headers);
>
>
> heards is empty,which is from  message.getHeaders
>
>  public List<Header> getHeaders() {
>        List<Header> heads =
> CastUtils.cast((List<?>)get(Header.HEADER_LIST));
>        if (heads == null) {
>            heads = new ArrayList<Header>();
>            put(Header.HEADER_LIST, heads);
>        }
>        return heads;
>    }
>
> it is empty,too.    It's strange.
> --
> View this message in context: 
> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24912928.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to