We create a sharepoint webservice using the following code.

 

To provide NTLM credentials:

 

Authenticator.setDefault( extended class of Authenticator);

 

Create the service.

 

JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();

factory.setServiceClass(ListsSoap.class);

factory.setAddress(list_url);

ListsSoap port = (ListsSoap) factory.create();

 

Update the conduit.

..

            Client client = ClientProxy.getClient(port);

 

            HTTPConduit http = (HTTPConduit) client.getConduit();

            

            HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();

            httpClientPolicy.setConnectionTimeout(36000);

            httpClientPolicy.setAllowChunking(false);

            http.setClient(httpClientPolicy);

 

Call service and get the result.

 

GetListCollectionResult result  = port.getListCollection();

 

..

And finally close the conduit.

 

http.close();

 

The problem is, we still see a HTTPURL connection held by the KeepAlive
thread.

We tried

System.setProperty("http.keepAlive", false) but that creates an issue
with NTLM authentication as it requires
the connection to be persisted during the handshake request/response
exchange.

 

How do we close the connection in this (with NTLM  authentication) case?
Has anybody used CXF inside tomcat

server serving SharePoint services connecting to a SharePoint server
over NTLM authentication.

 

This application runs inside Tomcat so it is instantiated from multiple
threads. If the connections are reused
then there is a potential of one user's authenticated connection used
for another user.

 

Thanks in advance.

Reply via email to