You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Dennis Kieselhorst (JIRA)" <ji...@apache.org> on 2018/08/08 18:22:00 UTC

[jira] [Commented] (CXF-7812) Apache CXF - NTLM Authentcation :Server Redirected too many times

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

Dennis Kieselhorst commented on CXF-7812:
-----------------------------------------

I'm afraid but there are multiple open issues related to NTLM: CXF-5419, CXF-5671, CXF-5890, CXF-6254, CXF-6651

We welcome pull requests on GitHub for this.

> Apache CXF - NTLM Authentcation :Server Redirected too many times
> -----------------------------------------------------------------
>
>                 Key: CXF-7812
>                 URL: https://issues.apache.org/jira/browse/CXF-7812
>             Project: CXF
>          Issue Type: Test
>          Components: Core, JAX-WS Runtime, Simple Frontend
>    Affects Versions: 3.0.1
>            Reporter: Kunal Kishan
>            Priority: Major
>
> {{{{Caused by: java.net.ProtocolException: Server redirected too many times (20) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1914) ~[?:1.8.0] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1504) ~[?:1.8.0] at com.ibm.net.ssl.www2.protocol.https.b.getInputStream(b.java:35) ~[?:8.0 build_20180213] at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) ~[?:?] at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source) ~[?:?] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) ~[?:?] at org.apache.xerces.parsers.XML11Configuratio}}}}
> Source Code :
> ystem.setProperty("http.auth.ntlm.domain", "BLA");
>         CookieHandler.setDefault(new CookieManager(null, 
>         CookiePolicy.ACCEPT_ALL));
>         Authenticator.setDefault(new MyAuthenticator());        
>         System.out.println("Hello from here");        
>         URL url = null;
>         try {
>             url = new URL("https://bla.com/ews");
>         } catch (MalformedURLException e) {
>             e.printStackTrace();
>         }
>         ExchangeWebService ex = new ExchangeWebService(url);        
>         Client client = org.apache.cxf.frontend.ClientProxy.getClient(ex.getExchangeWebPort());        
>         HTTPConduit conduit = (HTTPConduit) client.getConduit();
>         HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();        
>         httpClientPolicy.setConnectionTimeout(36000);
>         httpClientPolicy.setAllowChunking(false);
>         conduit.setClient(httpClientPolicy);        
>         ex.getExchangeWebPort().getFolder(request, impersonation, mailboxCulture, requestVersion, timeZoneContext,
>                 getFolderResult, serverVersion);
> static class MyAuthenticator extends Authenticator {
>         public PasswordAuthentication getPasswordAuthentication() {
>             System.out.println("Feeding username and password for " + getRequestingScheme());
>             return (new PasswordAuthentication(kuser, kpass.toCharArray()));
>         }
>     }



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)