This content has been marked as final.
Show 2 replies
-
1. Re: How to use Username Token
darkfett Apr 26, 2007 8:31 AM (in response to darkfett)I just find the solution :
MyCall.javaService 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);
-
2. Re: How to use Username Token
benhei May 4, 2007 10:58 AM (in response to darkfett)Hi,
can you show me, how you config the serversite please..
I've similar problems i think...
I'm not sure if i config my server right..
thanks a lot
Ben