cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Mark_W...@dell.com>
Subject Security processing failed (actions mismatch) when .NET WSE3.0 call the cxf webservice with UsernameToken authentication
Date Mon, 24 Sep 2007 11:13:33 GMT
Hi All,
 
I got a problem when I wrote .net code to call cxf. Can anyone help me out? Thanks in advance.
 
Error stack:
joe
password11
2007-9-24 18:47:09 org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor handleMessage
警告: Security processing failed (actions mismatch)
2007-9-24 18:47:09 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
信息: Interceptor has thrown exception, unwinding now
org.apache.cxf.binding.soap.SoapFault: ACTION_MISMATCH
 at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:207)
 at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:59)
 at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
 at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:73)
 at org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:78)
 at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:231)
 at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:139)
 at org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:271)
 at org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.java:249)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
 at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
 at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
 at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
 at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3245)
 at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
 at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
 at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2003)
 at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1909)
 at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)
 at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
 at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
 
jaxws config:
<jaxws:endpoint id="helloWorld" implementor="demo.spring.HelloWorldImpl" address="/HelloWorld">
  <jaxws:inInterceptors>
   <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor" />
   <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
    <constructor-arg>
     <map>
      <entry key="action" value="UsernameToken" />
      <entry key="passwordType" value="PasswordText" />
      <entry key="passwordCallbackClass" value="demo.spring.AuthenticationCallbackHandler"
/>
     </map>
    </constructor-arg>
   </bean>
  </jaxws:inInterceptors>
 </jaxws:endpoint>
 
 
.NET client code:
            localhost.HelloWorldImplServiceWse service = new CXFTest.localhost.HelloWorldImplServiceWse();
            service.SoapVersion = System.Web.Services.Protocols.SoapProtocolVersion.Soap11;

            UsernameToken token = new UsernameToken("joe", "password", PasswordOption.SendPlainText);
            service.SetClientCredential<UsernameToken>(token);
            service.SetPolicy("ClientPolicy");
 
            sayHi hi = new sayHi();
            hi.arg0 = "test";
            service.sayHi(hi);
 
 
Thanks,
Mark

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message