Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C8ED8EE8A for ; Sat, 19 Jan 2013 09:02:07 +0000 (UTC) Received: (qmail 91930 invoked by uid 500); 19 Jan 2013 09:02:06 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 91560 invoked by uid 500); 19 Jan 2013 09:02:05 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Delivered-To: moderator for users@camel.apache.org Received: (qmail 85369 invoked by uid 99); 19 Jan 2013 08:57:34 -0000 X-ASF-Spam-Status: No, hits=4.5 required=5.0 tests=HTML_FONT_FACE_BAD,HTML_MESSAGE,NORMAL_HTTP_TO_IP,SPF_NEUTRAL,URI_HEX,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Date: Sat, 19 Jan 2013 00:57:05 -0800 (PST) From: cww1769 To: users@camel.apache.org Message-ID: <7415E3744A94F84299B2F46EFCAA068F0E48A66B@CNSHJMBX03.ad4.ad.alcatel.com> In-Reply-To: References: <1358386813159-5725670.post@n5.nabble.com> <7415E3744A94F84299B2F46EFCAA068F0E486021@CNSHJMBX03.ad4.ad.alcatel.com> Subject: RE: how to set attachment headers in camel exchange? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_21279_537353.1358585825140" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_21279_537353.1358585825140 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, Willem: It doesn't work either:( I can see the instance of the isgCxfBiding is crea= ted from log: 2013-01-19 16:38:25,479 | DEBUG | tenderThread-137 | DefaultComponent = | ache.camel.impl.DefaultComponent 73 | Creating endpoint uri= =3D[cxf://http://135.252.181.3:40006?bus=3D%23cxf&cxfBinding=3D%23isgCxfBin= ding&serviceClass=3Dorg._3gpp.schemas.mms.rel630.mm7_service.MMSServicePort= Type], path=3D[http://135.252.181.3:40006], parameters=3D[{bus=3D#cxf, cxfB= inding=3D#isgCxfBinding, serviceClass=3Dorg._3gpp.schemas.mms.rel630.mm7_se= rvice.MMSServicePortType}] 2013-01-19 16:38:25,479 | DEBUG | tenderThread-137 | DefaultListableBeanFac= tory | tory.support.AbstractBeanFactory 242 | Returning cached insta= nce of singleton bean 'isgCxfBinding' 2013-01-19 16:38:25,479 | DEBUG | tenderThread-137 | EndpointHelper = | apache.camel.util.EndpointHelper 253 | Configured property: c= xfBinding on bean: Endpoint[http://135.252.181.3:40006] with value: com.alc= atel_lucent.isg.enabler.mms.util.ISGCxfBinding@6859ace0 But the exchange still goes to DefaultCxfBinding according to the log: 2013-01-19 16:41:38,747 | DEBUG | ndMessageService | SendProcessor = | .camel.processor.SendProcessor$2 113 | >>>> Endpoint[cxf://ht= tp://135.252.181.3:40006?bus=3D%23cxf&cxfBinding=3D%23isgCxfBinding&service= Class=3Dorg._3gpp.schemas.mms.rel630.mm7_service.MMSServicePortType] Exchan= ge[Message: [org._3gpp.ftp.specs.archive._23_series._23_140.schema.rel_6_mm= 7_1_0.SubmitReqType@3d4f64f3]] 2013-01-19 16:41:38,748 | DEBUG | ndMessageService | DefaultCxfBinding = | .component.cxf.DefaultCxfBinding 563 | Propagate to CXF heade= r: org.apache.cxf.headers.Header.list value: [org.apache.cxf.binding.soap.S= oapHeader@1271043f] ________________________________ From: Willem.Jiang [via Camel] [mailto:ml-node+s465427n5725733h33@n5.nabble= .com] Sent: 2013=E5=B9=B41=E6=9C=8818=E6=97=A5 16:57 To: CHEN Wei V Subject: Re: how to set attachment headers in camel exchange? Hi You can override the DefaultCxfBinding by configure it in your camel-cxf UR= I with the option cxfBinding=3D#bindingName. You need to bind the instance of the ISGCxfBinding with the name of binding= Name. -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (E= nglish) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: =E5=A7=9C=E5=AE=81willem On Friday, January 18, 2013 at 10:43 AM, cww1769 wrote: > Hi, Willem: > I have thought about another solution which you suggested. > 1) Wrote an ISGDataHandler which extends DataHandler and holds the attach= ment headers. > 2) Wrote an ISGCxfBinding which extends DefaultCxfBinding but it will use= s ISGDataHandler to add headers. > But I still have a question: > How can I set my ISGCxfBinding to my endpoint? I think camel will produce= my endpoint itself. > What do you think? > > ________________________________ > From: Willem.Jiang [via Camel] [mailto:[hidden email]] > Sent: 2013=E5=B9=B41=E6=9C=8817=E6=97=A5 15:38 > To: CHEN Wei V > Subject: Re: how to set attachment headers in camel exchange? > > Hi, > > I need to see the full picture of issue. > > Please show use the camel route which will use the processor you have. > As I have suggested in the CAMEL-5966, you should be able to do it within= the CXF Message. > > > [1]https://issues.apache.org/jira/browse/CAMEL-5966 > -- > Willem Jiang > > Red Hat, Inc. > FuseSource is now part of Red Hat > Web: http://www.fusesource.com | http://www.redhat.com > Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) = (English) > http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) > Twitter: willemjiang > Weibo: =E5=A7=9C=E5=AE=81willem > > > > > > On Thursday, January 17, 2013 at 9:40 AM, cww1769 wrote: > > > Hi, all: > > I just met a problem in my project which is using cxf-camel. Here is my > > code in the camel processor: > > * > > HashMap map =3D (HashMap > Object>)exchange.getIn().getBody(); > > org.apache.cxf.message.Attachment attachment =3D > > (Attachment)map.get("MyAttachment"); > > exchange.getOut().addAttachment(attachment.getId(),attachment.getDataHa= ndler());* > > > > The out message will have an attachment with two headers: content-type = and > > content-id, but I want the attachment has other headers like > > content-disposition which I have set in attachment. I considered adding= an > > interceptor, but I don't know how I can get the attachment headers. > > Thanks for your attention and time! > > > > > > > > > > -- > > View this message in context: http://camel.465427.n5.nabble.com/how-to-= set-attachment-headers-in-camel-exchange-tp5725670.html > > Sent from the Camel - Users mailing list archive at Nabble.com (http://= Nabble.com). > > > > > > > ________________________________ > If you reply to this email, your message will be added to the discussion = below: > > NAML > > > ISGDataHandler.java (884 bytes) > ISGCxfBinding.java (4K) > > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/how-to-se= t-attachment-headers-in-camel-exchange-tp5725670p5725728.html > Sent from the Camel - Users mailing list archive at Nabble.com (http://Na= bble.com). ________________________________ If you reply to this email, your message will be added to the discussion be= low: http://camel.465427.n5.nabble.com/how-to-set-attachment-headers-in-camel-ex= change-tp5725670p5725733.html To unsubscribe from how to set attachment headers in camel exchange?, click= here. NAML -- View this message in context: http://camel.465427.n5.nabble.com/how-to-set-= attachment-headers-in-camel-exchange-tp5725670p5725807.html Sent from the Camel - Users mailing list archive at Nabble.com. ------=_Part_21279_537353.1358585825140--