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";;

   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

Reply via email to