camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Tam <email.w...@gmail.com>
Subject Re: setting soap headers in camel cxf router
Date Tue, 25 Aug 2009 14:38:56 GMT
In 1.x, we don't copy the Headers.list to Camel headers.  You can get
the Headers.list by first getting the CXF Message from Camel Message.
And then, you can get the header list from CXF message.

org.apache.camel.Message in = exchange.getIn();
org.apache.camel.component.cxf.CxfMessage body =
(org.apache.camel.component.cxf.CxfMessage)in.getBody();
org.apache.cxf.message.Message cxfMessage = body.getMessage();
List<org.apache.cxf.headers.Header.Header> soapHeaders =
cxfMessage.get(org.apache.cxf.headers.Header.Header.HEADER_LIST);


On Tue, Aug 25, 2009 at 10:18 AM, William Tam<email.wtam@gmail.com> wrote:
> Are you using 2.x?  (My reply was assuming you were using 2.x).
>
> On Tue, Aug 25, 2009 at 10:16 AM, William Tam<email.wtam@gmail.com> wrote:
>> In POJO mode, the SOAP headers are copied to Camel IN headers as
>> "org.apache.cxf.headers.Headers.list."  The header value is a List of
>> CXF Header objects
>> (http://svn.apache.org/repos/asf/cxf/trunk/api/src/main/java/org/apache/cxf/headers/Header.java).
>>  That's how you can read request SOAP headers.  You can add/edit the
>> Headers.list header of Camel OUT headers to modify the response SOAP
>> headers.
>>
>> Hope this help.
>>
>> - William
>>
>>
>> On Tue, Aug 25, 2009 at 1:42 AM, Claus Ibsen<claus.ibsen@gmail.com> wrote:
>>> On Thu, Aug 20, 2009 at 9:14 PM, trivedi kumar
>>> b<Trivedi.Bodlapati@ge.com> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I have exposed webservice using cxf and dataformat is "POJO". With in the
>>>> router, I want to get and set the soap headers in message exchange, can
>>>> someone help me on this?
>>>>
>>>
>>> Get the attention of Willem Jiang as he works on CXF.
>>>
>>>
>>>> Thanks,
>>>> Trivedi
>>>> --
>>>> View this message in context: http://www.nabble.com/setting-soap-headers-in-camel-cxf-router-tp25068148p25068148.html
>>>> Sent from the Camel - Users 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
>>>
>>
>

Mime
View raw message