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 6451FD7B2 for ; Mon, 21 Jan 2013 09:36:12 +0000 (UTC) Received: (qmail 83837 invoked by uid 500); 21 Jan 2013 09:36:11 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 83592 invoked by uid 500); 21 Jan 2013 09:36:11 -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 76898 invoked by uid 99); 21 Jan 2013 09:33:53 -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: Mon, 21 Jan 2013 01:33:25 -0800 (PST) From: cww1769 To: users@camel.apache.org Message-ID: <7415E3744A94F84299B2F46EFCAA068F0E48D733@CNSHJMBX03.ad4.ad.alcatel.com> In-Reply-To: <2E9887E85C04483C93C0C6E5C8443E71@gmail.com> References: <1358386813159-5725670.post@n5.nabble.com> <7415E3744A94F84299B2F46EFCAA068F0E486021@CNSHJMBX03.ad4.ad.alcatel.com> <7415E3744A94F84299B2F46EFCAA068F0E48A66B@CNSHJMBX03.ad4.ad.alcatel.com> <2E9887E85C04483C93C0C6E5C8443E71@gmail.com> Subject: RE: how to set attachment headers in camel exchange? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_41140_3078541.1358760805354" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_41140_3078541.1358760805354 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Yes, you are right; I made a mistake about the LOG object:( Thanks! The setting works and my problem has been solved! ________________________________ From: Willem.Jiang [via Camel] [mailto:ml-node+s465427n5725857h77@n5.nabble= .com] Sent: 2013=E5=B9=B41=E6=9C=8821=E6=97=A5 13:41 To: CHEN Wei V Subject: Re: how to set attachment headers in camel exchange? Oh, The CxfBinding should be stetted rightly. If you check the code of DefaultCxfBinding you will find that it use the LO= G object with the below line. private static final Logger LOG =3D LoggerFactory.getLogger(DefaultCxfBindi= ng.class); As the ISGCxfBinding extends the DefaultCxfBinding, it is make sense that y= ou got the log as below even the CxfBinding is set with ISGCxfBinding. Can you just write some test to verify the setting ? -- 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 Saturday, January 19, 2013 at 4:57 PM, cww1769 wrote: > Hi, Willem: > It doesn't work either:( I can see the instance of the isgCxfBiding is cr= eated from log: > 2013-01-19 16:38:25,479 | DEBUG | tenderThread-137 | DefaultComponent | a= che.camel.impl.DefaultComponent 73 | Creating endpoint uri=3D[cxf://http://= 135.252.181.3:40006?bus=3D%23cxf&cxfBinding=3D%23isgCxfBinding&serviceClass= =3Dorg._3gpp.schemas.mms.rel630.mm7_service.MMSServicePortType], path=3D[ht= tp://135.252.181.3:40006], parameters=3D[{bus=3D#cxf, cxfBinding=3D#isgCxfB= inding, serviceClass=3Dorg._3gpp.schemas.mms.rel630.mm7_service.MMSServiceP= ortType}] > 2013-01-19 16:38:25,479 | DEBUG | tenderThread-137 | DefaultListableBeanF= actory | tory.support.AbstractBeanFactory 242 | Returning cached instance o= f singleton bean 'isgCxfBinding' > 2013-01-19 16:38:25,479 | DEBUG | tenderThread-137 | EndpointHelper | apa= che.camel.util.EndpointHelper 253 | Configured property: cxfBinding on bean= : Endpoint[http://135.252.181.3:40006] with value: com.alcatel_lucent.isg.e= nabler.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 | .cam= el.processor.SendProcessor$2 113 | >>>> Endpoint[cxf://http://135.252.181.3= :40006?bus=3D%23cxf&cxfBinding=3D%23isgCxfBinding&serviceClass=3Dorg._3gpp.= schemas.mms.rel630.mm7_service.MMSServicePortType] Exchange[Message: [org._= 3gpp.ftp.specs.archive._23_series._23_140.schema.rel_6_mm7_1_0.SubmitReqTyp= e@3d4f64f3]] > 2013-01-19 16:41:38,748 | DEBUG | ndMessageService | DefaultCxfBinding | = .component.cxf.DefaultCxfBinding 563 | Propagate to CXF header: org.apache.= cxf.headers.Header.list value: [org.apache.cxf.binding.soap.SoapHeader@1271= 043f] > > ________________________________ > From: Willem.Jiang [via Camel] [mailto:[hidden email]] > 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 = URI with the option cxfBinding=3D#bindingName. > > You need to bind the instance of the ISGCxfBinding with the name of bindi= ngName. > -- > 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 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 atta= chment headers. > > 2) Wrote an ISGCxfBinding which extends DefaultCxfBinding but it will u= ses ISGDataHandler to add headers. > > But I still have a question: > > How can I set my ISGCxfBinding to my endpoint? I think camel will produ= ce 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 with= in 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.getData= Handler());* > > > > > > The out message will have an attachment with two headers: content-typ= e and > > > content-id, but I want the attachment has other headers like > > > content-disposition which I have set in attachment. I considered addi= ng 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-t= o-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 discussio= n below: > > > > NAML > > > > > > ISGDataHandler.java (884 bytes) > > ISGCxfBinding.java (4K) > > > > > > > > > > -- > > View this message in context: http://camel.465427.n5.nabble.com/how-to-= set-attachment-headers-in-camel-exchange-tp5725670p5725728.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 > > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/how-to-se= t-attachment-headers-in-camel-exchange-tp5725670p5725807.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-tp5725670p5725857.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-tp5725670p5725875.html Sent from the Camel - Users mailing list archive at Nabble.com. ------=_Part_41140_3078541.1358760805354--