Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 90534 invoked from network); 12 Jan 2009 16:49:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jan 2009 16:49:57 -0000 Received: (qmail 85786 invoked by uid 500); 12 Jan 2009 16:49:51 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 85745 invoked by uid 500); 12 Jan 2009 16:49:51 -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 85734 invoked by uid 99); 12 Jan 2009 16:49:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jan 2009 08:49:51 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.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; Mon, 12 Jan 2009 16:49:43 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1LMPyd-0002bl-BV for users@cxf.apache.org; Mon, 12 Jan 2009 08:49:23 -0800 Message-ID: <21418356.post@talk.nabble.com> Date: Mon, 12 Jan 2009 08:49:23 -0800 (PST) From: Eric Velazquez To: users@cxf.apache.org Subject: NPE on SAAJOutEndingInterceptor MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: evelazquez2000@yahoo.com.mx X-Virus-Checked: Checked by ClamAV on apache.org Hello. I am writing a cxf client and trying to use a username/password secutiry so i am adding the WSS4JOutInterceptor to the interceptors chain but on execution it gives me a NullPointerException. Relevant Stack : Caused by: java.lang.NullPointerException at org.apache.cxf.staxutils.StaxUtils.writeStartElement(StaxUtils.java:368) at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:325) at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:313) at org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor.handleMessage(SAAJOutInterceptor.java:161) at org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor.handleMessage(SAAJOutInterceptor.java:127) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:466) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:299) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:251) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:75) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124) the code: Map outProps = new HashMap(); outProps.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN); outProps.put(WSHandlerConstants.USER, usuarioPassword[0]); outProps.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT); CallbackHandler callback = new CallbackHandler() { public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { WSPasswordCallback pc = (WSPasswordCallback) callbacks[0]; // set the password for our message. pc.setPassword("ThePassword"); } }; outProps.put(WSHandlerConstants.PW_CALLBACK_REF, callback); WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps); clientEndPoint.getOutInterceptors().add(wssOut); respuesta = myWebService.ejecuta(abono); Using: CXF 2.1.3 over Weblogic 10.3 I have seen this error reported but have not found any working solution. Any help would be appreciated. Thanks -- View this message in context: http://www.nabble.com/NPE-on-SAAJOutEndingInterceptor-tp21418356p21418356.html Sent from the cxf-user mailing list archive at Nabble.com.