You are on Java6, you shouldn't need the jcifs stuff at all and it's more or less known not to work well with Java6 and CXF. It should just be setting the username and password, possibly turn off the chunking, and then let the NTLM stuff built into the JDK do it's thing.
Dan On Tuesday, March 27, 2012 09:20:08 AM ross.oreto wrote: > I am trying to consume SharePoint Server 2010 web services using a CXF > Client. The SP Server uses NTLM v2 for authentication. I have consulted > the cxf documentation on NTLM > http://cxf.apache.org/docs/client-http-transport-including-ssl-support.htm > l#ClientHTTPTransport%28includingSSLsupport%29-NTLMAuthentication here > and am following it pretty close, however I am unable to get a successful > authentication. Here is my current code: > > //Set the jcifs properties > > jcifs.Config.setProperty("jcifs.smb.client.domain", "VANDERBILT"); > jcifs.Config.setProperty("jcifs.netbios.wins", > ""); > > jcifs.Config.setProperty("jcifs.smb.client.soTimeout", "300000"); //5 > minutes > > jcifs.Config.setProperty("jcifs.netbios.cachePolicy", "1200"); //20 > minutes > > jcifs.Config.setProperty("jcifs.smb.client.username", username); > > jcifs.Config.setProperty("jcifs.smb.client.password", password); > > //Register the jcifs URL handler to enable NTLM > jcifs.Config.registerSmbURLHandler(); > > //String listsUrl = > "http://.../_vti_bin/Lists.asmx" > String listsUrl = > "https://int.../_vti_bin/Lists.asmx" > JaxWsProxyFactoryBean factoryBean = new JaxWsProxyFactoryBean(); > > factoryBean.setServiceClass(com.microsoft.schemas.sharepoint.soap.ListsSoa > p.class) factoryBean.setAddress(listsUrl) > //factoryBean.setUsername(username) > //factoryBean.setPassword(password) > > port = (ListsSoap) factoryBean.create() > > Client client = ClientProxy.getClient(port) > HTTPConduit http = client.getConduit() > HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy() > httpClientPolicy.setConnectionTimeout(36000) > httpClientPolicy.setAllowChunking(false) > httpClientPolicy.setReceiveTimeout(32000) > http.setClient(httpClientPolicy) > > // AuthorizationPolicy policy = new > AuthorizationPolicy() > // policy.setUserName(username) > // policy.setPassword(password) > // http.setAuthorization(policy) > > GetListItemsResponse.GetListItemsResult result = > port.getListItems("AboutUs", null, null, null, > null, null, null) > > The error I get back is > > javax.xml.ws.WebServiceException: Could not send Message. > Caused by: java.io.IOException: IOException invoking > https://int.../Lists.asmx: Authentication failure > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/CXF-Client-NTLM-Authentication-with-Share > Point-Server-tp5598272p5598272.html Sent from the cxf-user mailing list > archive at Nabble.com. -- Daniel Kulp dk...@apache.org - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com