[jboss-user] [JBossWS] - Re: Steps for implementing WS-Security in JBoss using Userna

aalissa do-not-reply at jboss.com
Fri Nov 14 15:20:27 EST 2008


thanks alot for this post

i was searching the net for a way to use username token with jax-ws and it did not work for me.

i did the same as you did but their was no usename token in the wsdl
and what i did was :
1-
creating the webservice:
/**
 * 
 */
package test;

import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;

import org.jboss.annotation.security.SecurityDomain;
import org.jboss.ws.annotation.EndpointConfig;

/**
 * @author ISSA
 *
 */
@Stateless
@WebService 
(name="TestUsername", 
targetNamespace = "http://test",  
serviceName = "TestUsernameService") 
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT) 
@EndpointConfig(configName = "Standard WSSecurity Endpoint") 
@SecurityDomain("JBossWS") 

public class TestUsername {
	
	@WebMethod
	public String hi(String name)
	{
		return "hi "+name;
	}

}

2- jboss-wsse-server.xml:
<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/ws-security/config
http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">





</jboss-ws-security>

i put it in the meta-inf folder

please if you know why it did not work with me, help me :)
thanks for all of you :)


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4189524#4189524

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4189524



More information about the jboss-user mailing list