Hi Steve, I think I found the cause.As servicemix-cxf-bc save ws-addressing related soap headers as Map object with key "javax.xml.ws.addressing.context.inbound" to NormalizedMessage, and it save other soap headers as Map object with key "javax.jbi.messaging.protocol.headers", but by default servicemix- camel jbi endpoint use HeaderFilterStrategy to filter properties which is not Serializable and Map/Collections(as entry in Map maybe not serializable but we can't exactly know), so you need add ? serialization=nocheck to your servicemix-camel jbi endpoint to disable this check, you can get more details about it from [1].
Also, if you want to use ws-addressing related soap headers, you also need add ws-addressing related interceptors(which will extract addressing related headers) to your cxf bc consumer, take a look at CxfBcAddressingTest[2], and more importantly, the configuration for this test[3]
[1]http://camel.apache.org/jbi.html [2]https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/addressing/CxfBcAddressingTest.java [3]https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/addressing/xbean.xml Freeman On 2010-4-27, at 上午1:19, slew77 wrote:
Hi, Here it is: http://old.nabble.com/file/p28028458/EchoTest-soapui-project.xml EchoTest-soapui-project.xml Thanks, Steve. Freeman Fang wrote:Hi, I prefer to use EchoTest-soapui-project.xml , but I can't find it, could you please append it again? Freeman On 2010-4-26, at 下午9:16, slew77 wrote:Hi,Thanks for looking at this. I was using the attached SoapUI project:EchoTest-soapui-project.xml for testing. If that's no use, I've uploaded a perl script for testing. http://old.nabble.com/file/p28364396/invokeEchoService.pl invokeEchoService.pl Let me know if that's no good too and I'll provide something else. Thanks, Steve. Freeman Fang wrote:Hi,I tried it today, but I didn't see the client you send message to cxfbc consumer, could you please also provide it? I'm using your testcase for smx3. Freeman On 2010-4-26, at 下午4:42, slew77 wrote:Hi Freeman, Just wondering if you had a chance to look at this yet? Many thanks, Steve. slew77 wrote:Hi,If it's any help, I tried the same test on smx4 (4.2.0- fuse-01-00)and get the same problem. Updated test case attached. http://old.nabble.com/file/p28165915/SMX4_TestCase.zip SMX4_TestCase.zip Cheers, Steve. Freeman Fang wrote:Hi,Np, I already saved your testcase and will take a look when I getchance, :-) Freeman On 2010-3-26, at 下午4:25, slew77 wrote:Hi, Sorry didn't mean to rush you. I'm extremely grateful that you're helping me out and a bit over eager! Thanks, Steve. Freeman Fang wrote:Hi, Didn't get chance to do it yet, be patient, please. Freeman On 2010-3-26, at 下午4:15, slew77 wrote:Any luck getting that to work? Thanks, Steve. slew77 wrote:Attached is the Source and the SoapUI project I used to test with. http://old.nabble.com/file/p28028458/Src%2B-%2BTestCase.MiG-ConsumerAdapter-Toolkit-Discharge.zip Src+-+TestCase.MiG-ConsumerAdapter-Toolkit-Discharge.zip http://old.nabble.com/file/p28028458/EchoTest-soapui-project.xml EchoTest-soapui-project.xml Let me know if you need anything else. Thanks, Steve. Freeman Fang wrote:Hi, Do you mind append your testcase which I can build and deploy, this is very helpful for me to debug, identify, and verify fix if necessary. Thanks Freeman On 2010-3-25, at 下午5:13, slew77 wrote:Hi Freeman, I created a simplified test case and ran four tests. Attached are the files and logs: CXFBC: http://old.nabble.com/file/p28025663/xbean.xml xbean.xml for the tests Iadjusted the parameters useJBIWrapper and useSOAPEnvelope tocheck for any differences. WSDL: http://old.nabble.com/file/p28025663/EchoService.wsdl EchoService.wsdl The camel route is: from("jbi:endpoint:urn:test/Test/Test") .to("log:InEchoServiceCamelRoute?showAll=true"); Log files: http://old.nabble.com/file/p28025663/servicemix%2B-%2Bno %2Bwrappers.log servicemix+-+no+wrappers.log (useJBIWrapper=false and useSOAPEnvelope=false) http://old.nabble.com/file/p28025663/servicemix%2B- %2BuseJBIWrapper.log servicemix+-+useJBIWrapper.log (useJBIWrapper=true and useSOAPEnvelope=false) http://old.nabble.com/file/p28025663/servicemix%2B-%2BuseSOAPEnvelope.log servicemix+-+useSOAPEnvelope.log (useJBIWrapper=false and useSOAPEnvelope=true) http://old.nabble.com/file/p28025663/servicemix%2B-%2BuseJBIWrapper%2Band%2BuseSOAPEnvelope.log servicemix+-+useJBIWrapper+and+useSOAPEnvelope.log (useJBIWrapper=true and useSOAPEnvelope=true)Each one shows a SOAP header when in CXF, but no header whenin Camel.Again, I really appreciate any help you can give with this.Thanks, Steve. Freeman Fang wrote:Hi,What's your configuration for smx-cxf and servicemix- camel?Freeman On 2010-3-25, at 上午2:28, slew77 wrote:Hi Freeman, Tried the latest version of servicemix-camel and I still don't get the headers. Thanks, Steve Freeman Fang wrote:Hi, What's the servicemix-camel component version you are using? Could you use the latest version? Freeman On 2010-3-24, at 下午3:56, slew77 wrote:Hi Freeman, Thanks for taking the time to look at this. I don't see any related properties in camel. Here's a couple of traces from the log file produced by the camel su: This following trace is produced from: .to("log:ShowHeadersAndProperties? showBody=false&showHeaders=true&showProperties=true")07:45:08,258 | INFO | pool-flow.seda.servicemix- camel-thread-13 | ShowHeadersAndProperties | org.apache.camel.processor.Logger 88 | Exchange[Properties:{CamelToEndpoint=log:// ShowHeadersAndProperties? showBody=false&showHeaders=true&showProperties=true, JbiMessageExchange=InOut[ id: ID:172.17.133.204-1278cf07b53-4:4 status: Active role: provider service: {urn:mig}ConsumerAdapter.Toolkit.Discharge endpoint: Router operation: {http://www.nhs.cfh.org/interoperability.toolkit/DischargeSummary/ 1.0}SendDischargeSummaryin: <?xml version="1.0" encoding="UTF-8"? ><soap:Envelopexmlns:soap="http://schemas.xmlsoap.org/soap/ envelope/"><soap:Body>... ], JbiOperation={http://www.nhs.cfh.org/interoperability.toolkit/DischargeSummary/1.0 }SendDischargeSummary},Headers:{}, BodyType:javax.xml.transform.dom.DOMSource]The next trace is produced from: logger.debug("Properties are: " + exchange .getProperty("javax.jbi.messaging.protocol.headers"));07:45:08,258 | DEBUG | pool-flow.seda.servicemix- camel-thread-13 | MiGConsumerAdapterRouteBuilder | toolkit.discharge.MiGConsumerAdapterRouteBuilder$1 52 | Properties are: null And finally the next trace from: logger.debug("Headers are: " + exchange .getIn ().getHeader("javax.jbi.messaging.protocol.headers"));07:45:08,258 | DEBUG | pool-flow.seda.servicemix- camel-thread-13 | MiGConsumerAdapterRouteBuilder | toolkit.discharge.MiGConsumerAdapterRouteBuilder$1 53 | Headers are: null If I set an interceptor in CXF I can see the header properties from: ContextUtils.retrieveMAPs(message, false, false); Thanks for any advice, Steve. Freeman Fang wrote:Hi,We already copy headers from cxf message to nmr messageof smx- cxf- bc,and also copy headers from nmr message to camel messageof smx- camel. So I believe it works. How did you try to extract the headers? You should use key "javax.xml.ws.addressing.context.inbound" to get wsa related properties, the result object is a Map. And use key "javax.jbi.messaging.protocol.headers" to get other properties, the result object is a Map. Freeman On 2010-3-24, at 上午12:30, slew77 wrote:Hi, I have the following setup running in ServiceMix routing SOAP messages: CXFBC --> CAMEL --> CXFBC When a message is received, I need to be able to use the SOAP header properties, e.g. wsa:MessageID, within the Camel route. The CXF BC Consumer is set with: useJBIWrapper="false" useSOAPEnvelope="true"But the Header is missing from the SOAP Envelope whenthe exchange reaches the Camel module. I've tried setting up an interceptor to explicitely set properties on the CXF exchange and message, but am not sure how or if these are mapped. I'm using servicemix-cxf-bc-2010.01-SNAPSHOT- installer.zip built on 21 March. Any help is appreciated. Thanks, Steve. -- View this message in context: http://old.nabble.com/Passing-SOAP-Headers---CXFBC--%3E-CAMEL-tp28003448p28003448.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://old.nabble.com/Passing-SOAP-Headers---CXFBC--%3E-CAMEL-tp28003448p28011664.htmlSent from the ServiceMix - User mailing list archive atNabble.com.-- Freeman Fang ------------------------ Open Source SOA: http://fusesource.com-- View this message in context: http://old.nabble.com/Passing-SOAP-Headers---CXFBC--%3E-CAMEL-tp28003448p28019345.html Sent from the ServiceMix - User mailing list archive at Nabble.com.-- Freeman Fang ------------------------ Open Source SOA: http://fusesource.comhttp://old.nabble.com/file/p28025663/servicemix%2B-%2Bno %2Bwrappers.log servicemix+-+no+wrappers.log -- View this message in context: http://old.nabble.com/Passing-SOAP-Headers---CXFBC--%3E-CAMEL-tp28003448p28025663.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://old.nabble.com/Passing-SOAP-Headers---CXFBC--%3E-CAMEL-tp28003448p28039214.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://old.nabble.com/Passing-SOAP-Headers---CXFBC--%3E-CAMEL-tp28003448p28039302.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://old.nabble.com/Passing-SOAP-Headers---CXFBC--%3E-CAMEL-tp28003448p28362238.htmlSent from the ServiceMix - User mailing list archive at Nabble.com.-- Freeman Fang ------------------------ Open Source SOA: http://fusesource.com-- View this message in context: http://old.nabble.com/Passing-SOAP-Headers---CXFBC--%3E-CAMEL-tp28003448p28364396.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://old.nabble.com/Passing-SOAP-Headers---CXFBC--%3E-CAMEL-tp28003448p28367654.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
-- Freeman Fang ------------------------ Open Source SOA: http://fusesource.com
