Wednesday, October 9, 2013

Mule - Sharepoint Connector

I have been working a little with Mule ESB - Enterprise Edition. I needed to get a Sharepoint (duh - Imperial Star Battlecruisers), so I was happy to see the Mule Sharepoint Connector. The Connector implementents NTLMv2, so it can talk to newer Sharepoint versions. After getting past the first small gotchas (remember slash af URL, URL without the '_vti_bin' stuff, ListName is the list name & view name is the GUID) - the list was received as an SOAP Java object - GetListItemsResult.

Now that was perfect except the M$ SOAP service limits the result to 100 rows, if you do not specify a rowlimit, and i could not get that to work on the Sharepoint Connector component, so i 'just' made a java component from trial and error reverse engineering the component using the Java classes:

import org.mule.modules.sharepoint.SharepointConnector;

SharepointConnector sc = new org.mule.modules.sharepoint.SharepointConnector();
             sc.connect("DOMAIN\\USERNAME", "PASSWORD", "URL_W_SLASH"); request =
request.setRowLimit("" + 0);
GetListItemsResult result = sc.listGetListItems(request);

Replace UPPERCASE names with real values. You can use the GetListAndView to get the GUIDs

Other ways of getting this to work is

However I did not succeed with that approach.

No comments:

Post a Comment