21 lines
596 B
Plaintext
21 lines
596 B
Plaintext
/*
|
|
Librairie JAX-WS
|
|
Générer les classes d'accès au webservice grâce à l'utilitaire "wsimport"
|
|
*/
|
|
|
|
String login = "login";
|
|
String password = "password";
|
|
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();
|
|
} |