-
1. Re: WS-Security client?
kadlecp Jul 19, 2007 3:40 AM (in response to andycooper)Hello, my WS-Security client looks like this. It works.
public class TestClient {
/**
* @param args
*/
public static void main(String[] args) throws Exception {
BasicConfigurator.configure();
System.setProperty("org.jboss.ws.wsse.keyStore", "resources/wsse.keystore");
System.setProperty("org.jboss.ws.wsse.trustStore", "resources/wsse.keystore");
System.setProperty("org.jboss.ws.wsse.keyStorePassword", "jbossws");
System.setProperty("org.jboss.ws.wsse.trustStorePassword", "jbossws");
System.setProperty("org.jboss.ws.wsse.keyStoreType", "jks");
System.setProperty("org.jboss.ws.wsse.keyStoreType", "jks");
URL wsdlFileURL = new URL("http://localhost:8080/simpleencrypt?wsdl");
QName qname = new QName("http://org.jboss.ws/samples/wssecurity", "HelloService");
URL securityURL = new File("resources/jboss-wsse-client.xml").toURI().toURL();
Service service = Service.create(wsdlFileURL, qname);
((ServiceExt)service).setSecurityConfig(securityURL.toExternalForm());
Hello port = service.getPort(Hello.class);
((StubExt)port).setConfigName("Standard WSSecurity Client");
String ret = port.echoUserType("hello world!");
System.out.println(ret);
}
} -
2. Re: WS-Security client?
kadlecp Jul 19, 2007 3:48 AM (in response to andycooper)I use JBossWS 1.2.1.GA With JBossWS 2.0.0.GA. It works as well. But there is one small change in api. Except the line
((ServiceExt)service).setSecurityConfig(securityURL.toExternalForm());
in JBossWS 1.2.1
there is the line
((StubExt)port).setSecurityConfig(securityURL.toExternalForm());
inJBossWS 2.0.0. -
3. Re: WS-Security client?
andycooper Jul 19, 2007 10:17 AM (in response to andycooper)Thanks! That, and the fact that I can't type in paths correctly, solved my problem :)