Sorry, forgot to paste the codes
| public static void main(String[] args) {
| KSBService ksb = null;
| try {
| //SSL keystore
| System.setProperty("javax.net.ssl.keyStore",
"c:\\ksbws.keystore");
| System.setProperty("javax.net.ssl.trustStore",
"c:\\ksbws.keystore");
| System.setProperty("javax.net.ssl.keyStorePassword",
"test");
| System.setProperty("javax.net.ssl.trustStorePassword",
"test");
| System.setProperty("javax.net.ssl.keyStoreType", "jks");
| System.setProperty("javax.net.ssl.trustStoreType",
"jks");
|
System.setProperty("org.jboss.security.ignoreHttpsHost","true");
|
| //Signature keystore
|
System.setProperty("org.jboss.ws.wsse.keyStore","c:\\ksbws_security.keystore");
|
System.setProperty("org.jboss.ws.wsse.trustStore","c:\\ksbws_security.keystore");
| System.setProperty("org.jboss.ws.wsse.keyStorePassword",
"test");
| System.setProperty("org.jboss.ws.wsse.trustStorePassword",
"test");
| System.setProperty("org.jboss.ws.wsse.keyStoreType",
"jks");
| System.setProperty("org.jboss.ws.wsse.trustStoreType",
"jks");
|
| Service service = Service.create(new
URL("http://localhost:8180/KSBService/KSBServiceBean?wsdl"),
| new
QName("http://xxx.xxx.de/","KSBServiceBeanService") );
|
|
|
|
| ksb= service.getPort(KSBService.class);
|
| URL securityURL = new File("META-INF/jboss-wsse-client.xml").toURL();
| URL securityConfig= new
File("META-INF/standard-jaxws-client-config.xml").toURL();
| ((StubExt) port).setSecurityConfig(securityURL.toExternalForm());
| ((StubExt) port).setConfigName("Standard WSSecurity
Client",securityConfig.toExternalForm());
|
|
| ((BindingProvider) port).getRequestContext().put(BindingProvider.USERNAME_PROPERTY,
"kermit");
| ((BindingProvider) port).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY,
"thefrog");
|
|
|
| } catch (Exception e) {
| ....
| ...
|
and also, i am not very clear about mixing jaxrpc and jaxws classes. :?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161556#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...