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 07:45:06 UTC

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

I used cxf-bc-consumer,cxf-bc-provider and camel like follows:

  --------------------------------------------------------------------
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
       http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">

  <camelContext id="camel"
xmlns="http://activemq.apache.org/camel/schema/spring">
 
    <route>
    	<from uri="jbi:service:http://server/HelloWorldPre"/>
    	<process ref="dealProperty" /> 
             <to uri="jbi:service:http://server/HelloWorld"/>
             <process ref="dealProperty" />
    </route>
  </camelContext>
  
<bean id="dealProperty"
class="org.apache.servicemix.tutorial.camel.dealPropertyProcessor"/> 
	
</beans>
-----------------------------------------------------------------------

"dealProperty"is a camel-processor to print the exchange's details;

when i send a request to cxf-bc,the processor print this:


JbiMessage:
org.apache.servicemix.jbi.messaging.NormalizedMessageImpl@1277ffa{properties:
{javax.jbi.messaging.protocol.headers={}}}Exchange[JbiMessage:
org.apache.servicemix.jbi.messaging.NormalizedMessageImpl@1277ffa{properties:
{javax.jbi.messaging.protocol.headers={}}}]InOut[
  id: ID:192.168.1.27-123073a49d8-4:4
  status: Active
  role: provider
  service: {http://server}HelloWorldPre
  endpoint: camel192-168-1-27-123073a49d8-30-0
  operation: {http://server}sayHello
  in: <?xml version="1.0" encoding="UTF-8"?><jbi:message
xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"
xmlns:msg="http://server" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="sayHelloRequest"
type="msg:sayHelloRequest" version="1.0"><jbi:part><q0:sayHello
xmlns:q0="http://server">
<q0:in0>test</q0:in0>
</q0:sayHello></jbi:part></jbi:message>


Take care of the bold lines, the "javax.jbi.messaging.protocol.headers" was 
empty. 
But should not it contain http heads?

if I want to get the client's ip address in camel-processor,what should i
do?

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


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

Posted by inter <ga...@126.com>.

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.


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

Posted by Claus Ibsen <cl...@gmail.com>.
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

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

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Seems you miss my previous answer...

You should use cxf consumer out interceptor or cxf provider out  
interceptor.
Freeman
On 2009-8-12, at 下午4:54, inter wrote:

>
>
> Hi,
> I tried a provide-IN-interceptor, and get MessageExchange in two ways:
>
> "message.getContent(MessageExchange.class)"
>
> "message.get(MessageExchange.class)"
>
> Both of them returned null.
>
> Waiting for help...............
>
>
> Freeman Fang wrote:
>>
>> Use Phase.POST_INVOKE should work
>>
>> Freeman
>>>
>>> Should i try to get it with a  cxf-provider-in-interceptor?
>>> In which phase should i di it?
>>>
>>> Freeman Fang wrote:
>>>>
>>>>
>>>> On 2009-8-11, at 下午5:51, inter wrote:
>>>>
>>>>>
>>>>>
>>>>> Does it only contain soapheaders?
>>>>> I have considered it containing http heades at least.
>>>>> Then how can i get client's ip and access uri in a camel  
>>>>> processor?
>>>>> I just want to record a client's in-time and out-time and it's ip
>>>>> address.
>>>>> I know I can do that with a cxf in-interceptor and a  out-
>>>>> interceptor,but I
>>>>> have no way to  ensure the both records were generated by the same
>>>>> request.
>>>>> In camel-processor,i can use the exchange id to match them,but I
>>>>> can't get
>>>>> the ip and request uri.
>>>> Using In/Out cxf interceptors you also can use
>>>> MessageExchange .getExchangeId() to match them,
>>>>
>>>> from the cxf message in the interceptors, do like
>>>> MessageExchange exchange = message
>>>>                    .getContent(MessageExchange.class);
>>>>
>>>> to get MessageExchage
>>>>
>>>> Freeman
>>>>
>>>>> Freeman,would you like to give me some ideas?
>>>>>
>>>>>
>>>>> Freeman Fang wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> That's because there's no soap headers in your message at all per
>>>>>> your
>>>>>> wsdl model
>>>>>>
>>>>>> Freeman
>>>>>> On 2009-8-11, at 下午3:23, inter 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.
>>>>>>>
>>>>>>
>>>>>>
>>>>>> -- 
>>>>>> Freeman Fang
>>>>>> ------------------------
>>>>>> Open Source SOA: http://fusesource.com
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> -- 
>>>>> View this message in context:
>>>>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24914659.html
>>>>> Sent from the ServiceMix - User mailing list archive at  
>>>>> Nabble.com.
>>>>>
>>>>
>>>>
>>>> -- 
>>>> Freeman Fang
>>>> ------------------------
>>>> Open Source SOA: http://fusesource.com
>>>>
>>>>
>>>>
>>>
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24931315.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>
>>
>> -- 
>> Freeman Fang
>> ------------------------
>> Open Source SOA: http://fusesource.com
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24931877.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com


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

Posted by inter <ga...@126.com>.

Hi,
I tried a provide-IN-interceptor, and get MessageExchange in two ways:

"message.getContent(MessageExchange.class)"

"message.get(MessageExchange.class)"

Both of them returned null.

Waiting for help............... 


Freeman Fang wrote:
> 
> Use Phase.POST_INVOKE should work
> 
> Freeman
>>
>> Should i try to get it with a  cxf-provider-in-interceptor?
>> In which phase should i di it?
>>
>> Freeman Fang wrote:
>>>
>>>
>>> On 2009-8-11, at 下午5:51, inter wrote:
>>>
>>>>
>>>>
>>>> Does it only contain soapheaders?
>>>> I have considered it containing http heades at least.
>>>> Then how can i get client's ip and access uri in a camel processor?
>>>> I just want to record a client's in-time and out-time and it's ip
>>>> address.
>>>> I know I can do that with a cxf in-interceptor and a  out-
>>>> interceptor,but I
>>>> have no way to  ensure the both records were generated by the same
>>>> request.
>>>> In camel-processor,i can use the exchange id to match them,but I
>>>> can't get
>>>> the ip and request uri.
>>> Using In/Out cxf interceptors you also can use
>>> MessageExchange .getExchangeId() to match them,
>>>
>>> from the cxf message in the interceptors, do like
>>> MessageExchange exchange = message
>>>                     .getContent(MessageExchange.class);
>>>
>>> to get MessageExchage
>>>
>>> Freeman
>>>
>>>> Freeman,would you like to give me some ideas?
>>>>
>>>>
>>>> Freeman Fang wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> That's because there's no soap headers in your message at all per
>>>>> your
>>>>> wsdl model
>>>>>
>>>>> Freeman
>>>>> On 2009-8-11, at 下午3:23, inter 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.
>>>>>>
>>>>>
>>>>>
>>>>> -- 
>>>>> Freeman Fang
>>>>> ------------------------
>>>>> Open Source SOA: http://fusesource.com
>>>>>
>>>>>
>>>>>
>>>>
>>>> -- 
>>>> View this message in context:
>>>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24914659.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>
>>>
>>> -- 
>>> Freeman Fang
>>> ------------------------
>>> Open Source SOA: http://fusesource.com
>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24931315.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
> 
> 
> -- 
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
> 
> 
> 

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


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

Posted by Freeman Fang <fr...@gmail.com>.
On 2009-8-12, at 下午8:31, inter wrote:

>
> Great Thanks for your help,Freeman Fang!
> I got my problem resolved and had a deeper understanding for
> cxf's PHASE.
Great it's working for you
>
> Are you chinese? :)
Yeah, I'm Chinese

Freeman
>
>
> Freeman Fang wrote:
>>
>> Sorry, use Phase.POST_INVOKE for cxf bc consumer inInterceptor.
>> In this phase, the jbi MessageExchange get back to cxf bc  
>> consumer(the
>> flow is cxf bc consumer==>servicemix-camel==>cxf bc
>> provider==>external server===>back to==>cxf bc provider==>servicemix-
>> camel===>cxf bc consumer), so I believe it's suitable  for your
>> requirement.
>>
>> Freeman
>> On 2009-8-12, at 下午6:08, inter wrote:
>>
>>>
>>>
>>> Does an out interceptor have PHASE.POST_INVOKE?
>>>
>>> Freeman Fang wrote:
>>>>
>>>> You should use cxf consumer out interceptor or cxf provider out
>>>> interceptor
>>>> Freeman
>>>> On 2009-8-12, at 下午4:11, inter wrote:
>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> I tried a provide-IN-interceptor, and get MessageExchange in both
>>>>> ways:
>>>>> "message.getContent(MessageExchange.class)"
>>>>> "message.get(MessageExchange.class)"
>>>>>
>>>>> both of them returned null
>>>>>
>>>>> Freeman Fang wrote:
>>>>>>
>>>>>> Use Phase.POST_INVOKE should work
>>>>>>
>>>>>> Freeman
>>>>>>>
>>>>>>> Should i try to get it with a  cxf-provider-in-interceptor?
>>>>>>> In which phase should i di it?
>>>>>>>
>>>>>>> Freeman Fang wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> On 2009-8-11, at 下午5:51, inter wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Does it only contain soapheaders?
>>>>>>>>> I have considered it containing http heades at least.
>>>>>>>>> Then how can i get client's ip and access uri in a camel
>>>>>>>>> processor?
>>>>>>>>> I just want to record a client's in-time and out-time and it's
>>>>>>>>> ip
>>>>>>>>> address.
>>>>>>>>> I know I can do that with a cxf in-interceptor and a  out-
>>>>>>>>> interceptor,but I
>>>>>>>>> have no way to  ensure the both records were generated by the
>>>>>>>>> same
>>>>>>>>> request.
>>>>>>>>> In camel-processor,i can use the exchange id to match  
>>>>>>>>> them,but I
>>>>>>>>> can't get
>>>>>>>>> the ip and request uri.
>>>>>>>> Using In/Out cxf interceptors you also can use
>>>>>>>> MessageExchange .getExchangeId() to match them,
>>>>>>>>
>>>>>>>> from the cxf message in the interceptors, do like
>>>>>>>> MessageExchange exchange = message
>>>>>>>>                  .getContent(MessageExchange.class);
>>>>>>>>
>>>>>>>> to get MessageExchage
>>>>>>>>
>>>>>>>> Freeman
>>>>>>>>
>>>>>>>>> Freeman,would you like to give me some ideas?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Freeman Fang wrote:
>>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> That's because there's no soap headers in your message at all
>>>>>>>>>> per
>>>>>>>>>> your
>>>>>>>>>> wsdl model
>>>>>>>>>>
>>>>>>>>>> Freeman
>>>>>>>>>> On 2009-8-11, at 下午3:23, inter 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.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> -- 
>>>>>>>>>> Freeman Fang
>>>>>>>>>> ------------------------
>>>>>>>>>> Open Source SOA: http://fusesource.com
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> -- 
>>>>>>>>> View this message in context:
>>>>>>>>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24914659.html
>>>>>>>>> Sent from the ServiceMix - User mailing list archive at
>>>>>>>>> Nabble.com.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> -- 
>>>>>>>> Freeman Fang
>>>>>>>> ------------------------
>>>>>>>> Open Source SOA: http://fusesource.com
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> -- 
>>>>>>> View this message in context:
>>>>>>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24931315.html
>>>>>>> Sent from the ServiceMix - User mailing list archive at
>>>>>>> Nabble.com.
>>>>>>>
>>>>>>
>>>>>>
>>>>>> -- 
>>>>>> Freeman Fang
>>>>>> ------------------------
>>>>>> Open Source SOA: http://fusesource.com
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> -- 
>>>>> View this message in context:
>>>>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24931670.html
>>>>> Sent from the ServiceMix - User mailing list archive at  
>>>>> Nabble.com.
>>>>>
>>>>
>>>>
>>>> -- 
>>>> Freeman Fang
>>>> ------------------------
>>>> Open Source SOA: http://fusesource.com
>>>>
>>>>
>>>>
>>>
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24932649.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>
>>
>> -- 
>> Freeman Fang
>> ------------------------
>> Open Source SOA: http://fusesource.com
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24935472.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com


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

Posted by inter <ga...@126.com>.
Great Thanks for your help,Freeman Fang!
I got my problem resolved and had a deeper understanding for 
cxf's PHASE.

Are you chinese? :)


Freeman Fang wrote:
> 
> Sorry, use Phase.POST_INVOKE for cxf bc consumer inInterceptor.
> In this phase, the jbi MessageExchange get back to cxf bc consumer(the  
> flow is cxf bc consumer==>servicemix-camel==>cxf bc  
> provider==>external server===>back to==>cxf bc provider==>servicemix- 
> camel===>cxf bc consumer), so I believe it's suitable  for your  
> requirement.
> 
> Freeman
> On 2009-8-12, at 下午6:08, inter wrote:
> 
>>
>>
>> Does an out interceptor have PHASE.POST_INVOKE?
>>
>> Freeman Fang wrote:
>>>
>>> You should use cxf consumer out interceptor or cxf provider out
>>> interceptor
>>> Freeman
>>> On 2009-8-12, at 下午4:11, inter wrote:
>>>
>>>>
>>>> Hi,
>>>>
>>>> I tried a provide-IN-interceptor, and get MessageExchange in both
>>>> ways:
>>>> "message.getContent(MessageExchange.class)"
>>>> "message.get(MessageExchange.class)"
>>>>
>>>> both of them returned null
>>>>
>>>> Freeman Fang wrote:
>>>>>
>>>>> Use Phase.POST_INVOKE should work
>>>>>
>>>>> Freeman
>>>>>>
>>>>>> Should i try to get it with a  cxf-provider-in-interceptor?
>>>>>> In which phase should i di it?
>>>>>>
>>>>>> Freeman Fang wrote:
>>>>>>>
>>>>>>>
>>>>>>> On 2009-8-11, at 下午5:51, inter wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Does it only contain soapheaders?
>>>>>>>> I have considered it containing http heades at least.
>>>>>>>> Then how can i get client's ip and access uri in a camel
>>>>>>>> processor?
>>>>>>>> I just want to record a client's in-time and out-time and it's  
>>>>>>>> ip
>>>>>>>> address.
>>>>>>>> I know I can do that with a cxf in-interceptor and a  out-
>>>>>>>> interceptor,but I
>>>>>>>> have no way to  ensure the both records were generated by the  
>>>>>>>> same
>>>>>>>> request.
>>>>>>>> In camel-processor,i can use the exchange id to match them,but I
>>>>>>>> can't get
>>>>>>>> the ip and request uri.
>>>>>>> Using In/Out cxf interceptors you also can use
>>>>>>> MessageExchange .getExchangeId() to match them,
>>>>>>>
>>>>>>> from the cxf message in the interceptors, do like
>>>>>>> MessageExchange exchange = message
>>>>>>>                   .getContent(MessageExchange.class);
>>>>>>>
>>>>>>> to get MessageExchage
>>>>>>>
>>>>>>> Freeman
>>>>>>>
>>>>>>>> Freeman,would you like to give me some ideas?
>>>>>>>>
>>>>>>>>
>>>>>>>> Freeman Fang wrote:
>>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> That's because there's no soap headers in your message at all  
>>>>>>>>> per
>>>>>>>>> your
>>>>>>>>> wsdl model
>>>>>>>>>
>>>>>>>>> Freeman
>>>>>>>>> On 2009-8-11, at 下午3:23, inter 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.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> -- 
>>>>>>>>> Freeman Fang
>>>>>>>>> ------------------------
>>>>>>>>> Open Source SOA: http://fusesource.com
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> -- 
>>>>>>>> View this message in context:
>>>>>>>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24914659.html
>>>>>>>> Sent from the ServiceMix - User mailing list archive at
>>>>>>>> Nabble.com.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -- 
>>>>>>> Freeman Fang
>>>>>>> ------------------------
>>>>>>> Open Source SOA: http://fusesource.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> -- 
>>>>>> View this message in context:
>>>>>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24931315.html
>>>>>> Sent from the ServiceMix - User mailing list archive at  
>>>>>> Nabble.com.
>>>>>>
>>>>>
>>>>>
>>>>> -- 
>>>>> Freeman Fang
>>>>> ------------------------
>>>>> Open Source SOA: http://fusesource.com
>>>>>
>>>>>
>>>>>
>>>>
>>>> -- 
>>>> View this message in context:
>>>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24931670.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>
>>>
>>> -- 
>>> Freeman Fang
>>> ------------------------
>>> Open Source SOA: http://fusesource.com
>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24932649.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
> 
> 
> -- 
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
> 
> 
> 

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


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

Posted by Freeman Fang <fr...@gmail.com>.
Sorry, use Phase.POST_INVOKE for cxf bc consumer inInterceptor.
In this phase, the jbi MessageExchange get back to cxf bc consumer(the  
flow is cxf bc consumer==>servicemix-camel==>cxf bc  
provider==>external server===>back to==>cxf bc provider==>servicemix- 
camel===>cxf bc consumer), so I believe it's suitable  for your  
requirement.

Freeman
On 2009-8-12, at 下午6:08, inter wrote:

>
>
> Does an out interceptor have PHASE.POST_INVOKE?
>
> Freeman Fang wrote:
>>
>> You should use cxf consumer out interceptor or cxf provider out
>> interceptor
>> Freeman
>> On 2009-8-12, at 下午4:11, inter wrote:
>>
>>>
>>> Hi,
>>>
>>> I tried a provide-IN-interceptor, and get MessageExchange in both
>>> ways:
>>> "message.getContent(MessageExchange.class)"
>>> "message.get(MessageExchange.class)"
>>>
>>> both of them returned null
>>>
>>> Freeman Fang wrote:
>>>>
>>>> Use Phase.POST_INVOKE should work
>>>>
>>>> Freeman
>>>>>
>>>>> Should i try to get it with a  cxf-provider-in-interceptor?
>>>>> In which phase should i di it?
>>>>>
>>>>> Freeman Fang wrote:
>>>>>>
>>>>>>
>>>>>> On 2009-8-11, at 下午5:51, inter wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Does it only contain soapheaders?
>>>>>>> I have considered it containing http heades at least.
>>>>>>> Then how can i get client's ip and access uri in a camel
>>>>>>> processor?
>>>>>>> I just want to record a client's in-time and out-time and it's  
>>>>>>> ip
>>>>>>> address.
>>>>>>> I know I can do that with a cxf in-interceptor and a  out-
>>>>>>> interceptor,but I
>>>>>>> have no way to  ensure the both records were generated by the  
>>>>>>> same
>>>>>>> request.
>>>>>>> In camel-processor,i can use the exchange id to match them,but I
>>>>>>> can't get
>>>>>>> the ip and request uri.
>>>>>> Using In/Out cxf interceptors you also can use
>>>>>> MessageExchange .getExchangeId() to match them,
>>>>>>
>>>>>> from the cxf message in the interceptors, do like
>>>>>> MessageExchange exchange = message
>>>>>>                   .getContent(MessageExchange.class);
>>>>>>
>>>>>> to get MessageExchage
>>>>>>
>>>>>> Freeman
>>>>>>
>>>>>>> Freeman,would you like to give me some ideas?
>>>>>>>
>>>>>>>
>>>>>>> Freeman Fang wrote:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> That's because there's no soap headers in your message at all  
>>>>>>>> per
>>>>>>>> your
>>>>>>>> wsdl model
>>>>>>>>
>>>>>>>> Freeman
>>>>>>>> On 2009-8-11, at 下午3:23, inter 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.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> -- 
>>>>>>>> Freeman Fang
>>>>>>>> ------------------------
>>>>>>>> Open Source SOA: http://fusesource.com
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> -- 
>>>>>>> View this message in context:
>>>>>>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24914659.html
>>>>>>> Sent from the ServiceMix - User mailing list archive at
>>>>>>> Nabble.com.
>>>>>>>
>>>>>>
>>>>>>
>>>>>> -- 
>>>>>> Freeman Fang
>>>>>> ------------------------
>>>>>> Open Source SOA: http://fusesource.com
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> -- 
>>>>> View this message in context:
>>>>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24931315.html
>>>>> Sent from the ServiceMix - User mailing list archive at  
>>>>> Nabble.com.
>>>>>
>>>>
>>>>
>>>> -- 
>>>> Freeman Fang
>>>> ------------------------
>>>> Open Source SOA: http://fusesource.com
>>>>
>>>>
>>>>
>>>
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24931670.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>
>>
>> -- 
>> Freeman Fang
>> ------------------------
>> Open Source SOA: http://fusesource.com
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24932649.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com


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

Posted by inter <ga...@126.com>.

Does an out interceptor have PHASE.POST_INVOKE?

Freeman Fang wrote:
> 
> You should use cxf consumer out interceptor or cxf provider out  
> interceptor
> Freeman
> On 2009-8-12, at 下午4:11, inter wrote:
> 
>>
>> Hi,
>>
>> I tried a provide-IN-interceptor, and get MessageExchange in both  
>> ways:
>> "message.getContent(MessageExchange.class)"
>> "message.get(MessageExchange.class)"
>>
>> both of them returned null
>>
>> Freeman Fang wrote:
>>>
>>> Use Phase.POST_INVOKE should work
>>>
>>> Freeman
>>>>
>>>> Should i try to get it with a  cxf-provider-in-interceptor?
>>>> In which phase should i di it?
>>>>
>>>> Freeman Fang wrote:
>>>>>
>>>>>
>>>>> On 2009-8-11, at 下午5:51, inter wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> Does it only contain soapheaders?
>>>>>> I have considered it containing http heades at least.
>>>>>> Then how can i get client's ip and access uri in a camel  
>>>>>> processor?
>>>>>> I just want to record a client's in-time and out-time and it's ip
>>>>>> address.
>>>>>> I know I can do that with a cxf in-interceptor and a  out-
>>>>>> interceptor,but I
>>>>>> have no way to  ensure the both records were generated by the same
>>>>>> request.
>>>>>> In camel-processor,i can use the exchange id to match them,but I
>>>>>> can't get
>>>>>> the ip and request uri.
>>>>> Using In/Out cxf interceptors you also can use
>>>>> MessageExchange .getExchangeId() to match them,
>>>>>
>>>>> from the cxf message in the interceptors, do like
>>>>> MessageExchange exchange = message
>>>>>                    .getContent(MessageExchange.class);
>>>>>
>>>>> to get MessageExchage
>>>>>
>>>>> Freeman
>>>>>
>>>>>> Freeman,would you like to give me some ideas?
>>>>>>
>>>>>>
>>>>>> Freeman Fang wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> That's because there's no soap headers in your message at all per
>>>>>>> your
>>>>>>> wsdl model
>>>>>>>
>>>>>>> Freeman
>>>>>>> On 2009-8-11, at 下午3:23, inter 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.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -- 
>>>>>>> Freeman Fang
>>>>>>> ------------------------
>>>>>>> Open Source SOA: http://fusesource.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> -- 
>>>>>> View this message in context:
>>>>>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24914659.html
>>>>>> Sent from the ServiceMix - User mailing list archive at  
>>>>>> Nabble.com.
>>>>>>
>>>>>
>>>>>
>>>>> -- 
>>>>> Freeman Fang
>>>>> ------------------------
>>>>> Open Source SOA: http://fusesource.com
>>>>>
>>>>>
>>>>>
>>>>
>>>> -- 
>>>> View this message in context:
>>>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24931315.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>
>>>
>>> -- 
>>> Freeman Fang
>>> ------------------------
>>> Open Source SOA: http://fusesource.com
>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24931670.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
> 
> 
> -- 
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
> 
> 
> 

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


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

Posted by Freeman Fang <fr...@gmail.com>.
You should use cxf consumer out interceptor or cxf provider out  
interceptor
Freeman
On 2009-8-12, at 下午4:11, inter wrote:

>
> Hi,
>
> I tried a provide-IN-interceptor, and get MessageExchange in both  
> ways:
> "message.getContent(MessageExchange.class)"
> "message.get(MessageExchange.class)"
>
> both of them returned null
>
> Freeman Fang wrote:
>>
>> Use Phase.POST_INVOKE should work
>>
>> Freeman
>>>
>>> Should i try to get it with a  cxf-provider-in-interceptor?
>>> In which phase should i di it?
>>>
>>> Freeman Fang wrote:
>>>>
>>>>
>>>> On 2009-8-11, at 下午5:51, inter wrote:
>>>>
>>>>>
>>>>>
>>>>> Does it only contain soapheaders?
>>>>> I have considered it containing http heades at least.
>>>>> Then how can i get client's ip and access uri in a camel  
>>>>> processor?
>>>>> I just want to record a client's in-time and out-time and it's ip
>>>>> address.
>>>>> I know I can do that with a cxf in-interceptor and a  out-
>>>>> interceptor,but I
>>>>> have no way to  ensure the both records were generated by the same
>>>>> request.
>>>>> In camel-processor,i can use the exchange id to match them,but I
>>>>> can't get
>>>>> the ip and request uri.
>>>> Using In/Out cxf interceptors you also can use
>>>> MessageExchange .getExchangeId() to match them,
>>>>
>>>> from the cxf message in the interceptors, do like
>>>> MessageExchange exchange = message
>>>>                    .getContent(MessageExchange.class);
>>>>
>>>> to get MessageExchage
>>>>
>>>> Freeman
>>>>
>>>>> Freeman,would you like to give me some ideas?
>>>>>
>>>>>
>>>>> Freeman Fang wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> That's because there's no soap headers in your message at all per
>>>>>> your
>>>>>> wsdl model
>>>>>>
>>>>>> Freeman
>>>>>> On 2009-8-11, at 下午3:23, inter 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.
>>>>>>>
>>>>>>
>>>>>>
>>>>>> -- 
>>>>>> Freeman Fang
>>>>>> ------------------------
>>>>>> Open Source SOA: http://fusesource.com
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> -- 
>>>>> View this message in context:
>>>>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24914659.html
>>>>> Sent from the ServiceMix - User mailing list archive at  
>>>>> Nabble.com.
>>>>>
>>>>
>>>>
>>>> -- 
>>>> Freeman Fang
>>>> ------------------------
>>>> Open Source SOA: http://fusesource.com
>>>>
>>>>
>>>>
>>>
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24931315.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>
>>
>> -- 
>> Freeman Fang
>> ------------------------
>> Open Source SOA: http://fusesource.com
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24931670.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com


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

Posted by inter <ga...@126.com>.
Hi,

I tried a provide-IN-interceptor, and get MessageExchange in both ways:
"message.getContent(MessageExchange.class)"
"message.get(MessageExchange.class)"

both of them returned null

Freeman Fang wrote:
> 
> Use Phase.POST_INVOKE should work
> 
> Freeman
>>
>> Should i try to get it with a  cxf-provider-in-interceptor?
>> In which phase should i di it?
>>
>> Freeman Fang wrote:
>>>
>>>
>>> On 2009-8-11, at 下午5:51, inter wrote:
>>>
>>>>
>>>>
>>>> Does it only contain soapheaders?
>>>> I have considered it containing http heades at least.
>>>> Then how can i get client's ip and access uri in a camel processor?
>>>> I just want to record a client's in-time and out-time and it's ip
>>>> address.
>>>> I know I can do that with a cxf in-interceptor and a  out-
>>>> interceptor,but I
>>>> have no way to  ensure the both records were generated by the same
>>>> request.
>>>> In camel-processor,i can use the exchange id to match them,but I
>>>> can't get
>>>> the ip and request uri.
>>> Using In/Out cxf interceptors you also can use
>>> MessageExchange .getExchangeId() to match them,
>>>
>>> from the cxf message in the interceptors, do like
>>> MessageExchange exchange = message
>>>                     .getContent(MessageExchange.class);
>>>
>>> to get MessageExchage
>>>
>>> Freeman
>>>
>>>> Freeman,would you like to give me some ideas?
>>>>
>>>>
>>>> Freeman Fang wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> That's because there's no soap headers in your message at all per
>>>>> your
>>>>> wsdl model
>>>>>
>>>>> Freeman
>>>>> On 2009-8-11, at 下午3:23, inter 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.
>>>>>>
>>>>>
>>>>>
>>>>> -- 
>>>>> Freeman Fang
>>>>> ------------------------
>>>>> Open Source SOA: http://fusesource.com
>>>>>
>>>>>
>>>>>
>>>>
>>>> -- 
>>>> View this message in context:
>>>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24914659.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>
>>>
>>> -- 
>>> Freeman Fang
>>> ------------------------
>>> Open Source SOA: http://fusesource.com
>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24931315.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
> 
> 
> -- 
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
> 
> 
> 

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


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

Posted by Freeman Fang <fr...@gmail.com>.
On 2009-8-12, at 下午3:27, inter wrote:

>
> Hi,Freeman
>
> I got MessageExchage  successfuly  with a cxf-consunmer-in- 
> interceptor in
> PHASE PRE_INVOKE.
>
> But i can not get it  in  each Phase with a  cxf-consunmer-out- 
> interceptor.

Use Phase.POST_INVOKE should work

Freeman
>
> Should i try to get it with a  cxf-provider-in-interceptor?
> In which phase should i di it?
>
> Freeman Fang wrote:
>>
>>
>> On 2009-8-11, at 下午5:51, inter wrote:
>>
>>>
>>>
>>> Does it only contain soapheaders?
>>> I have considered it containing http heades at least.
>>> Then how can i get client's ip and access uri in a camel processor?
>>> I just want to record a client's in-time and out-time and it's ip
>>> address.
>>> I know I can do that with a cxf in-interceptor and a  out-
>>> interceptor,but I
>>> have no way to  ensure the both records were generated by the same
>>> request.
>>> In camel-processor,i can use the exchange id to match them,but I
>>> can't get
>>> the ip and request uri.
>> Using In/Out cxf interceptors you also can use
>> MessageExchange .getExchangeId() to match them,
>>
>> from the cxf message in the interceptors, do like
>> MessageExchange exchange = message
>>                     .getContent(MessageExchange.class);
>>
>> to get MessageExchage
>>
>> Freeman
>>
>>> Freeman,would you like to give me some ideas?
>>>
>>>
>>> Freeman Fang wrote:
>>>>
>>>> Hi,
>>>>
>>>> That's because there's no soap headers in your message at all per
>>>> your
>>>> wsdl model
>>>>
>>>> Freeman
>>>> On 2009-8-11, at 下午3:23, inter 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.
>>>>>
>>>>
>>>>
>>>> -- 
>>>> Freeman Fang
>>>> ------------------------
>>>> Open Source SOA: http://fusesource.com
>>>>
>>>>
>>>>
>>>
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24914659.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>
>>
>> -- 
>> Freeman Fang
>> ------------------------
>> Open Source SOA: http://fusesource.com
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24931315.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com


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

Posted by inter <ga...@126.com>.
Hi,Freeman

I got MessageExchage  successfuly  with a cxf-consunmer-in-interceptor in
PHASE PRE_INVOKE.

But i can not get it  in  each Phase with a  cxf-consunmer-out-interceptor.

Should i try to get it with a  cxf-provider-in-interceptor?
In which phase should i di it?

Freeman Fang wrote:
> 
> 
> On 2009-8-11, at 下午5:51, inter wrote:
> 
>>
>>
>> Does it only contain soapheaders?
>> I have considered it containing http heades at least.
>> Then how can i get client's ip and access uri in a camel processor?
>> I just want to record a client's in-time and out-time and it's ip  
>> address.
>> I know I can do that with a cxf in-interceptor and a  out- 
>> interceptor,but I
>> have no way to  ensure the both records were generated by the same  
>> request.
>> In camel-processor,i can use the exchange id to match them,but I  
>> can't get
>> the ip and request uri.
> Using In/Out cxf interceptors you also can use  
> MessageExchange .getExchangeId() to match them,
> 
> from the cxf message in the interceptors, do like
> MessageExchange exchange = message
>                      .getContent(MessageExchange.class);
> 
> to get MessageExchage
> 
> Freeman
> 
>> Freeman,would you like to give me some ideas?
>>
>>
>> Freeman Fang wrote:
>>>
>>> Hi,
>>>
>>> That's because there's no soap headers in your message at all per  
>>> your
>>> wsdl model
>>>
>>> Freeman
>>> On 2009-8-11, at 下午3:23, inter 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.
>>>>
>>>
>>>
>>> -- 
>>> Freeman Fang
>>> ------------------------
>>> Open Source SOA: http://fusesource.com
>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24914659.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
> 
> 
> -- 
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
> 
> 
> 

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


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

Posted by Freeman Fang <fr...@gmail.com>.
On 2009-8-11, at 下午5:51, inter wrote:

>
>
> Does it only contain soapheaders?
> I have considered it containing http heades at least.
> Then how can i get client's ip and access uri in a camel processor?
> I just want to record a client's in-time and out-time and it's ip  
> address.
> I know I can do that with a cxf in-interceptor and a  out- 
> interceptor,but I
> have no way to  ensure the both records were generated by the same  
> request.
> In camel-processor,i can use the exchange id to match them,but I  
> can't get
> the ip and request uri.
Using In/Out cxf interceptors you also can use  
MessageExchange .getExchangeId() to match them,

from the cxf message in the interceptors, do like
MessageExchange exchange = message
                     .getContent(MessageExchange.class);

to get MessageExchage

Freeman

> Freeman,would you like to give me some ideas?
>
>
> Freeman Fang wrote:
>>
>> Hi,
>>
>> That's because there's no soap headers in your message at all per  
>> your
>> wsdl model
>>
>> Freeman
>> On 2009-8-11, at 下午3:23, inter 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.
>>>
>>
>>
>> -- 
>> Freeman Fang
>> ------------------------
>> Open Source SOA: http://fusesource.com
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24914659.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com


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

Posted by inter <ga...@126.com>.

Does it only contain soapheaders?
I have considered it containing http heades at least.
Then how can i get client's ip and access uri in a camel processor?
I just want to record a client's in-time and out-time and it's ip address.
I know I can do that with a cxf in-interceptor and a  out-interceptor,but I
have no way to  ensure the both records were generated by the same request.
In camel-processor,i can use the exchange id to match them,but I can't get
the ip and request uri.
Freeman,would you like to give me some ideas?


Freeman Fang wrote:
> 
> Hi,
> 
> That's because there's no soap headers in your message at all per your  
> wsdl model
> 
> Freeman
> On 2009-8-11, at 下午3:23, inter 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.
>>
> 
> 
> -- 
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
> 
> 
> 

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


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

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

That's because there's no soap headers in your message at all per your  
wsdl model

Freeman
On 2009-8-11, at 下午3:23, inter 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.
>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com


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

Posted by inter <ga...@126.com>.
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.


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

Posted by inter <ga...@126.com>.

Hi,
thanks for your quick answer,FreeMan.

yes,my workFlow is cxf-bc consumer ==> servicemix-camel==>cxf-bc provider.

dealProperty  was invoked  two times to get InMsg and OutMsg.

This is my Processor codes:
-----------------------------------------------------
public void process(Exchange exchange) throws Exception
 {
    	
    JbiMessage inMsg = (JbiMessage)exchange.getIn();
    JbiMessage outMsg = (JbiMessage)exchange.getOut();
    JbiExchange jbiExin =  inMsg.getExchange();
    JbiExchange jbiExout = outMsg.getExchange(); 
    MessageExchange meIn = jbiExin.getMessageExchange();
    MessageExchange meOut = jbiExout.getMessageExchange();
    NormalizedMessage nmIn = jbiExin.getInMessage();
    NormalizedMessage nmOut = jbiExout.getInMessage();
    System.out.println("=====in========");
    System.out.println(inMsg);
    System.out.println(jbiExin);
    System.out.println(meIn);
    System.out.println(nmIn);
    System.out.println("=====out========"); 
    System.out.println(outMsg);
    System.out.println(jbiExout);
    System.out.println(meOut);
    System.out.println(nmOut);
    System.out.println("=====over========");
---------------------------------------------------------

The first time invoked ,it printed:
-----------------------------------------------
=====in========
JbiMessage:
org.apache.servicemix.jbi.messaging.NormalizedMessageImpl@1277ffa{properties:
{javax.jbi.messaging.protocol.headers={}}}
Exchange[JbiMessage:
org.apache.servicemix.jbi.messaging.NormalizedMessageImpl@1277ffa{properties:
{javax.jbi.messaging.protocol.headers={}}}]
InOut[
  id: ID:192.168.1.27-123073a49d8-4:4
  status: Active
  role: provider
  service: {http://server}HelloWorldPre
  endpoint: camel192-168-1-27-123073a49d8-30-0
  operation: {http://server}sayHello
  in: <?xml version="1.0" encoding="UTF-8"?><jbi:message
xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"
xmlns:msg="http://server" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="sayHelloRequest"
type="msg:sayHelloRequest" version="1.0"><jbi:part><q0:sayHello
xmlns:q0="http://server">
<q0:in0>11111111111111111111111111</q0:in0>
</q0:sayHello></jbi:part></jbi:message>
  out: null
]
org.apache.servicemix.jbi.messaging.NormalizedMessageImpl@1277ffa{properties:
{javax.jbi.messaging.protocol.headers={}}}
=====out========
JbiMessage:
org.apache.servicemix.jbi.messaging.NormalizedMessageImpl@433333{properties:
{}}
Exchange[JbiMessage:
org.apache.servicemix.jbi.messaging.NormalizedMessageImpl@1277ffa{properties:
{javax.jbi.messaging.protocol.headers={}}}]
InOut[
  id: ID:192.168.1.27-123073a49d8-4:4
  status: Active
  role: provider
  service: {http://server}HelloWorldPre
  endpoint: camel192-168-1-27-123073a49d8-30-0
  operation: {http://server}sayHello
  in: <?xml version="1.0" encoding="UTF-8"?><jbi:message
xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"
xmlns:msg="http://server" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="sayHelloRequest"
type="msg:sayHelloRequest" version="1.0"><jbi:part><q0:sayHello
xmlns:q0="http://server">
<q0:in0>11111111111111111111111111</q0:in0>
</q0:sayHello></jbi:part></jbi:message>
  out: null
]
org.apache.servicemix.jbi.messaging.NormalizedMessageImpl@1277ffa{properties:
{javax.jbi.messaging.protocol.headers={}}}
=====over========
-----------------------------------------------
the second time invoked ,it printed:
---------------------------------------------------------
=====in========
JbiMessage:
org.apache.servicemix.jbi.messaging.NormalizedMessageImpl@1277ffa{properties:
{javax.jbi.messaging.protocol.headers={}}}
Exchange[JbiMessage:
org.apache.servicemix.jbi.messaging.NormalizedMessageImpl@1277ffa{properties:
{javax.jbi.messaging.protocol.headers={}}}]
InOut[
  id: ID:192.168.1.27-123073a49d8-4:4
  status: Active
  role: provider
  service: {http://server}HelloWorldPre
  endpoint: camel192-168-1-27-123073a49d8-30-0
  operation: {http://server}sayHello
  in: <?xml version="1.0" encoding="UTF-8"?><jbi:message
xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"
xmlns:msg="http://server" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="sayHelloResponse" type="msg:sayHelloResponse"
version="1.0"><jbi:part><ns1:sayHelloResponse
xmlns:ns1="http://server"><ns1:out>Hello!!!11111111111111111111111111</ns1:out></ns1:sayHelloResponse></jbi:part></jbi:message>
  out: <?xml version="1.0" encoding="UTF-8"?><jbi:message
xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"
xmlns:msg="http://server" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="sayHelloResponse" type="msg:sayHelloResponse"
version="1.0"><jbi:part><ns1:sayHelloResponse
xmlns:ns1="http://server"><ns1:out>Hello!!!11111111111111111111111111</ns1:out></ns1:sayHelloResponse></jbi:part></jbi:message>
]
DEBUG - SedaQueue                      -
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@c9d448 dequeued
exchange: InOut[
  id: ID:192.168.1.27-123073a49d8-3:3
  status: Done
  role: provider
  service: {http://server}HelloWorld
  endpoint: HelloWorldHttpPort
  operation: {http://server}sayHello
  in: <?xml version="1.0" encoding="UTF-8"?><jbi:message
xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"
xmlns:msg="http://server" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="sayHelloRequest"
type="msg:sayHelloRequest" version="1.0"><jbi:part><q0:sayHello
xmlns:q0="http://server">
<q0:in0>11111111111111111111111111</q0:in0>
</q0:sayHello></jbi:part></jbi:message>
  out: <?xml version="1.0" encoding="UTF-8"?><jbi:message
xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"
xmlns:msg="http://server" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="sayHelloResponse" type="msg:sayHelloResponse"
version="1.0"><jbi:part><ns1:sayHelloResponse
xmlns:ns1="http://server"><ns1:out>Hello!!!11111111111111111111111111</ns1:out></ns1:sayHelloResponse></jbi:part></jbi:message>
]
org.apache.servicemix.jbi.messaging.NormalizedMessageImpl@1277ffa{properties:
{javax.jbi.messaging.protocol.headers={}}}
=====out========
JbiMessage:
org.apache.servicemix.jbi.messaging.NormalizedMessageImpl@433333{properties:
{}}
Exchange[JbiMessage:
org.apache.servicemix.jbi.messaging.NormalizedMessageImpl@1277ffa{properties:
{javax.jbi.messaging.protocol.headers={}}}]
InOut[
  id: ID:192.168.1.27-123073a49d8-4:4
  status: Active
  role: provider
  service: {http://server}HelloWorldPre
  endpoint: camel192-168-1-27-123073a49d8-30-0
  operation: {http://server}sayHello
  in: <?xml version="1.0" encoding="UTF-8"?><jbi:message
xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"
xmlns:msg="http://server" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="sayHelloResponse" type="msg:sayHelloResponse"
version="1.0"><jbi:part><ns1:sayHelloResponse
xmlns:ns1="http://server"><ns1:out>Hello!!!11111111111111111111111111</ns1:out></ns1:sayHelloResponse></jbi:part></jbi:message>
  out: <?xml version="1.0" encoding="UTF-8"?><jbi:message
xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"
xmlns:msg="http://server" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="sayHelloResponse" type="msg:sayHelloResponse"
version="1.0"><jbi:part><ns1:sayHelloResponse
xmlns:ns1="http://server"><ns1:out>Hello!!!11111111111111111111111111</ns1:out></ns1:sayHelloResponse></jbi:part></jbi:message>
]
DEBUG - CxfBcComponent                 - Received exchange: status: Done,
role: provider
org.apache.servicemix.jbi.messaging.NormalizedMessageImpl@1277ffa{properties:
{javax.jbi.messaging.protocol.headers={}}}
=====over========
---------------------------------------------------------

Freeman Fang wrote:
> 
> Hi,
> Could you explain more about your work flow?
> Is it cxf-bc consumer ==> servicemix-camel==>cxf-bc provider?
> 
> And there's two times dealProperty get invoked in your camel context,  
> from which one you see lost the javax.jbi.messaging.protocol.headers?
> Could you append both output for dealProperty?
> 
> Freeman
> On 2009-8-11, at 下午1:45, inter wrote:
> 
>>
>> I used cxf-bc-consumer,cxf-bc-provider and camel like follows:
>>
>>  --------------------------------------------------------------------
>> <beans xmlns="http://www.springframework.org/schema/beans"
>>       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>       xsi:schemaLocation="
>>       http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>>       http://activemq.apache.org/camel/schema/spring
>> http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>>
>>  <camelContext id="camel"
>> xmlns="http://activemq.apache.org/camel/schema/spring">
>>
>>    <route>
>>    	<from uri="jbi:service:http://server/HelloWorldPre"/>
>>    	<process ref="dealProperty" />
>>             <to uri="jbi:service:http://server/HelloWorld"/>
>>             <process ref="dealProperty" />
>>    </route>
>>  </camelContext>
>>
>> <bean id="dealProperty"
>> class="org.apache.servicemix.tutorial.camel.dealPropertyProcessor"/>
>> 	
>> </beans>
>> -----------------------------------------------------------------------
>>
>> "dealProperty"is a camel-processor to print the exchange's details;
>>
>> when i send a request to cxf-bc,the processor print this:
>>
>>
>> JbiMessage:
>> org 
>> .apache 
>> .servicemix.jbi.messaging.NormalizedMessageImpl@1277ffa{properties:
>> {javax.jbi.messaging.protocol.headers={}}}Exchange[JbiMessage:
>> org 
>> .apache 
>> .servicemix.jbi.messaging.NormalizedMessageImpl@1277ffa{properties:
>> {javax.jbi.messaging.protocol.headers={}}}]InOut[
>>  id: ID:192.168.1.27-123073a49d8-4:4
>>  status: Active
>>  role: provider
>>  service: {http://server}HelloWorldPre
>>  endpoint: camel192-168-1-27-123073a49d8-30-0
>>  operation: {http://server}sayHello
>>  in: <?xml version="1.0" encoding="UTF-8"?><jbi:message
>> xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"
>> xmlns:msg="http://server" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
>> name="sayHelloRequest"
>> type="msg:sayHelloRequest" version="1.0"><jbi:part><q0:sayHello
>> xmlns:q0="http://server">
>> <q0:in0>test</q0:in0>
>> </q0:sayHello></jbi:part></jbi:message>
>>
>>
>> Take care of the bold lines, the  
>> "javax.jbi.messaging.protocol.headers" was
>> empty.
>> But should not it contain http heads?
>>
>> if I want to get the client's ip address in camel-processor,what  
>> should i
>> do?
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24912015.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
> 
> 
> -- 
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
> 
> 
> 

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


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

Posted by Freeman Fang <fr...@gmail.com>.
Hi,
Could you explain more about your work flow?
Is it cxf-bc consumer ==> servicemix-camel==>cxf-bc provider?

And there's two times dealProperty get invoked in your camel context,  
from which one you see lost the javax.jbi.messaging.protocol.headers?
Could you append both output for dealProperty?

Freeman
On 2009-8-11, at 下午1:45, inter wrote:

>
> I used cxf-bc-consumer,cxf-bc-provider and camel like follows:
>
>  --------------------------------------------------------------------
> <beans xmlns="http://www.springframework.org/schema/beans"
>       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>       xsi:schemaLocation="
>       http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>       http://activemq.apache.org/camel/schema/spring
> http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>
>  <camelContext id="camel"
> xmlns="http://activemq.apache.org/camel/schema/spring">
>
>    <route>
>    	<from uri="jbi:service:http://server/HelloWorldPre"/>
>    	<process ref="dealProperty" />
>             <to uri="jbi:service:http://server/HelloWorld"/>
>             <process ref="dealProperty" />
>    </route>
>  </camelContext>
>
> <bean id="dealProperty"
> class="org.apache.servicemix.tutorial.camel.dealPropertyProcessor"/>
> 	
> </beans>
> -----------------------------------------------------------------------
>
> "dealProperty"is a camel-processor to print the exchange's details;
>
> when i send a request to cxf-bc,the processor print this:
>
>
> JbiMessage:
> org 
> .apache 
> .servicemix.jbi.messaging.NormalizedMessageImpl@1277ffa{properties:
> {javax.jbi.messaging.protocol.headers={}}}Exchange[JbiMessage:
> org 
> .apache 
> .servicemix.jbi.messaging.NormalizedMessageImpl@1277ffa{properties:
> {javax.jbi.messaging.protocol.headers={}}}]InOut[
>  id: ID:192.168.1.27-123073a49d8-4:4
>  status: Active
>  role: provider
>  service: {http://server}HelloWorldPre
>  endpoint: camel192-168-1-27-123073a49d8-30-0
>  operation: {http://server}sayHello
>  in: <?xml version="1.0" encoding="UTF-8"?><jbi:message
> xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"
> xmlns:msg="http://server" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
> name="sayHelloRequest"
> type="msg:sayHelloRequest" version="1.0"><jbi:part><q0:sayHello
> xmlns:q0="http://server">
> <q0:in0>test</q0:in0>
> </q0:sayHello></jbi:part></jbi:message>
>
>
> Take care of the bold lines, the  
> "javax.jbi.messaging.protocol.headers" was
> empty.
> But should not it contain http heads?
>
> if I want to get the client's ip address in camel-processor,what  
> should i
> do?
>
> -- 
> View this message in context: http://www.nabble.com/When-JBiMsg-sent-from-cxf-bc-to-camel%2Cjavax.jbi.messaging.protocol.headers-was-lost.-tp24912015p24912015.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com