2010-09-30 07:15:53 +00:00
|
|
|
/*
|
|
|
|
Librairie JAX-WS
|
|
|
|
Générer les classes d'accès au webservice grâce à l'utilitaire "wsimport"
|
|
|
|
*/
|
|
|
|
|
2010-09-30 13:08:49 +00:00
|
|
|
String login = "login";
|
|
|
|
String password = "password";
|
2010-09-30 07:15:53 +00:00
|
|
|
String hash = "";
|
|
|
|
hash = LMD5Gen.md5(login+"|"+password);
|
|
|
|
|
|
|
|
WsEntrepriseService service = new WsEntrepriseService();
|
|
|
|
try {
|
|
|
|
WsEntreprisePort port = service.getWsEntreprisePort();
|
|
|
|
((BindingProvider)port).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, login);
|
|
|
|
((BindingProvider)port).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, hash);
|
|
|
|
// ...
|
|
|
|
//Opération
|
|
|
|
// ...
|
|
|
|
} catch(Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|