axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George Stanchev <Gstanc...@serena.com>
Subject RE: Accessing Sharepoint 2010 custom webservices using Axis2
Date Wed, 20 Jul 2011 12:12:36 GMT
Make sure the computer hosting your Sharepoint services is allowed to use NTLMv1.

From: Arindam Mukherjee [mailto:amukherjee@projectp.com]
Sent: Tuesday, July 19, 2011 7:05 PM
To: java-dev@axis.apache.org
Subject: FW: Accessing Sharepoint 2010 custom webservices using Axis2



________________________________
From: Arindam Mukherjee [mailto:amukherjee@projectp.com<mailto:amukherjee@projectp.com>]
Sent: Tuesday, July 19, 2011 4:23 PM
To: 'java-user@axis.apache.org<mailto:java-user@axis.apache.org>'
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
Mime
View raw message