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 Andrew Bowes <an...@cpp.co.uk> on 2009/06/03 16:38:29 UTC

Proxy Authenication Failure

Hi Guys

 

I have just migrated to Axis2 from Axis and I am encountering a problem
when attempting to invoke a Web Service via a Proxy Server.

 

I have the following code which assigns the details of the proxy to the
Service Client:

 

   HttpTransportProperties.ProxyProperties proxyProperties = new
HttpTransportProperties.ProxyProperties();

    proxyProperties.setProxyName("myproxy");

    proxyProperties.setProxyPort(8080);

    proxyProperties.setDomain("my-domain");

    proxyProperties.setPassWord("password");

    proxyProperties.setUserName("myusername");

    //in order to makesure that we use HTTP 1.0

 
_serviceClient.getOptions().setProperty(HTTPConstants.CHUNKED,false);

    _serviceClient.getOptions().setProperty(
HTTPConstants.PROTOCOL_VERSION, HTTPConstants.HEADER_PROTOCOL_10);

 
_serviceClient.getOptions().setProperty(org.apache.axis2.transport.http.
HTTPConstants.PROXY, proxyProperties);

 

 

However I get the following error when I attempt to execute the
operation:  org.apache.axis2.AxisFault: Transport error: 407 Error:
Proxy Authentication Required

 

I have debugged my code to check that the Service Client on the
operation contains the details of the proxy server and it all looks to
be correct.  Axis2 doesn't seem to take any notice of the details of the
proxy (i.e. I can invent server names & ports).

 

Hope someone can identify what I am missing.

 

Thanks

 

Andy Bowes


This is an email from the CPP Group Plc, Holgate Park, York, YO26 4GA; telephone +44 (0)1904 544500.
This message may contain information that is confidential. If you are not the intended recipient,
you may not peruse, use, disseminate, distribute or copy this message. If you have received this
message in error, please notify the sender immediately by email, facsimile or telephone and either
return or destroy the original message.

The CPP Group Plc accepts no responsibility for any changes made to this message after it has been
sent by the original author.  This email has been scanned for all viruses by the MessageLabs 
Email Security System.

RE: Proxy Authenication Failure

Posted by Andrew Bowes <an...@cpp.co.uk>.
Thanks Andreas

That did the job.

-----Original Message-----
From: Andreas Veithen [mailto:andreas.veithen@gmail.com] 
Sent: 03 June 2009 15:42
To: axis-user@ws.apache.org
Subject: Re: Proxy Authenication Failure

Could be issue AXIS2-4131.

Andreas

On Wed, Jun 3, 2009 at 16:38, Andrew Bowes <an...@cpp.co.uk> wrote:
> Hi Guys
>
>
>
> I have just migrated to Axis2 from Axis and I am encountering a problem when
> attempting to invoke a Web Service via a Proxy Server.
>
>
>
> I have the following code which assigns the details of the proxy to the
> Service Client:
>
>
>
>    HttpTransportProperties.ProxyProperties proxyProperties = new
> HttpTransportProperties.ProxyProperties();
>
>     proxyProperties.setProxyName("myproxy");
>
>     proxyProperties.setProxyPort(8080);
>
>     proxyProperties.setDomain("my-domain");
>
>     proxyProperties.setPassWord("password");
>
>     proxyProperties.setUserName("myusername");
>
>     //in order to makesure that we use HTTP 1.0
>
>     _serviceClient.getOptions().setProperty(HTTPConstants.CHUNKED,false);
>
>     _serviceClient.getOptions().setProperty( HTTPConstants.PROTOCOL_VERSION,
> HTTPConstants.HEADER_PROTOCOL_10);
>
>
> _serviceClient.getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.PROXY,
> proxyProperties);
>
>
>
>
>
> However I get the following error when I attempt to execute the operation:
> org.apache.axis2.AxisFault: Transport error: 407 Error: Proxy Authentication
> Required
>
>
>
> I have debugged my code to check that the Service Client on the operation
> contains the details of the proxy server and it all looks to be correct.
> Axis2 doesn't seem to take any notice of the details of the proxy (i.e. I
> can invent server names & ports).
>
>
>
> Hope someone can identify what I am missing.
>
>
>
> Thanks
>
>
>
> Andy Bowes
>
> This is an email from the CPP Group Plc, Holgate Park, York, YO26 4GA;
> telephone +44 (0)1904 544500.
> This message may contain information that is confidential. If you are not
> the intended recipient,
> you may not peruse, use, disseminate, distribute or copy this message. If
> you have received this
> message in error, please notify the sender immediately by email, facsimile
> or telephone and either
> return or destroy the original message.
>
> The CPP Group Plc accepts no responsibility for any changes made to this
> message after it has been
> sent by the original author.  This email has been scanned for all viruses by
> the MessageLabs
> Email Security System.

