[jboss-user] [JBossWS] - Re: How to use Username Token
Dark Fett
do-not-reply at jboss.com
Thu Apr 26 08:31:40 EDT 2007
I just find the solution :
MyCall.java
Service service = Service.create(
| new URL("http://proxiadev34:8080/SampleJBossWS/PersonneWebService?wsdl"),
| new QName("PersonneWebServiceService")
| );
|
| URL securityURL = new File("jboss-wsse-client.xml").toURL();
| ((ServiceExt)service).setSecurityConfig(securityURL.toExternalForm());
| //((ServiceExt)service).
|
| PersonneWebService personneWS = service.getPort(PersonneWebService.class);
| ((StubExt)personneWS).setConfigName("Standard WSSecurity Client");
| Map<String, Object> reqContext = ((BindingProvider)personneWS).getRequestContext();
| reqContext.put(Stub.USERNAME_PROPERTY, "j.roucou");
| reqContext.put(Stub.PASSWORD_PROPERTY, "toto");
|
| //Appel de la Fonction getNomVille(Long codePostal)
| String ville = personneWS.getNomVille(59000);
| System.out.println(ville);
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040942#4040942
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040942
More information about the jboss-user
mailing list