Hi Gisbert

It's my fault that I didn't check the camel-cxf component's change log. You can't use Message.PROTOCOL_HEADERS to get the SOAPAction any more , since William Tam contributed a header filter strategy[1] to encapsulate the context of PROTOCOL_HEADERS in Camel 1.5. You can find the code of CXF header handling in the method propagateCxfToCamel() of CxfHeaderHelper[2]
You should get the SOAPAction just by using the "SOAPAction" as the Key.

[1] https://issues.apache.org/activemq/browse/CAMEL-766
[2] https://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/util/CxfHeaderHelper.java

Regards,

Willem
Gisbert Amm wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Willem,

thank you for the quick reply. I'm afraid I don't really understand what
you want to tell me. I can see that you've commented the code in the
test that did more or less the same I did because this information is
obviously no longer provided in CXF 2.1.2.

However, what do you mean when you say I should use SOAPActionExtractor
only for handling the request message? I thought that I already did so:

<route>
<from uri="cxf:bean:MyEndpoint"/>
<process ref="sOAPActionExtractor"/>
...

And how can I retrieve the SOAP action from the message now? My routing
relies on it ...

Regards,
Gisbert Amm

Willem Jiang wrote:
Hi,

Camel-1.5 snapshot is using CXF 2.1.2  and CXF 2.1.2 only apply the
SOAPAction for the request message (in SoapPreProtocolOutInterceptor).
Please make sure the SOAPActionExtractor only be used for handling the
request message :)

You can find more information in the CustomerServicesTest[1]

[1]https://svn.apache.org/repos/asf/activemq/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/customerrelations/CustomerServicesTest.java


Willem

Gisbert Amm wrote:
I've upgraded Camel to the current HEAD from SVN.

Consider this code, which worked fine with version 1.4.0:

public class SOAPActionExtractor implements Processor {

public void process(Exchange exchange) throws Exception {
        Map header = (Map)
exchange.getIn().getHeader(Message.PROTOCOL_HEADERS);
...

(Message is of type org.apache.cxf.message.Message)

After upgrading to 1.5-SNAPSHOT, the header is null and I therefore get
a NPE later on. Can somebody explain why this happens and what has
changed here? That would be very helpful.

Regards,
Gisbert Amm

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIx/c/wM6uO7ce7NoRAiQEAJ47Hj1lAVxTs8tcl5oKstqtV/00vwCfd2zM
d2hyfXmY0JtLRzGQVmecZh8=
=H0is
-----END PGP SIGNATURE-----


Reply via email to