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.normalizedmessagei...@1277ffa{properties:
{javax.jbi.messaging.protocol.headers={}}}
Exchange[JbiMessage:
org.apache.servicemix.jbi.messaging.normalizedmessagei...@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.normalizedmessagei...@1277ffa{properties:
{javax.jbi.messaging.protocol.headers={}}}
=====out========
JbiMessage:
org.apache.servicemix.jbi.messaging.normalizedmessagei...@433333{properties:
{}}
Exchange[JbiMessage:
org.apache.servicemix.jbi.messaging.normalizedmessagei...@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.normalizedmessagei...@1277ffa{properties:
{javax.jbi.messaging.protocol.headers={}}}
=====over========
-----------------------------------------------
the second time invoked ,it printed:
---------------------------------------------------------
=====in========
JbiMessage:
org.apache.servicemix.jbi.messaging.normalizedmessagei...@1277ffa{properties:
{javax.jbi.messaging.protocol.headers={}}}
Exchange[JbiMessage:
org.apache.servicemix.jbi.messaging.normalizedmessagei...@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.sedaqueu...@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.normalizedmessagei...@1277ffa{properties:
{javax.jbi.messaging.protocol.headers={}}}
=====out========
JbiMessage:
org.apache.servicemix.jbi.messaging.normalizedmessagei...@433333{properties:
{}}
Exchange[JbiMessage:
org.apache.servicemix.jbi.messaging.normalizedmessagei...@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.normalizedmessagei...@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.normalizedmessagei...@1277ffa{properties:
>> {javax.jbi.messaging.protocol.headers={}}}Exchange[JbiMessage:
>> org
>> .apache
>> .servicemix.jbi.messaging.normalizedmessagei...@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.