This is an email from the CPP Group Plc, Holgate Park, York, YO26 4GA; telephone +44 (0)1904 544500.
This message may contain information that is confidential. If you are not the intended recipient,
you may not peruse, use, disseminate, distribute or copy this message. If you have received this
message in error, please notify the sender immediately by email, facsimile or telephone and either
return or destroy the original message.

The CPP Group Plc accepts no responsibility for any changes made to this message after it has been
sent by the original author.  This email has been scanned for all viruses by the MessageLabs 
Email Security System.

Re: Proxy Authenication Failure

Posted by Andreas Veithen <an...@gmail.com>.
Could be issue AXIS2-4131.

Andreas

On Wed, Jun 3, 2009 at 16:38, Andrew Bowes <an...@cpp.co.uk> wrote:
> Hi Guys
>
>
>
> I have just migrated to Axis2 from Axis and I am encountering a problem when
> attempting to invoke a Web Service via a Proxy Server.
>
>
>
> I have the following code which assigns the details of the proxy to the
> Service Client:
>
>
>
>    HttpTransportProperties.ProxyProperties proxyProperties = new
> HttpTransportProperties.ProxyProperties();
>
>     proxyProperties.setProxyName("myproxy");
>
>     proxyProperties.setProxyPort(8080);
>
>     proxyProperties.setDomain("my-domain");
>
>     proxyProperties.setPassWord("password");
>
>     proxyProperties.setUserName("myusername");
>
>     //in order to makesure that we use HTTP 1.0
>
>     _serviceClient.getOptions().setProperty(HTTPConstants.CHUNKED,false);
>
>     _serviceClient.getOptions().setProperty( HTTPConstants.PROTOCOL_VERSION,
> HTTPConstants.HEADER_PROTOCOL_10);
>
>
> _serviceClient.getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.PROXY,
> proxyProperties);
>
>
>
>
>
> However I get the following error when I attempt to execute the operation:
> org.apache.axis2.AxisFault: Transport error: 407 Error: Proxy Authentication
> Required
>
>
>
> I have debugged my code to check that the Service Client on the operation
> contains the details of the proxy server and it all looks to be correct.
> Axis2 doesn’t seem to take any notice of the details of the proxy (i.e. I
> can invent server names & ports).
>
>
>
> Hope someone can identify what I am missing.
>
>
>
> Thanks
>
>
>
> Andy Bowes
>
> This is an email from the CPP Group Plc, Holgate Park, York, YO26 4GA;
> telephone +44 (0)1904 544500.
> This message may contain information that is confidential. If you are not
> the intended recipient,
> you may not peruse, use, disseminate, distribute or copy this message. If
> you have received this
> message in error, please notify the sender immediately by email, facsimile
> or telephone and either
> return or destroy the original message.
>
> The CPP Group Plc accepts no responsibility for any changes made to this
> message after it has been
> sent by the original author.  This email has been scanned for all viruses by
> the MessageLabs
> Email Security System.