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

Robert Lazarski commented on AXIS2-5948:
----------------------------------------

I think I see the problem, however we are on httpclient5 now in git and the 
proposed fix at a glance seems to have the credsProvider variable out of scope. 

The code below is now in git, I am going to mark the issue as fixed however if 
anyone sees a problem with it or can test on a jakarta ee10 compliant server 
like Wildfly 32 / tomcat 11 and something is broken - please reopen the issue. 
 
https://github.com/apache/axis-axis2-java-core/blob/master/modules/transport/http/src/main/java/org/apache/axis2/transport/http/impl/httpclient5/HTTPProxyConfigurator.java#L146

// AXIS2-6051, CredentialsProvider no longer has setCredentials() however 
BasicCredentialsProvider
        // does have it. clientContext.getCredentialsProvider() returns 
CredentialsProvider. 
        if (proxyCredentials != null) {
            requestConfig.setAuthenticationEnabled(true);
            BasicCredentialsProvider credsProvider = new 
BasicCredentialsProvider();
            clientContext.setCredentialsProvider(credsProvider);
            credsProvider.setCredentials(new AuthScope(null, -1), 
proxyCredentials);
        }

> Proxy settings ignored if username not specified
> ------------------------------------------------
>
>                 Key: AXIS2-5948
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5948
>             Project: Axis2
>          Issue Type: Bug
>          Components: jaxws, transports
>    Affects Versions: 1.7.7, 1.7.9
>            Reporter: Kevin Perry
>            Assignee: Robert Lazarski
>            Priority: Major
>             Fix For: 2.0.0
>
>
> org/apache/axis2/transport/http/impl/httpclient4/HTTPProxyConfigurator.configure
>  carefully collects the proxy details, but then does not call the following 
> code if no username is provided:
>  
> {code:java}
> HttpHost proxy = new HttpHost(proxyHost, proxyPort);
> requestConfig.setProxy(proxy);
> {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@axis.apache.org
For additional commands, e-mail: java-dev-h...@axis.apache.org

Reply via email to