So, I came across this website to learn about Application Authentication with JAX-WS. I am trying to apply it in android where android acts as the web service client.
In the example provided, service function is used to access the url.
Service service = Service.create(url, qname);
While the below code is used to pass username and password:
Map<String, Object> req_ctx = ((BindingProvider)hello).getRequestContext();
req_ctx.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, WS_URL);
Map<String, List<String>> headers = new HashMap<String, List<String>>();
headers.put("Username", Collections.singletonList("mkyong"));
headers.put("Password", Collections.singletonList("password"));
req_ctx.put(MessageContext.HTTP_REQUEST_HEADERS, headers);
My question is, since android does not support javax.xml.ws.Service, then how should I approach Application Authentication with JAX-WS using android? Appreciate the advice. Thanks in advance