cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CXF-3185) CXF client NTLM Authentication Issue
Date Mon, 03 Oct 2011 20:45:34 GMT

     [ https://issues.apache.org/jira/browse/CXF-3185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Kulp resolved CXF-3185.
------------------------------

       Resolution: Cannot Reproduce
    Fix Version/s:     (was: NeedMoreInfo)
                   Invalid


Cannot really reproduce and attempt to get the reporter to reproduce with a more modern version
of CXF went unanswered for a month.  
                
> CXF client  NTLM Authentication Issue
> -------------------------------------
>
>                 Key: CXF-3185
>                 URL: https://issues.apache.org/jira/browse/CXF-3185
>             Project: CXF
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 2.2.10
>         Environment: Java 6, CXF 2.2.10
>            Reporter: Amol Deshpande
>             Fix For: Invalid
>
>
> Hi,
> I have generated a cxf client  using wsdl2java tool. This client is built to consume
the sharepoint webservice which requires NTLM authentication.  
> I was initially 
> On the link : http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html
, under the NTLM authentication section, it is stated that - "On Java 6, NTLM authentication
is built into the Java runtime and you don't need to do anything special" .
> As such I just turned off chunking and try to connect to the webservice, However I get
a Server redirected too many times issue. 
> The code and the error are as given below: 
> ************************************************************************************************************************************************************
> Code
> *************************************************************************************************************************************************************
>           SiteData ss = new SiteData(wsdlURL, SERVICE_NAME);
>           SiteDataSoap port = ss.getSiteDataSoap();   
>     
>           //Turn off chunking so that NTLM can occur 
>           Client client = org.apache.cxf.frontend.ClientProxy.getClient(port);
>           HTTPConduit http = (HTTPConduit) client.getConduit(); 
>           HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy(); 
>           httpClientPolicy.setConnectionTimeout(36000); 
>           httpClientPolicy.setAllowChunking(false); 
>           http.setClient(httpClientPolicy); 
>         
>         System.out.println("Invoking getSite...");
>         javax.xml.ws.Holder<java.lang.Long> _getSite_getSiteResult = new javax.xml.ws.Holder<java.lang.Long>();
>         javax.xml.ws.Holder<com.microsoft.schemas.sharepoint.soap.SSiteMetadata>
_getSite_sSiteMetadata = new             javax.xml.ws.Holder<com.microsoft.schemas.sharepoint.soap.SSiteMetadata>();
>         javax.xml.ws.Holder<com.microsoft.schemas.sharepoint.soap.ArrayOfSWebWithTime>
_getSite_vWebs = new javax.xml.ws.Holder<com.microsoft.schemas.sharepoint.soap.ArrayOfSWebWithTime>();
>         javax.xml.ws.Holder<java.lang.String> _getSite_strUsers = new javax.xml.ws.Holder<java.lang.String>();
>         javax.xml.ws.Holder<java.lang.String> _getSite_strGroups = new javax.xml.ws.Holder<java.lang.String>();
>         javax.xml.ws.Holder<com.microsoft.schemas.sharepoint.soap.ArrayOfString>
_getSite_vGroups = new javax.xml.ws.Holder<com.microsoft.schemas.sharepoint.soap.ArrayOfString>();
>            //Webservice call
>          port.getSite(_getSite_getSiteResult, _getSite_sSiteMetadata, _getSite_vWebs,
_getSite_strUsers, _getSite_strGroups, _getSite_vGroups);
> **********************************************************************************************************************************************************************
> Error Message
> ***********************************************************************************************************************************************************************
> The error I get is as follows :
> Dec 13, 2010 1:30:05 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
> WARNING: Interceptor for {http://schemas.microsoft.com/sharepoint/soap/}SiteData#{http://schemas.microsoft.com/sharepoint/soap/}GetSite
has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Could not send Message.
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:244)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> 	at $Proxy39.getSite(Unknown Source)
> 	at com.microsoft.schemas.sharepoint.soap.SiteDataSoap_SiteDataSoap_Client.main(SiteDataSoap_SiteDataSoap_Client.java:190)
> Caused by: java.net.ProtocolException: ProtocolException invoking http://corp.abc.com/_vti_bin/SiteData.asmx:
Server redirected too many  times (20)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
> 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:2058)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2043)
> 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:639)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	... 8 more
> Caused by: java.net.ProtocolException: Server redirected too many  times (20)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
> 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
> 	at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
> 	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2250)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2134)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1988)
> 	... 11 more
> Caused by: java.net.ProtocolException: Server redirected too many  times (20)
> 	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
> 	at java.net.HttpURLConnection.getResponseCode(Unknown Source)
> 	at org.apache.cxf.transport.http.HTTPConduit.processRetransmit(HTTPConduit.java:1457)
> 	at org.apache.cxf.transport.http.HTTPConduit.access$600(HTTPConduit.java:146)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRetransmits(HTTPConduit.java:2102)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2129)
> 	... 12 more
> Exception in thread "main" javax.xml.ws.WebServiceException: Could not send Message.
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
> 	at $Proxy39.getSite(Unknown Source)
> 	at com.microsoft.schemas.sharepoint.soap.SiteDataSoap_SiteDataSoap_Client.main(SiteDataSoap_SiteDataSoap_Client.java:190)
> Caused by: java.net.ProtocolException: ProtocolException invoking http://corp.abc.com/_vti_bin/SiteData.asmx:
Server redirected too many  times (20)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
> 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:2058)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2043)
> 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:639)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:244)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> 	... 2 more
> Caused by: java.net.ProtocolException: Server redirected too many  times (20)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
> 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
> 	at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
> 	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2250)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2134)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1988)
> 	... 11 more
> Caused by: java.net.ProtocolException: Server redirected too many  times (20)
> 	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
> 	at java.net.HttpURLConnection.getResponseCode(Unknown Source)
> 	at org.apache.cxf.transport.http.HTTPConduit.processRetransmit(HTTPConduit.java:1457)
> 	at org.apache.cxf.transport.http.HTTPConduit.access$600(HTTPConduit.java:146)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRetransmits(HTTPConduit.java:2102)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2129)
> 	... 12 more
> Can you please help me with this? 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message