schoppet Posted August 13, 2012 Share Posted August 13, 2012 (edited) Hi, based on the jquery-plugin spservices.codeplex.com I created an UDF to access the SOAP-Webservices of Sharepoint 2007/2010. As of now it should cover all Webservices and should be working with 2007 and 2010. Currently I have not much time to create a good documentation and example-scripts but nevertheless I wanted to share it with you. Example of retrieving the content of a list expandcollapse popup#include "sharepoint.au3" #include <_xmldomwrapper.au3> Global $sWebUrl = 'http://url.of.sharepoint.site' Global $sStatusList = 'Status' Global $oStatus = ObjCreate('Scripting.Dictionary') $oStatus = _GetStatus() MsgBox(0, 'Sharepoint-Test', 'Number of Records: ' & $oStatus.Item(0)) For $i = 1 to $oStatus.Item(0) MsgBox(0, 'Sharepoint-Test', 'Content of Title-Field in Record: ' & $i & ' - ' & $oStatus.Item($i).Item('ows_Title')) Next Func _GetStatus() Local $oOptions $oOptions = ObjCreate('Scripting.Dictionary') $oOptions.Add('webURL', $sWebUrl) $oOptions.Add('operation', 'GetListItems') $oOptions.Add('CAMLQuery', "") $oOptions.Add('listName', $sStatusList) $oOptions.Add('CAMLViewFields', '') $oOptions.Add('completefunc', '__PrepareStatus') Return _SPServices($oOptions) EndFunc Func __PrepareStatus($sOrig) Local $oRows Local $oRow Local $iCount Local $aNames[1] Local $aValues[1] Local $sName Local $sValue Local $i Local $j $sOrig = _SPTransformOutput($sOrig) _XMLLoadXML($sOrig) $iCount = _XMLGetAttrib('/GetListItemsResponse/GetListItemsResult/listitems/data', 'ItemCount') $oRows = ObjCreate('Scripting.Dictionary') $oRows.Add(0, $iCount) If 0 < $iCount Then For $i = 0 To ($iCount - 1) $oRow = ObjCreate('Scripting.Dictionary') _XMLGetAllAttribIndex('/GetListItemsResponse/GetListItemsResult/listitems/data/row', $aNames, $aValues, '', $i) For $j = 0 To UBound($aNames) - 1 $sName = $aNames[$j] $sValue = $aValues[$j] $oRow.Add($sName, $sValue) Next $oRows.Add($i + 1, $oRow) Next EndIf Return $oRows EndFunc I hope it is useful for someone and please be patient if you have questions. I'll try to answer as fast as possible Joergsharepoint.au3 Edited August 13, 2012 by schoppet Link to comment Share on other sites More sharing options...
DFWITGuy Posted October 27, 2012 Share Posted October 27, 2012 Thank you SO much for making this! Link to comment Share on other sites More sharing options...
ptrex Posted October 28, 2012 Share Posted October 28, 2012 @schoppet How could I have missed this one ! This is freaking awsome ! Big library and quite complete as well. But without documentation it takes a while to get started. Could you poste an example how to upload a document to a library incl. meta data ? Thanks for sharing ! Rgds ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Yoshio Posted March 14, 2013 Share Posted March 14, 2013 Hi schoppet, can you give me an example who to change an item using your sharepoint.udf? For example I have a list with 2 colums (Name, Status). I now want to change the Status of the first list element to "tested". How can I do that? Can you post an example script? Thanks a lot :-) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 14, 2013 Moderators Share Posted March 14, 2013 Yoshio, schoppet has not been back here since he posted the above so I am not sure you will get a response any time soon. But you might find him on the German forum (http://www.autoit.de) - and looking at your e-mail the change of language should not be a problem. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Yoshio Posted March 15, 2013 Share Posted March 15, 2013 Thanks, Melba23 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now