How to call sharepoint 2007 web services through java?

Can someone tell me how to call sharepoint 2007 web services from java? And what is the XML format for sending a soap request to sharepoint 2007?

I am using java1.5.

+4
source share
2 answers

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.

+6
source

Java 6 has built-in support for web services. Most likely you will need an IDE to help you create Java classes from WSDL. I found IntelliJ IDEA to create a good client based only on the Java 6 runtime and no third-party banks.

0
source

Source: https://habr.com/ru/post/1298989/


All Articles