Make sure the computer hosting your Sharepoint services is allowed to use NTLMv1.
From: Arindam Mukherjee [mailto:[email protected]] Sent: Tuesday, July 19, 2011 7:05 PM To: [email protected] Subject: FW: Accessing Sharepoint 2010 custom webservices using Axis2 ________________________________ From: Arindam Mukherjee [mailto:[email protected]<mailto:[email protected]>] Sent: Tuesday, July 19, 2011 4:23 PM To: '[email protected]<mailto:[email protected]>' Subject: Accessing Sharepoint 2010 custom webservices using Axis2 All, Has anybody used axis2 framework to access sharepoint 2010 webservices? I have used axis2 framework to access sharepoint 2007 webservices. But, same code throws "Error: 401: Unauthorized" in sharepoint 2010. I have used following axis2 code: ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator(); auth.setUsername(username); auth.setPassword(password); auth.setDomain(domain); auth.setHost(host); List authPrefs = new ArrayList(1); authPrefs.add(AuthPolicy.NTLM); auth.setAuthSchemes(authPrefs); String targetPoint = "http://"+host+"/_layouts/PPUpload.asmx<http://%22+host+%22/_layouts/PPUpload.asmx>"; UploadStub lists = new UploadStub(targetPoint); lists._getServiceClient().getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, auth); com.projectp.sharetest.UploadStub.UploadDocument doc = new com.projectp.sharetest.UploadStub.UploadDocument(); ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Am I missing something? Thanks, Arindam
