[jboss-dev-forums] [JBoss AS 7 Development] - Authentication on JBoss AS 7.1 with WS-Policy
Stefano Stefano
do-not-reply at jboss.com
Thu May 24 12:18:58 EDT 2012
Stefano Stefano [https://community.jboss.org/people/stedc] created the discussion
"Authentication on JBoss AS 7.1 with WS-Policy"
To view the discussion, visit: https://community.jboss.org/message/737740#737740
--------------------------------------------------------------
*I have this simple webservice into my JBOSS AS 7.1.*
@javax.jws.WebService(
serviceName = "HelloWorldService",
portName = "HelloWorldPort",
targetNamespace = "http://server.wssecurity.sogei.it/",
wsdlLocation = "WEB-INF/wsdl/hello-world.wsdl",
endpointInterface = "it.sogei.wssecurity.server.HelloWorld")
@EndpointConfig(configFile = "WEB-INF/jaxws-endpoint-config.xml", configName = "Custom WS-Security Endpoint")
public class HelloWorldImpl implements HelloWorld {
private static final Logger LOG = Logger.getLogger(HelloWorldImpl.class.getName());
/* (non-Javadoc)
* @see it.sogei.wssecurity.server.HelloWorld#sayHello(java.lang.String arg0 )*
*/
public java.lang.String sayHello(java.lang.String arg0) {
LOG.info("Executing operation sayHello");
System.out.println(arg0);
try {
java.lang.String _return = "Hello " +arg0;
return _return;
} catch (java.lang.Exception ex) {
ex.printStackTrace();
throw new RuntimeException(ex);
}
}
}
*My WSDL have this policy:*
<wsp:Policy wsu:Id="UsernameToken"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
<sp:SupportingTokens>
<wsp:Policy>
<sp:UsernameToken
sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
<sp:WssUsernameToken10 />
</wsp:Policy>
</sp:UsernameToken>
</wsp:Policy>
</sp:SupportingTokens>
</wsp:Policy>
*How I can configure jaxws-endpoint-config.xml and web.xml for authenticating UsernameToken with JAAS ????*
**
*Thanks in advance*
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/737740#737740]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120524/067720b5/attachment.html
More information about the jboss-dev-forums
mailing list