[JBossWS] - WS-Security and Handlers
by pramod_bs
I have a simple web service which I have implemented username token authentication. Also I have my own Policy handler which I have configured using @handlerChain. I would like to invoke this handler between the JBossWS authenticates the usernametoken and actual execution of the method.
package test;
import javax.ejb.Stateless;
import javax.jws.HandlerChain;
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.soap.SOAPBinding;
import org.jboss.annotation.security.SecurityDomain;
import org.jboss.ws.annotation.EndpointConfig;
import com.sun.xacml.Indenter;
import com.sun.xacml.ctx.ResponseCtx;
@Stateless
@WebService
(name="TestWSEJB",
targetNamespace = "http://test",
serviceName = "TestWSEJBService")
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
@EndpointConfig(configName = "Standard WSSecurity Endpoint")
@SecurityDomain("JBossWS")
@HandlerChain(file = "jaxws-handlers-server.xml")
public class TestWSEJB {
@WebMethod
public String ping (String name) throws Exception
{
return "Hello : " + name;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
<handler-chain>
<protocol-bindings>##SOAP11_HTTP</protocol-bindings>
<handler-name> PolicyHandler </handler-name>
<handler-class> test.WSXACMLPolicyHandler </handler-class>
<soap-role>SecurityProvider</soap-role>
</handler-chain>
</handler-chains>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138622#4138622
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138622
16 years, 9 months
[JBossWS] - Re: wstools-config.xml
by jpramondon
Hi there,
I'm probably exhuming a pretty old post now, but I just wanted to make things clearer for me.
I've been reading a lot this week-end on JBossWS, WStools and a lot of surrounding topics and suffs.
>From what I understand, you suggest giving up using WSTools in the profit of annotations.
Here's where I'm a bit confused :
- I thought annotations where for JAX-WS
- I know I can (correct me if I'm wrong alright) do some JAX-RPC with JAX-WS, because the latter supports the former.
- but wasn't JAX-WS only to use with Java 6 ? Or in other words : may I use annotations to replace my use of WSTools even if I'm coding JAX-RPC style webservices with java 5 ?
Cheers,
J
"thomas.diesler(a)jboss.com" wrote : webservices.xml supports multiple service endpoints. You have to merge the wstools generated webservices.xml files manully.
|
| BTW, wscompile does not generate webservices.xml at all.
|
| Why not use JSR181 endpoints and get rid of all those offline tools generation issue all together?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138588#4138588
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138588
16 years, 9 months
[JBossWS] - Re: WebService response problem
by PeterJ
If you look at the runtime library that accompanies JDK 6, you will see that it now includes many of the web services packages that were not in JDK 5. Every Java SE release, it appears that Sun adds in more packages that earlier had appeared only in Java EE. Because JBossAS 4.2.x and 4.0.x are qualified with JDK 5, they include the web services jars, which are not at the same level as the ones on JDK 6. (From what I recall when I researched this in depth many months ago, the web services libraries included in JBossAS 4.2.x were newer than what is included in JDK 6.) Placing the web service jars from JBossAS into the endorsed directory causes the JDK to use those classes instead of the ones in the runtime jar.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138575#4138575
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138575
16 years, 9 months