Hi Sean,

You could have done this by adding the following parameter to your clients
axis2.xml

<parameter name="Proxy">
        <Configuration>
            <ProxyHost>proxy.wso2.org</ProxyHost>
            <ProxyPort>5678</ProxyPort>
            <ProxyUser>EXAMPLE\keith</ProxyUser>
            <ProxyPassword>keithsPassword</ProxyPassword>
        </Configuration>
    </parameter>

Thanks,
Keith.

On Thu, Aug 28, 2008 at 1:40 AM, Sean Cote <[EMAIL PROTECTED]> wrote:

>  I get the following exception whenever I try to connect to my web-service
> via a proxy server:
>
>
>
> [INFO] HTTPSender - Unable to sendViaPost to url[http://mywebservice]
>
> <org.apache.axis2.AxisFault: Transport error: 407 Error: Proxy
> Authentication Required>org.apache.axis2.AxisFault: Transport error: 407
> Error: Proxy Authentication 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:371)
>
>             at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
>
>             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)
>
>
>
> I am using Axis2-1.4 with Java6u7. I just switched my client application
> from using Axis1 to Axis2. With Axis1, I was just using the system
> properties (http.proxyHost, http.proxyPort, http.proxyUser, and
> http.proxyPassword), but they don't seem to work anymore. So, I tried using
> ProxyProperties, like this, but to no avail:
>
>
>
> final HttpTransportProperties.ProxyProperties pp = new
> HttpTransportProperties.ProxyProperties();
>
> pp.setProxyName(System.getProperty("http.proxyHost"));
>
> pp.setProxyPort(Integer.parseInt(System.getProperty("http.proxyPort")));
>
> pp.setUserName(System.getProperty("http.proxyUser"));
>
> pp.setPassWord(System.getProperty("http.proxyPassword"));
>
> options.setProperty(HTTPConstants.PROXY, pp);
>
>
>
> I do have it working with a non-authenticating proxy server. I got it to
> work with Axis2 by adding this line:
>
>
>
> options.setProperty(HTTPConstants.HTTP_PROTOCOL_VERSION,
> HTTPConstants.HEADER_PROTOCOL_10);
>
>
>
> What is it that I don't understand about connecting to a web-service
> through an authenticating proxy server in Axis2?
>
>
>
> Thanks!
>
> Sean
>
>
>



-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org

Reply via email to