You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Raj Maddy <kn...@yahoo.com> on 2008/12/22 18:52:57 UTC

Re: Axis2 Proxy Configuration problem



valery ngah wrote:
> 
> 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?
> 
> 

hi valery,

you are authorizatio and proxy authorization are different,  you encounter
407 error when the proxy.Username and proxy.password credentials supplied in
proxy properties doesn't have permissions to cross the proxy. Please ensure
your proxy credentials are correct.
-- 
View this message in context: http://www.nabble.com/Axis2-Proxy-Configuration-problem-tp18508857p21132017.html
Sent from the Axis - User mailing list archive at Nabble.com.