Hi all,
I have a web service application that has to use a proxy. I am using the
latest version of axis2 1.4
The properties of the proxy is set programmatically as shown below.
<code>
</pre>
HttpTransportProperties.ProxyProperties pp = new
HttpTransportProperties.ProxyProperties();
pp.setProxyName(proxy.proxyName);
pp.setProxyPort(proxy.port);
pp.setUserName(proxy.userName);
pp.setPassWord(proxy.password);
_serviceClient.getOptions().setProperty(HTTPConstants.PROXY,pp);
HttpTransportProperties.Authenticator auth =new
HttpTransportProperties.Authenticator();
auth.setUsername(proxy.userName);
auth.setPassword(proxy.password);
auth.setPreemptiveAuthentication(true);
auth.setRealm(HttpTransportProperties.Authenticator.BASIC);
// List authPrefs = new Vector<String>(1);
// authPrefs.add(AuthPolicy.BASIC);
_serviceClient.getOptions().setProperty(HTTPConstants.AUTHENTICATE,auth);
//
_serviceClient.getOptions().setProperty(AuthPolicy.AUTH_SCHEME_PRIORITY,authPrefs);
</pre>
</code>
I have been having this error message always
<code>
<pre>
org.apache.axis2.AxisFault: Transport error: 407 Error: Proxy Auth Required
at
org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:296)
at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:190)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:364)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:208)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at
com.coremedia.applications.drm.opt.axis.OPSStub.getUid(OPSStub.java:2458)
....
...
</pre>
</code>
Watching the header properties in Fiddler (HTTP Debuging Proxy) I realized
that the authorization and proxy-authorization are different
Authorization: Basic MTox
Proxy-Authorization: Basic Og==
I expect both to have MTox (64 based encoded password and username which is
1:1). Instead am getting just (:).
am I forgetting something?