It LOOKS like the Axis/WSO2 wsdl is wrong (assuming you are using the stuff in the wsdl):
<wsa:Action>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT</wsa:Action> That's really not a valid Action. In this case, I would assume (since it looks like an issue request for a non-WS-SecureConv case) that it should be: <wsa:Action>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</wsa:Action> I would check the WSDL to make sure the proper action is defined for the issue operation. If you are calling the CXF STSClient directly, you can call the requestSecurityToken(String appliesTo, String action, String requestType, SecurityToken target) method directly and provide the correct action there. That may be a workaround. Dan On Monday, August 01, 2011 2:00:14 PM kishore_897 wrote: > Hi > > I am using CXF 2.4.1. I am trying create a STS Client which can get the > token from the STS token provider (wso2 identity server).. > > Below is the soap request I am expecting the CXF STS client to generate when > it sends the token request. > > I am not having clear picture whether CXF STS client API has all the APIs to > set the data. > > Yes the WSDL (sts service ) is available. I was able to generate the token > with Axis2 - Rampart. But we found some HTTP Connection issues with it . So > we were trying to achieve with CXF Stsclient. > > If you have any documentation / example on the APIs available to set the > following configuration will be helpful > > <?xml version='1.0' encoding='UTF-8'?> > <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> > <soapenv:Header > xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"> > <wsse:Security > xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri > ty-secext-1.0.xsd" soapenv:mustUnderstand="true"> > <wsu:Timestamp > xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit > y-utility-1.0.xsd" wsu:Id="Timestamp-1"> > <wsu:Created>2011-08-01T16:40:44.043Z</wsu:Created> > <wsu:Expires>2011-08-01T16:45:44.043Z</wsu:Expires> > </wsu:Timestamp> > <wsse:UsernameToken > xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit > y-utility-1.0.xsd" wsu:Id="UsernameToken-2"> > <wsse:Username>testuser</wsse:Username> > <wsse:Password > Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token > -profile-1.0#PasswordText">testuser</wsse:Password> </wsse:UsernameToken> > </wsse:Security> > <wsa:To>http://localhost:1443/services/wso2carbon-sts</wsa:To> > <wsa:ReplyTo> > <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous > </wsa:Address> </wsa:ReplyTo> > <wsa:MessageID>urn:uuid:D4399E13287E3814811312216843550</wsa:MessageID> > <wsa:Action>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT</wsa:Action> > </soapenv:Header> > <soapenv:Body> > <wst:RequestSecurityToken > xmlns:wst="http://schemas.xmlsoap.org/ws/2005/02/trust"> > <wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:Requ > estType> <wsp:AppliesTo > xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> > <wsa:EndpointReference > xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"> > <wsa:Address>http://localhost:8080/axis2/services/SecureService</wsa:Address > > </wsa:EndpointReference> > </wsp:AppliesTo> > <wst:Lifetime> > <wsu:Created > xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit > y-utility-1.0.xsd">2011-08-01T16:40:43.495Z</wsu:Created> <wsu:Expires > xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit > y-utility-1.0.xsd">2011-08-02T16:34:03.495Z</wsu:Expires> </wst:Lifetime> > <wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1 > .1#SAMLV2.0</wst:TokenType> > <wst:KeyType>http://schemas.xmlsoap.org/ws/2005/02/trust/SymmetricKey</wst: > KeyType> <wsid:ClaimType > xmlns:wsid="http://schemas.xmlsoap.org/ws/2005/05/identity" > Uri="http://wso2.org/claims/userid" /> > </wst:Claims></wst:RequestSecurityToken></soapenv:Body></soapenv:Envelope> > > > I have programatically created a client. I was able to send the request to > the server but it result in exception as action element is not set > > 2011-08-01 10:45:05,595] ERROR - The [action] cannot be processed at the > receiver. > rg.apache.axis2.AxisFault: The [action] cannot be processed at the receiver. > at > org.apache.axis2.addressing.AddressingFaultsHelper.triggerAddressingFault(Ad > dressingFaultsHelper.java:373) at > org.apache.axis2.addressing.AddressingFaultsHelper.triggerActionNotSupported > Fault(AddressingFaultsHelper.java:336) at > org.apache.axis2.handlers.addressing.AddressingInHandler.extractActionInform > ation(AddressingInHandler.java:521) at > org.apache.axis2.handlers.addressing.AddressingInHandler.extractAddressingIn > formation(AddressingInHandler.java:238) at > org.apache.axis2.handlers.addressing.AddressingInHandler.invoke(AddressingIn > Handler.java:153) at org.apache.axis2.engine.Phase.invoke(Phase.java:318) > at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:259) > at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:165) > at > org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HT > TPTransportUtils.java:173) at > org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:144) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > at > org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest( > ServletRegistration.java:90) at > org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxySer > vlet.java:111) at > org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet. > java:67) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at > org.wso2.carbon.bridge.BridgeServlet.service(BridgeServlet.java:154) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application > FilterChain.java:269) at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh > ain.java:188) at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja > va:210) at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja > va:174) at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127 > ) at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117 > ) at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java > :108) at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) > at > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) > at > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC > onnection(Http11BaseProtocol.java:665) at > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav > a:528) at > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo > rkerThread.java:81) at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav > a:685) at java.lang.Thread.run(Thread.java:662) > > > Thanks > Kishore > > > > > > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/Sample-STS-Client-tp4643980p4656674.html > Sent from the cxf-user mailing list archive at Nabble.com. -- Daniel Kulp [email protected] http://dankulp.com/blog Talend - http://www.talend.com
