Disclaimer: I tested this with Java 1.6. Let me know if this works for you.
Suppose you want to perform a basic operation, such as reading a SharePoint list from Java. The easiest way I found access to SharePoint SharePoint web services is:
- Manually download List.asmx WSDL from the browser. This way you will avoid having to deal later with NTLM authentication of your SharePoint site (you will use basic auth instead). Your WSDL URL should look like this: sharepointsite.com/_vti_bin/Lists.asmx?WSDL
- Create stub classes from your WSDL using your favorite Java IDE, such as NetBeans, or run it from the command line with the following command (for Win32 JDK):
[Java-JDK path] \ Bin \ wsimport.exe "-p com.microsoft.schemas.sharepoint.soap -keep -extension Lists.wsdl
The code required to authenticate and read a SharePoint list from Java is too long to post here. I would recommend reading this tutorial , which covers authentication, SOAP request design, and interpretation of results.
Hope this helps.
source share