Unable to use JAXM through a Proxy Server
843834Jun 20 2002 — edited Jan 30 2003Hi all,
I'm trying to use the URLEndPoint method in a scenario with a proxy server which requires Basic Authentication.
Nothing to do, I get a java.security.PrivilegedActionException;
the exact exception I get is the following:
(javax.xml.soap.SOAPException: java.security.PrivilegedActionException <<javax.xm
l.soap.SOAPException: Bad response: (407Proxy Authentication Required ( The ISA
Server requires authorization to fulfill the request. Access to the Web Proxy se
rvice is denied. )>>)
In my code, the authentication is done with setRequestProperty on a URLConnection object.
Username and password are base64-coded and the property "Proxy-Authorization" is set as follow:
String authString2 = new String(uname + ":" + pword);
String somestring = new sun.misc.BASE64Encoder().encode(authString2.getBytes());
String auth2 = "Basic " + somestring;
connection.setRequestProperty ("Proxy-Authorization",
auth2);
The exception occures as soon as I try to create a URLEndpoint:
URLEndpoint urlEndpoint = new URLEndpoint("http://someserver:8080/soap/servlet/rpcrouter");
SOAPMessage reply = con.call(msg, urlEndpoint);
My test machine runs Java Web Service Developer Pack 1.0 in conjunction with JDK 1.3.1.
Any idea?
Is that the correct way to interact with proxy in a JAXM scenario?
Thanks in advance
Al