Hi, Sorry for the late response on this from my side, we could able to get the headers from the exchange but the problem that we are facing was how to set the headers on out message? Any sample code?
Thanks, Trivedi William Tam wrote: > > Just took a peek at the doc. The PAYLOAD mode doc in that area needs > improvement, too. I will look into it. > > On Tue, Aug 25, 2009 at 11:01 AM, William Tam<[email protected]> wrote: >> Will do, Claus. :-) Getting SOAP headers and body have been >> documented for PAYLOAD mode (both 1.x and 2.x). For MESSAGE mode, it >> is not applicable as there is no SOAP processing (but we will mention >> it). We just have to add doc for POJO mode. >> >> On Tue, Aug 25, 2009 at 10:49 AM, Claus Ibsen<[email protected]> >> wrote: >>> On Tue, Aug 25, 2009 at 4:38 PM, William Tam<[email protected]> >>> wrote: >>>> 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); >>>> >>> >>> No wonder CXF is hard, when you need all the "ugly" code above. >>> >>> As a lot of people are asking how to get SOAP headers from the 3 >>> dataFormats. >>> And as well how to get the body as type X. Or what the default type >>> the body is returned as etc. >>> >>> It would be cool and nice if we added such description and sample on >>> the CXF wiki page. >>> >>> Start with Camel 2.0 and then later if time we can do it for 1.x as >>> well. >>> >>> Camel 2.0 >>> ======== >>> About body and headers using dataFormat=POJO >>> bla bla >>> >>> About body and headers using dataFormat=MESSAGE >>> bla bla >>> >>> About body and headers using dataFormat=RAW >>> bla bla >>> >>> >>>> >>>> On Tue, Aug 25, 2009 at 10:18 AM, William Tam<[email protected]> >>>> 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 protected]> >>>>> 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<[email protected]> >>>>>> wrote: >>>>>>> On Thu, Aug 20, 2009 at 9:14 PM, trivedi kumar >>>>>>> b<[email protected]> 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 >>>>>>> >>>>>> >>>>> >>>> >>> >>> >>> >>> -- >>> 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/setting-soap-headers-in-camel-cxf-router-tp25068148p25157965.html Sent from the Camel - Users mailing list archive at Nabble.com.
