Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void authroize(String name, String password){
- String path = "http://localhost:8080/lab_soa-web/test/authorize?login=" + name + "&password=" + password;
- WebTarget wt = wsClient.target(path);
- Invocation webServiceCall = wt.request()
- .accept("application/json")
- .build("GET");
- Response response = webServiceCall.invoke();
- if (response.getStatus() == Response.Status.FORBIDDEN.getStatusCode()) {
- System.out.println("Zle haslo lub login");
- } else {
- System.out.println("Urzytkownik poprawnie zalogowany");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement