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 5F74DE263 for ; Fri, 18 Jan 2013 08:57:12 +0000 (UTC) Received: (qmail 31919 invoked by uid 500); 18 Jan 2013 08:57:11 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 31885 invoked by uid 500); 18 Jan 2013 08:57: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 Received: (qmail 31873 invoked by uid 99); 18 Jan 2013 08:57:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jan 2013 08:57:11 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of willem.jiang@gmail.com designates 209.85.160.43 as permitted sender) Received: from [209.85.160.43] (HELO mail-pb0-f43.google.com) (209.85.160.43) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jan 2013 08:57:04 +0000 Received: by mail-pb0-f43.google.com with SMTP id jt11so560452pbb.30 for ; Fri, 18 Jan 2013 00:56:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:message-id:in-reply-to:references:subject :x-mailer:mime-version:content-type:content-transfer-encoding :content-disposition; bh=+1TIHVL9GzdpsdbSz4QJKiZey/lLbA8/Tg5tpb2dVec=; b=IL5SurNHuvXF4KJxkj0agOdb+NZtWtpvqUWzMkaEYdd+yFsXijw+FlVypfykbe0K8R 7+ZpiXyW1Ad4MrCF7lSQkgBwaxi4owczAK7X/oeDUDYtKX2v0FjwLHm5zu06+zhRsadZ evwV1oOA7wuciy1qFNWNGTgZ1phtOlXPIb5BMRw1E+CURmpQdsMljAMn/jh3RVYThxHe 48Oew5Yqg+WZ2mmtWxbcQ8G+fyJX6WaZvjExPn1hSIlwE9/hIus86Z/AZUp5sOBMLgVk LWxKyDJ50jceESY0MYoiVimJK74FqPcL/7uF6HkR/kA8+HJuqbxxPGNpdQspSzeSSHDo /87w== X-Received: by 10.69.0.8 with SMTP id au8mr3118989pbd.58.1358499403436; Fri, 18 Jan 2013 00:56:43 -0800 (PST) Received: from [192.168.1.135] ([123.116.41.7]) by mx.google.com with ESMTPS id ug6sm2736596pbc.4.2013.01.18.00.56.39 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 18 Jan 2013 00:56:42 -0800 (PST) Date: Fri, 18 Jan 2013 16:56:35 +0800 From: Willem jiang To: users@camel.apache.org Message-ID: In-Reply-To: <7415E3744A94F84299B2F46EFCAA068F0E486021@CNSHJMBX03.ad4.ad.alcatel.com> References: <1358386813159-5725670.post@n5.nabble.com> <7415E3744A94F84299B2F46EFCAA068F0E486021@CNSHJMBX03.ad4.ad.alcatel.com> Subject: Re: how to set attachment headers in camel exchange? X-Mailer: sparrow 1.6.4 (build 1176) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org Hi =20 You can override the DefaultCxfBinding by configure it in your camel-cxf = URI with the option cxfBinding=3D=23bindingName. You need to bind the instance of the ISGCxfBinding with the name of bindi= ngName. -- =20 Willem Jiang Red Hat, Inc. =46useSource is now part of Red Hat Web: http://www.fusesource.com =7C 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 =20 Weibo: =E5=A7=9C=E5=AE=81willem On =46riday, 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=3F I think camel will pro= duce my endpoint itself. > What do you think=3F > =20 > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F > =46rom: Willem.Jiang =5Bvia Camel=5D =5Bmailto:ml-node+s465427n5725674h= 4=40n5.nabble.com=5D > 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=3F > =20 > Hi, > =20 > I need to see the full picture of issue. > =20 > 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 CX=46 Message. > =20 > =20 > =5B1=5Dhttps://issues.apache.org/jira/browse/CAMEL-5966 > -- > Willem Jiang > =20 > Red Hat, Inc. > =46useSource is now part of Red Hat > Web: http://www.fusesource.com =7C 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 > =20 > =20 > =20 > =20 > =20 > On Thursday, January 17, 2013 at 9:40 AM, cww1769 wrote: > =20 > > 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(=22MyAttachment=22); > > exchange.getOut().addAttachment(attachment.getId(),attachment.getData= Handler());* > > =20 > > 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=21 > > =20 > > =20 > > =20 > > =20 > > -- > > 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). > =20 > =20 > =20 > =20 > =20 > =20 > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F > If you reply to this email, your message will be added to the discussio= n below: > http://camel.465427.n5.nabble.com/how-to-set-attachment-headers-in-came= l-exchange-tp5725670p5725674.html > To unsubscribe from how to set attachment headers in camel exchange=3F,= click here. > NAML > =20 > =20 > ISGDataHandler.java (884 bytes) > ISGCxfBinding.java (4K) > =20 > =20 > =20 > =20 > -- > 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).