camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: Problem Configuring WSS4JInInterceptor Using a Blueprint.
Date Mon, 28 Nov 2011 15:07:33 GMT
Can you check the request that you send has the security information in 
the soap message ?

On Mon Nov 28 19:47:49 2011, Chaks wrote:
> Hello,
> Please can someone help me with configuring WSS4JInInterceptor using a
> Blueprint. I am using the below Blueprint, I have two IN Interceptors,
> LoggingInInterceptor&  WSS4JInInterceptor. The LoggingInInterceptor works
> perfect, however I am having issues with WSS4JInInterceptor, I am getting
> the below excpetion,
>
> *******************************************************************************
> 2011-11-28 16:55:40,955 | WARN  | vices/HelloWorld | PhaseInterceptorChain
> | ache.cxf.common.logging.LogUtils  372 |  -  -  | Interceptor for
> {http://cxf.camel.demos.mycompany.com/}HelloWorldService has thrown
> exception, unwinding now
> org.apache.cxf.binding.soap.SoapFault: *No security action was defined!*
> 	at
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.getAction(WSS4JInInterceptor.java:466)[198:org.apache.cxf.bundle:2.5.0]
> 	at
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:225)[198:org.apache.cxf.bundle:2.5.0]
> 	at
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:85)[198:org.apache.cxf.bundle:2.5.0]
> 	at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)[198:org.apache.cxf.bundle:2.5.0]
> 	at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123)[198:org.apache.cxf.bundle:2.5.0]
> 	at
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:323)[198:org.apache.cxf.bundle:2.5.0]
> 	at
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:289)[198:org.apache.cxf.bundle:2.5.0]
> 	at
> org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)[198:org.apache.cxf.bundle:2.5.0]
> 	at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:939)[59:org.eclipse.jetty.server:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875)[59:org.eclipse.jetty.server:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)[59:org.eclipse.jetty.server:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:247)[59:org.eclipse.jetty.server:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)[59:org.eclipse.jetty.server:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.server.Server.handle(Server.java:342)[59:org.eclipse.jetty.server:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)[59:org.eclipse.jetty.server:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1065)[59:org.eclipse.jetty.server:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:823)[55:org.eclipse.jetty.http:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)[55:org.eclipse.jetty.http:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)[59:org.eclipse.jetty.server:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)[54:org.eclipse.jetty.io:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)[54:org.eclipse.jetty.io:7.4.5.v20110725]
> 	at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)[53:org.eclipse.jetty.util:7.4.5.v20110725]
> 	at java.lang.Thread.run(Thread.java:619)[:1.6.0_04]
>
> *******************************************************************************
>
> Please find the Blueprint that I have used,
>
> *******************************************************************************
> <?xml version="1.0" encoding="UTF-8"?>
>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
>             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
> xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
>             xmlns:jaxws="http://cxf.apache.org/blueprint/jaxws"
>             xmlns:cxf="http://cxf.apache.org/blueprint/core"
>             xmlns:camel="http://camel.apache.org/schema/blueprint"
>             xmlns:camelcxf="http://camel.apache.org/schema/blueprint/cxf"
>             xsi:schemaLocation="
>               http://www.osgi.org/xmlns/blueprint/v1.0.0
> http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
>               http://cxf.apache.org/blueprint/jaxws
> http://cxf.apache.org/schemas/blueprint/jaxws.xsd
>               http://cxf.apache.org/blueprint/core
> http://cxf.apache.org/schemas/blueprint/core.xsd">
>
>    <camelcxf:cxfEndpoint id="helloworld-ws"
>    address="http://localhost:9000/services/HelloWorld"
>    wsdlURL="META-INF/wsdl/helloworld.wsdl"
>    serviceClass="com.mycompany.demos.camel.cxf.HelloWorld">
>      <camelcxf:inInterceptors>
>        <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
>        <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
>          <constructor-arg>
>            <map>
>              <entry key="action" value="UsernameToken"/>
>              <entry key="passwordType" value="PasswordDigest"/>
>              <entry key="passwordCallbackRef" ref="pwClbck"/>
>            </map>
>          </constructor-arg>
>        </bean>
>      </camelcxf:inInterceptors>
>      <camelcxf:outInterceptors>
>        <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
>      </camelcxf:outInterceptors>
>    </camelcxf:cxfEndpoint>
>
>    <camelContext id="camel" xmlns="http://camel.apache.org/schema/blueprint">
>      <route>
>        <from uri="cxf:bean:helloworld-ws"/>
>        <choice>
>          <when>
>            <simple>${in.header.operationName} == 'greet'</simple>
>            <to uri="greetBean"/>
>          </when>
>        </choice>
>      </route>
>    </camelContext>
>
>    <bean id="greetBean"
> class="com.mycompany.camelcxfdemo.processor.GreetProcessor"/>
>    <bean id="pwClbck"
> class="com.mycompany.camelcxfdemo.callback.ClientPasswordCallback"/>
>
> </blueprint>
> *******************************************************************************
>
> Thanks,
> Chaks.
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Problem-Configuring-WSS4JInInterceptor-Using-a-Blueprint-tp5028621p5028621.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang 
Weibo: willemjiang 


Mime
View raw message