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 4AD5CC323 for ; Thu, 20 Nov 2014 07:23:38 +0000 (UTC) Received: (qmail 7208 invoked by uid 500); 20 Nov 2014 07:23:37 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 7154 invoked by uid 500); 20 Nov 2014 07:23:37 -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 7142 invoked by uid 99); 20 Nov 2014 07:23:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Nov 2014 07:23:37 +0000 X-ASF-Spam-Status: No, hits=1.6 required=5.0 tests=FREEMAIL_REPLY,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.192.177 as permitted sender) Received: from [209.85.192.177] (HELO mail-pd0-f177.google.com) (209.85.192.177) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Nov 2014 07:23:11 +0000 Received: by mail-pd0-f177.google.com with SMTP id ft15so2517698pdb.22 for ; Wed, 19 Nov 2014 23:21:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :content-type:content-transfer-encoding:content-disposition; bh=ZFvFqFZ1tAXuRsEO9gm+5ioHtKbakuGHGSxzlYotM4Q=; b=YoE1JTZ1cKMNUh+wi8NRCXT94AIrrVZKCNTXnHtIq+Yukwc4ANKq32Q1xCCHX24PXb L7PjGdK0JWr4J2EEK4h9/c2wAq6Tk9R4XIi7Jw7wWRHDMbDONlWLjdsgki+/972X3eGC Ys9cMJGtSEcauNcZJBX3NdirynhDByuFTLwjburQFS16XCfpUkkFMNzyShKy7b++60ln pVVlGVhAz3v00A2TFIRDZvxDarsyYjxHDzYv6pjcKbQZD17s3ZGKK+b3n+cRmuLRlX4R UdxLF6HRUuZGrCkdubArAUZSXwJR+F0hnPZXh+iulnhhd+1c73cgc/SN6mX8dyBfYg8T m5+w== X-Received: by 10.70.96.68 with SMTP id dq4mr53893016pdb.61.1416468100382; Wed, 19 Nov 2014 23:21:40 -0800 (PST) Received: from localhost ([123.115.66.243]) by mx.google.com with ESMTPSA id u4sm1000952pbs.60.2014.11.19.23.21.37 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Nov 2014 23:21:39 -0800 (PST) Date: Thu, 20 Nov 2014 15:21:29 +0800 From: Willem Jiang To: users@camel.apache.org Message-ID: In-Reply-To: <1416398388966-5759326.post@n5.nabble.com> References: <1416398388966-5759326.post@n5.nabble.com> Subject: Re: Problem Configuring WSS4JInInterceptor using camel-config.xml X-Mailer: Airmail (249) 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 When you use the Message data format, camel cxf endpoint doesn=E2=80=99t = read the request message which means it doesn=E2=80=99t prepare the SOAP = message header for=C2=A0WSS4JInInterceptor to process. You can change the CX=46 endpoint data format to=C2=A0CX=46=5FMESSAGE, in= this way, camel-cxf call all the interceptors and you can access the mes= sage body just like MESSAGE data format. -- =20 Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang =20 Weibo: =E5=A7=9C=E5=AE=81willem On November 19, 2014 at 8:05:58 PM, Royamit (amitroy005=40gmail.com) wrot= e: > Hi, > =20 > I am trying to configure WSS4JInInterceptor in my cxf endpoint. > =20 > Below is my camel-config.xml > =20 > =20 > =20 > =20 > > xmlns:xsi=3D=22http://www.w3.org/2001/XMLSchema-instance=22 > xmlns:camel=3D=22http://camel.apache.org/schema/spring=22 > xmlns:cxf=3D=22http://camel.apache.org/schema/cxf=22 > xmlns:context=3D=22http://www.springframework.org/schema/context=22 > xsi:schemaLocation=3D=22 > http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans.xsd > http://www.springframework.org/schema/context > http://www.springframework.org/schema/context/spring-context.xsd > http://camel.apache.org/schema/spring > http://camel.apache.org/schema/spring/camel-spring.xsd > http://camel.apache.org/schema/cxf > http://camel.apache.org/schema/cxf/camel-cxf.xsd=22> > =20 > =20 > > location=3D=22classpath:incident.properties,file:target/custom.proper= ties=22 > ignore-resource-not-found=3D=22true=22/> > =20 > =20 > > class=3D=22org.apache.camel.example.cxf.proxy.EnrichBean=22/> > =20 > > class=3D=22org.apache.cxf.interceptor.LoggingOutInterceptor=22/> > > class=3D=22org.apache.cxf.interceptor.LoggingInInterceptor=22/> > =20 > *> class=3D=22org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor=22> > =20 > =20 > =20 > =20 > > value=3D=22org.apache.camel.example.cxf.proxy.UTPasswordCallback=22/>= > =20 > =20 > * > =20 > =20 > *> =20 > address=3D=22http://localhost:=24=7Bproxy.port=7D/camel-example-cxf-pro= xy/webservices/versionAdapter=22 =20 > endpointName=3D=22s:VersionHttpSoap11Endpoint=22 > serviceName=3D=22s:Version=22 > wsdlURL=3D=22etc/versionAdapter.wsdl=22 > xmlns:s=3D=22http://axisversion.sample=22> > =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 > * > =20 > =20 > =20 > =20 > > location=3D=22classpath:incident.properties,file:target/custom.proper= ties=22/> =20 > =20 > > uri=3D=22http://localhost:=24=7Breal.port=7D/axis2/services/Version=3F= bridgeEndpoint=3Dtrue&throwExceptionOn=46ailure=3Dfalse=22/> =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 > When i invoke my proxy webservice i am getting error. Here is the compl= ete > error trace.. > =20 > IN=46O: Inbound Message > ---------------------------- > ID: 1 > Address: > http://localhost:9080/camel-example-cxf-proxy/webservices/versionAdapte= r =20 > Encoding: UT=46-8 > Http-Method: POST > Content-Type: text/xml;charset=3DUT=46-8 > Headers: =7Baccept-encoding=3D=5Bgzip,deflate=5D, connection=3D=5Bkeep-= alive=5D, > Content-Length=3D=5B1097=5D, content-type=3D=5Btext/xml;charset > =3DUT=46-8=5D, Host=3D=5Blocalhost:9080=5D, SOAPAction=3D=5B=22urn:getV= ersion=22=5D, > User-Agent=3D=5BApache-HttpClient/4.1.1 (java 1.5)=5D=7D > Payload: *> xmlns:soapenv=3D=22http://schemas.xmlsoap.org/soap/envelop > e/=22> > > xmlns:wsse=3D=22http://docs.oasis-open.org/wss/2004/01/oasis-20 > 0401-wss-wssecurity-secext-1.0.xsd=22 > xmlns:wsu=3D=22http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-= wssecurity-utilit =20 > y-1.0.xsd=22>> wsu:Id=3D=22TS-30=22>2014-11-19T11:53:20Z2014-11-19T12:2= 6:40 =20 > Z> wsu:Id=3D=22UsernameToken-29=22>opp> sword > Type=3D=22http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-usern= ame-token-profile-1.0=23PasswordDigest=22>H76Ia3oU5 =20 > CYr84Z7ca49tTg6a=46E=3D> EncodingType=3D=22http://docs.oasis-open.org/w= ss/2004/01/oasis-200401-wss-soa =20 > p-message-security-1.0=23Base64Binary=22>JbhLoh/642uk37hUuCEuNQ=3D=3D20= 14-11-19T11:53:20.271Z> ated> > =20 > =20 > =20 > *-------------------------------------- > Inside UTPasswordCallback Method =40 UTPasswordCallback class > Wed Nov 19 17:22:43 IST 2014 Inside UTPasswordCallback()--> > UTPasswordCallback Class > Nov 19, 2014 5:22:43 PM org.apache.cxf.ws.security.wss4j.WSS4JInInterce= ptor > checkActions > *WARNING: Security processing failed (actions mismatch)* > Nov 19, 2014 5:22:43 PM org.apache.cxf.phase.PhaseInterceptorChain > doDefaultLogging > =20 > WARNING: Interceptor for =7Bhttp://axisversion.sample=7DVersion has thr= own > exception, unwinding now > org.apache.cxf.binding.soap.Soap=46ault: An error was discovered proces= sing > the header. > at > org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.createSoap=46ault(W= SS4JInInterceptor.java:809) > at > org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4J= InInterceptor.java:313) =20 > at > org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4J= InInterceptor.java:93) =20 > at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptor= Chain.java:307) =20 > at > org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiat= ionObserver.java:121) =20 > at > org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHT= TPDestination.java:243) =20 > at > org.apache.cxf.transport.http=5Fjetty.JettyHTTPDestination.doService(Je= ttyHTTPDestination.java:261) =20 > at > org.apache.cxf.transport.http=5Fjetty.JettyHTTPHandler.handle(JettyHTTP= Handler.java:70) =20 > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler= .java:1088) =20 > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.= java:1024) =20 > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.jav= a:135) =20 > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(Contex= tHandlerCollection.java:255) =20 > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.j= ava:116) =20 > at org.eclipse.jetty.server.Server.handle(Server.java:370) > at > org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractH= ttpConnection.java:494) =20 > at > org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpCon= nection.java:982) =20 > at > org.eclipse.jetty.server.AbstractHttpConnection=24RequestHandler.conten= t(AbstractHttpConnection.java:1043) =20 > at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865) > at > org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) > at > org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection= .java:82) =20 > at > org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndP= oint.java:696) =20 > at > org.eclipse.jetty.io.nio.SelectChannelEndPoint=241.run(SelectChannelEnd= Point.java:53) =20 > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.= java:608) =20 > at > org.eclipse.jetty.util.thread.QueuedThreadPool=243.run(QueuedThreadPool= .java:543) =20 > at java.lang.Thread.run(Thread.java:722) > Caused by: org.apache.wss4j.common.ext.WSSecurityException: An error wa= s > discovered processing the heade > r > at > org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.checkActions(WSS4JI= nInterceptor.java:339) =20 > at > org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4J= InInterceptor.java:297) =20 > ... 23 more > =20 > I am unable to figure out what this error is all about and how can i re= ctify > this error=3F > =20 > =20 > =20 > -- > View this message in context: http://camel.465427.n5.nabble.com/Problem= -Configuring-WSS4JInInterceptor-using-camel-config-xml-tp5759326.html =20 > Sent from the Camel - Users mailing list archive at Nabble.com. > =20