Hi guys,
I try to do an authenticaed http ws-request from a CDI bean.
For that I posted this thread Webservice Authentifaction from jsf app. Beacause I thought there is problem with the Jax-WS implementation.
Authenticator.setDefault(new NavisionAuthenticator("user", "pass"));
URL url = ...
// read text returned by server
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
String line;
while ((line = in.readLine()) != null) {
logger.debug(line);
}
in.close();
In SE environment I can do that request but from my backingbean I get an auttenfication error ( http 401) did I miss something?
I trace the http traffic with wireshark.
I see that the SE client do a http authorization but the incontainer se client does not.