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 84120E154 for ; Tue, 29 Jan 2013 06:43:50 +0000 (UTC) Received: (qmail 87435 invoked by uid 500); 29 Jan 2013 06:43:50 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 87408 invoked by uid 500); 29 Jan 2013 06:43:49 -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 87390 invoked by uid 99); 29 Jan 2013 06:43:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jan 2013 06:43:49 +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 (athena.apache.org: domain of willem.jiang@gmail.com designates 209.85.210.49 as permitted sender) Received: from [209.85.210.49] (HELO mail-da0-f49.google.com) (209.85.210.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jan 2013 06:43:44 +0000 Received: by mail-da0-f49.google.com with SMTP id v40so68661dad.22 for ; Mon, 28 Jan 2013 22:43:24 -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=jpasiJHQ4czKTfyF0YiWCwjddXOSTnMi3K5yimprOKY=; b=UwXCoE74Lgte66RPVRtey4KYDaKZ8EyfhY2sUTifVG5wwrjcbruvrTEj/ljU2GAOxY bsrpPvgz/dqt7siR9P0Mk4sBgj35w+dv0Xg0E8TBFLM75utYpekcyZP477uAxXnQ6WBq cpV5QUK9kgMLqCfWRXH3kKWE2wkjTpftVgDMbOdlcikuRZc26xRn0mAPdoaA04LE+6Kt npdyyIU0jSy+Q9W3DIrjjHZOXc1yjlTXy/LThXlHvlvkDWdAPd1mAeRiHQ6SwuKvZPL+ FiPdEKwGkA9HGRxk7eKmoOLfPW2lOitogJ07K2ziqWRzujQ9FX6YnSsqtiuApD4XiET3 0Bkg== X-Received: by 10.68.244.230 with SMTP id xj6mr1236250pbc.106.1359441804577; Mon, 28 Jan 2013 22:43:24 -0800 (PST) Received: from [192.168.1.135] ([111.193.234.242]) by mx.google.com with ESMTPS id kl3sm7824881pbc.15.2013.01.28.22.43.20 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 28 Jan 2013 22:43:23 -0800 (PST) Date: Tue, 29 Jan 2013 14:43:16 +0800 From: Willem jiang To: users@camel.apache.org Message-ID: In-Reply-To: <1359401820207-5726438.post@n5.nabble.com> References: <1359378196815-5726415.post@n5.nabble.com> <1359401820207-5726438.post@n5.nabble.com> Subject: Re: insert custom Soap Header problem 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 Yeah, you can do it by setting up a customer interceptor on the CX=46 end= point. -- =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 Tuesday, January 29, 2013 at 3:37 AM, peter.berkman wrote: > not sure if this is the same, but I had to do something similar for SAM= L. =20 > =20 > I did it through an Interecepter: > =20 > =7Bcode=7D > public class SAMLResponseInterceptor extends AbstractSoapInterceptor =7B= > =20 > private static final transient Logger LOG =3D > Logger=46actory.getLogger(SAMLResponseInterceptor.class); > =20 > public SAMLResponseInterceptor() =7B > super(Phase.PRE=5FPROTOCOL); > =7D > =20 > =40Override > public void handleMessage(SoapMessage message) throws =46ault =7B > =20 > LOG.debug(=22Out interceptor called.....=22); > =20 > SAMLHelper sam =3D new SAMLHelper(); > =20 > Element saml =3D sam.getResponseSAML(); > =20 > if (saml =21=3D null) =7B > =20 > QName q =3D new > QName(=22http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecu= rity-secext-1.0.xsd=22,=22Security=22, > =22wsse=22); > Header h =3D message.getHeader(q); > =20 > if (h =3D=3D null) =7B > =20 > QName q1 =3D new > QName(=22http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecu= rity-secext-1.0.xsd=22,=22Security=22, > =22o=22); > Header h1 =3D message.getHeader(q1); > =20 > if (h1 =3D=3D null) =7B > =20 > h =3D new Header(q, saml); > message.getHeaders().add(h); > LOG.debug(=22New soap header added=22); > =7D > else =7B > h1.setObject(saml); > LOG.debug(=22soap header updated=22); > =7D > =7D > else =7B > h.setObject(saml); > LOG.debug(=22soap header updated=22); > =7D > =7D > =7D > =7D > =20 > =7Bcode=7D > =20 > =20 > =20 > -- > View this message in context: http://camel.465427.n5.nabble.com/insert-= custom-Soap-Header-problem-tp5726415p5726438.html > Sent from the Camel - Users mailing list archive at Nabble.com (http://= Nabble.com).