Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 63296 invoked from network); 8 Jul 2009 19:10:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Jul 2009 19:10:24 -0000 Received: (qmail 20183 invoked by uid 500); 8 Jul 2009 19:10:34 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 20089 invoked by uid 500); 8 Jul 2009 19:10:34 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 20001 invoked by uid 99); 8 Jul 2009 19:10:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jul 2009 19:10:34 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jul 2009 19:10:23 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MOcWo-0001l5-Ur for users@cxf.apache.org; Wed, 08 Jul 2009 12:10:02 -0700 Message-ID: <24397540.post@talk.nabble.com> Date: Wed, 8 Jul 2009 12:10:02 -0700 (PDT) From: Alexandre N To: users@cxf.apache.org Subject: Re: Add a field in http headers does not work? In-Reply-To: <200907081454.21220.dkulp@apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: alexandre.navarro@sgcib.com References: <24396137.post@talk.nabble.com> <200907081454.21220.dkulp@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org I tried before but it did not work. I realised I was in the wrong phase (I must be in write phase) and now it works. So thanks a lot and I think it can be useful for users to detail what you can (or cannot do) in the different phases in the documentation. Alexandre dkulp wrote: > > > You need to get the protocol headers map out of the message and put your > stuff > there. The "get/put" stuff on the message is for storage of stuff > related to > processing the message. That includes stuff that would not be protocol > headers. > Map> reqHeaders = > CastUtils.cast((Map)message.get(Message.PROTOCOL_HEADERS)); > if (reqHeaders == null) { > reqHeaders = new HashMap>(); > message.put(Message.PROTOCOL_HEADERS, reqHeaders); > } > > .... > > Dan > > > On Wed July 8 2009 1:39:10 pm Alexandre N wrote: >> Hi, >> >> I want to add a field in http header (not in soap header). >> >> I did a out interceptor. >> >> public class MyOutInterceptor extends AbstractSoapInterceptor >> { >> >> public MyOutInterceptor() >> { >> super(Phase.POST_LOGICAL); >> } >> >> >> @Override >> public void handleMessage(final SoapMessage message) throws Fault >> { >> System.out.println("MyOutInterceptor.handle soapMessage=" + >> message); >> message.put("token", "tokenValue"); >> message.put("SOAPAction", "action2"); >> } >> } >> >> It is quite weird because SOAPAction is correct to action2 but token is >> not >> added. >> I suppose is because it was present before but I don't know why. >> I tried others phases but without success. >> >> If someone has a solution. > > -- > Daniel Kulp > dkulp@apache.org > http://www.dankulp.com/blog > > -- View this message in context: http://www.nabble.com/Add-a-field-in-http-headers-does-not-work--tp24396137p24397540.html Sent from the cxf-user mailing list archive at Nabble.com.