axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-4131) Java http proxy settings override programmatic settings
Date Tue, 02 Dec 2008 22:52:46 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-4131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652571#action_12652571
] 

Andreas Veithen commented on AXIS2-4131:
----------------------------------------

In the code (ProxyConfiguration#configure), system properties indeed override any other proxy
settings (programmatic and axis2.xml). Since the documentation says that "[at] runtime, the
user can override the PROXY settings using the HttpTransportProperties.ProxyProperties object",
I guess this is a bug and programmatic settings should override settings in axis2.xml which
in turn would override system properties. That would be the most logical approach, since it
implies that settings with a smaller scope override settings with a larger scope. If there
are no objections from other people, I will change the code.


> Java http proxy settings override programmatic settings
> -------------------------------------------------------
>
>                 Key: AXIS2-4131
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4131
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Devin Rosenbauer
>            Priority: Minor
>
> My code:
> Options options = stub._getServiceClient().getOptions();
> 		
> HttpTransportProperties.ProxyProperties pp = 
> new HttpTransportProperties.ProxyProperties();
> 		
> pp.setProxyName(proxyHost);
> pp.setProxyPort(proxyPort);
> 		
> options.setProperty(HTTPConstants.PROXY, pp);
> And in other code, not under my control:
> Properties p = System.getProperties( );
> if ( ( null != proxyHost ) && ( null != proxyPort ) )
> {
>             p.setProperty( "http.proxySet", "true" );
>             
>             if ( null != proxyHost )
>                 p.setProperty( "http.proxyHost", proxyHost );
>             if ( null != proxyPort )
>                 p.setProperty( "http.proxyPort", proxyPort );
> } 
> This leads to an inexplicable failure to connect through the proxy, because the second
bit of code is using different proxy settings that won't work in the Axis2 WS call. For now,
I can work around this bug by clearing and re-setting the proxy values just before I call
methods in my Stub class, but this is a bit silly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message