Sharepoint Webservices Wrapper

Description/Features

The Sharepoint Webservices Wrapper is a library which wraps certain Sharepoint Soap Service calls, to make interacting with a Sharepoint Web Service easier

Table of Contents

Installation

  1. Download the jar
  2. Add it and the following other jars to your classpath:
    • activation-1.0.2.jar
    • axis-1.2.1.jar
    • axis-jaxrpc-1.2.1.jar
    • axis-saaj-1.2.1.jar
    • commons-discovery-0.2.jar
    • commons-logging-1.0.4.jar
    • log4j-1.2.8.jar
    • mail-1.3.3.jar
    • junit.jar
    • wsdl4j-1.5.1.jar
  3. If the authentication for your Sharepoint Server is NTLM, you may need to do additional steps to authenticate with your server. See NTLM Authentication

Usage

It can be used as just a normal java library. All the methods are static.

javadoc

Please see the javadoc, for further details.

Methods

The method sigs are as such:
SOAP Service object getters - use these to get the service object with access to all the service's methods
ListsSoap12Stub getSharePointListsSOAPBinding(String serverURL, String userName, String password)
PermCheckSoap12Stub getPermCheckSOAPBinding(String serverURL, String userName, String password)

Convenience method for getting list items - returns an XML string
String getSharePointListItems(String listName, ListsSoap12Stub service)
String getSharePointListItems(String listName, String serverURL, String userName, String password)

Convenience method for getting all lists - returns an XML string
String getSharePointCollections(ListsSoap12Stub service)

Convenience method for testing a connection - returns one of 4 public constants. See javadoc
String testSharePointConnection(String serverURL, String userName, String password)
String testSharePointConnection(ListsSoap12Stub service)

Convenience method for testing if a user has permissions for a list
boolean userHasPermissionOnList(PermCheckSoap12Stub, String user, String resourceId)

NTLM Authentication

Sharepoint servers have multiple possible authentications.
For BasicAuthentication, nothing more needs to be done.
For NTLM Authentication, you may need to provide a wsdd file.
See client-config.wsdd
for an example.

Examples

Please see the SharePointWebServicesWrapperTest class which shows examples of usage for every method.

Version History

Version 1.0

  • All methods are static
  • Includes getters for 2 Sharepoint Soap Services: Lists and Permchecker (if it's installed)
  • Includes a test connection method.
  • Several convenience methods which do not require getting the Binding objects first.

Pre-Version 1.0

The original wrapper class was designed for the Sharepoint Plugin. It can be found in the package com.atlassian.confluence.extra.sharepoint, and has several significant differences from Version 1.0, including staticness, and some state useful only to the Sharepoint Plugin project.

Issues

CSI issues with component Sharepoint Web Service Wrapper

jiraissues: Unable to determine if sort should be enabled
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.