You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by inter <ga...@126.com> on 2009/08/11 10:46:50 UTC

Re: When JBiMsg sent from cxf-bc to camel,javax.jbi.messaging.protocol.headers was lost.


Thanks for your answer,Claus Ibsen-2!

But what confused me is that:
why getIn()'s headers is empty?


Claus Ibsen-2 wrote:
> 
> 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<ga...@126.com> 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
> 
> 

-- 
View this message in context: http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24913922.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.