Can anyone tell me how to call sharepoint 2007 webservices from java? And what is the xml format to send a soap request to sharepoint 2007 ?
I am using java1.5.
Can anyone tell me how to call sharepoint 2007 webservices from java? And what is the xml format to send a soap request to sharepoint 2007 ?
I am using java1.5.
Java 6 has built in support for web services. You will most likely need an IDE to help you create Java classes from the WSDL. I found IntelliJ IDEA to create a good client based only on the Java 6 runtime, and no third party jars.
Disclaimer: I've tested this with Java 1.6. Let me know if it works for you.
Let's say you want to do a basic operation, like reading a SharePoint List from Java. The easiest way i found to access SharePoint's Lists Web Services from Java is to:
[Java-JDK-path]\bin\wsimport.exe” -p com.microsoft.schemas.sharepoint.soap -keep -extension Lists.wsdl
The code necessary to get authentified and to read the SharePoint List from Java is a bit too long to post here. I'd recommend reading this tutorial which covers the authentication, SOAP request construction, and result interpretation.
I hope this helps.