-
Notifications
You must be signed in to change notification settings - Fork 0
/
SPSoap.cls
870 lines (588 loc) · 29.9 KB
/
SPSoap.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "SPSoap"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
'
' Configuration Settings
Private url As String
Private Const LOG As Boolean = False
Private Const Version As String = "1.0"
' Internal Variables
Private oReq As MSXML2.XMLHTTP
'
'
' Constructor
Private Sub class_initialize()
' Create MSXML2 XML HTTP Object
Set oReq = CreateObject("MSXML2.XMLHTTP")
If oReq Is Nothing Then
Call MsgBox("could not initialize msxml2.xmlhttp", vbCritical, "Error")
End If
End Sub
Public Sub init(site As String)
url = site
End Sub
'***************************************************************************************
' Soap Body
'***************************************************************************************
Private Function Soap_Body(method As String, attrs As Collection) As Variant
Dim Header As String
Header = ""
Header = Header & "<?xml version='1.0' encoding='utf-8'?>"
Header = Header & "<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>"
Header = Header & " <soap:Body>"
Header = Header & " <" & method & " xmlns='http://schemas.microsoft.com/sharepoint/soap/' >"
If Not attrs Is Nothing Then
Dim attr As Variant
For Each attr In attrs
Header = Header & " <" & attr(0) & ">" & attr(1) & "</" & attr(0) & ">"
Next attr
End If
Header = Header & " </" & method & ">"
Header = Header & " </soap:Body>"
Header = Header & "</soap:Envelope>"
Soap_Body = Header
End Function
'
'
'
Public Function PrettyPrint(xml As String) As String
Dim rdr As New SAXXMLReader
Dim wrt As New MXXMLWriter
Set rdr.contentHandler = wrt
wrt.indent = True
rdr.Parse (xml)
PrettyPrint = wrt.output
End Function
Private Sub AddAttributes(ByRef attrs As Collection, key As String, varValue As Variant)
Dim value As String
value = ""
If (VarType(varValue) = 9) Then
If (varValue Is Nothing) Then
Exit Sub
Else
' it is IXMLDOMnodeList otherwise
Dim x As IXMLDOMNodeList
Set x = varValue
value = x.item(0).xml
End If
Else
value = CStr(varValue)
End If
' Only Add to Collection if value is Set
If Not (value = "") Then
attrs.Add Array(key, value), key
End If
End Sub
'
' Execute SOAP request
' & fetch result
Private Function Request(service As String, method As String, body As String) As IXMLDOMNodeList
Set Request = Nothing
On Error GoTo ErrRoutine
oReq.Open "POST", url & service, False
oReq.setRequestHeader "Content-Type", "text/xml"
oReq.setRequestHeader "SOAPAction", "http://schemas.microsoft.com/sharepoint/soap/" & method
oReq.send body
Dim Result As MSXML2.DOMDocument
Set Result = oReq.responseXML
Set Request = Result.SelectNodes("//soap:Envelope/soap:Body/" & method & "Response/" & method & "Result")
EndRoutine:
Exit Function
ErrRoutine:
If LOG Then
MsgBox Err.Number & " - " & Err.description, vbOKOnly Or vbCritical, "SPSOAP"
End If
Set Request = Nothing
GoTo EndRoutine
End Function
'****************************************************************
' Automatically generated Functions start here
'****************************************************************
Public Function wsm_GetVersionCollection(strlistID As String, strlistItemID As String, strFieldName As String) As MSXML2.IXMLDOMNodeList
Const method As String = "GetVersionCollection"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "strlistID", strlistID)
Call AddAttributes(attrs, "strlistItemID", strlistItemID)
Call AddAttributes(attrs, "strFieldName", strFieldName)
body = Soap_Body(method, attrs)
Set wsm_GetVersionCollection = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_AddAttachment(listName As String, listItemID As String, fileName As String, attachment As Variant) As MSXML2.IXMLDOMNodeList
Const method As String = "AddAttachment"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "listItemID", listItemID)
Call AddAttributes(attrs, "fileName", fileName)
Call AddAttributes(attrs, "attachment", attachment)
body = Soap_Body(method, attrs)
Set wsm_AddAttachment = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_GetAttachmentCollection(listName As String, listItemID As String) As MSXML2.IXMLDOMNodeList
Const method As String = "GetAttachmentCollection"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "listItemID", listItemID)
body = Soap_Body(method, attrs)
Set wsm_GetAttachmentCollection = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_DeleteAttachment(listName As String, listItemID As String, url As String) As MSXML2.IXMLDOMNodeList
Const method As String = "DeleteAttachment"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "listItemID", listItemID)
Call AddAttributes(attrs, "url", url)
body = Soap_Body(method, attrs)
Set wsm_DeleteAttachment = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_CheckOutFile(pageUrl As String, checkoutToLocal As String, lastmodified As String) As MSXML2.IXMLDOMNodeList
Const method As String = "CheckOutFile"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "pageUrl", pageUrl)
Call AddAttributes(attrs, "checkoutToLocal", checkoutToLocal)
Call AddAttributes(attrs, "lastmodified", lastmodified)
body = Soap_Body(method, attrs)
Set wsm_CheckOutFile = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_UndoCheckOut(pageUrl As String) As MSXML2.IXMLDOMNodeList
Const method As String = "UndoCheckOut"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "pageUrl", pageUrl)
body = Soap_Body(method, attrs)
Set wsm_UndoCheckOut = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_CheckInFile(pageUrl As String, comment As String, CheckinType As String) As MSXML2.IXMLDOMNodeList
Const method As String = "CheckInFile"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "pageUrl", pageUrl)
Call AddAttributes(attrs, "comment", comment)
Call AddAttributes(attrs, "CheckinType", CheckinType)
body = Soap_Body(method, attrs)
Set wsm_CheckInFile = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_GetListContentTypes(listName As String, contentTypeId As String) As MSXML2.IXMLDOMNodeList
Const method As String = "GetListContentTypes"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "contentTypeId", contentTypeId)
body = Soap_Body(method, attrs)
Set wsm_GetListContentTypes = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_GetListContentTypesAndProperties(listName As String, contentTypeId As String, propertyPrefix As String, includeWebProperties As Boolean, includeWebPropertiesSpecified As Boolean) As MSXML2.IXMLDOMNodeList
Const method As String = "GetListContentTypesAndProperties"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "contentTypeId", contentTypeId)
Call AddAttributes(attrs, "propertyPrefix", propertyPrefix)
Call AddAttributes(attrs, "includeWebProperties", includeWebProperties)
Call AddAttributes(attrs, "includeWebPropertiesSpecified", includeWebPropertiesSpecified)
body = Soap_Body(method, attrs)
Set wsm_GetListContentTypesAndProperties = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_GetListContentType(listName As String, contentTypeId As String) As MSXML2.IXMLDOMNodeList
Const method As String = "GetListContentType"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "contentTypeId", contentTypeId)
body = Soap_Body(method, attrs)
Set wsm_GetListContentType = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_CreateContentType(listName As String, displayName As String, parentType As String, fields As MSXML2.IXMLDOMNodeList, contentTypeProperties As MSXML2.IXMLDOMNodeList, addToView As String) As MSXML2.IXMLDOMNodeList
Const method As String = "CreateContentType"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "displayName", displayName)
Call AddAttributes(attrs, "parentType", parentType)
Call AddAttributes(attrs, "fields", fields)
Call AddAttributes(attrs, "contentTypeProperties", contentTypeProperties)
Call AddAttributes(attrs, "addToView", addToView)
body = Soap_Body(method, attrs)
Set wsm_CreateContentType = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_UpdateContentType(listName As String, contentTypeId As String, contentTypeProperties As MSXML2.IXMLDOMNodeList, newFields As MSXML2.IXMLDOMNodeList, updateFields As MSXML2.IXMLDOMNodeList, deleteFields As MSXML2.IXMLDOMNodeList, addToView As String) As MSXML2.IXMLDOMNodeList
Const method As String = "UpdateContentType"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "contentTypeId", contentTypeId)
Call AddAttributes(attrs, "contentTypeProperties", contentTypeProperties)
Call AddAttributes(attrs, "newFields", newFields)
Call AddAttributes(attrs, "updateFields", updateFields)
Call AddAttributes(attrs, "deleteFields", deleteFields)
Call AddAttributes(attrs, "addToView", addToView)
body = Soap_Body(method, attrs)
Set wsm_UpdateContentType = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_DeleteContentType(listName As String, contentTypeId As String) As MSXML2.IXMLDOMNodeList
Const method As String = "DeleteContentType"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "contentTypeId", contentTypeId)
body = Soap_Body(method, attrs)
Set wsm_DeleteContentType = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_UpdateContentTypeXmlDocument(listName As String, contentTypeId As String, newDocument As MSXML2.IXMLDOMNodeList) As MSXML2.IXMLDOMNodeList
Const method As String = "UpdateContentTypeXmlDocument"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "contentTypeId", contentTypeId)
Call AddAttributes(attrs, "newDocument", newDocument)
body = Soap_Body(method, attrs)
Set wsm_UpdateContentTypeXmlDocument = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_UpdateContentTypesXmlDocument(listName As String, newDocument As MSXML2.IXMLDOMNodeList) As MSXML2.IXMLDOMNodeList
Const method As String = "UpdateContentTypesXmlDocument"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "newDocument", newDocument)
body = Soap_Body(method, attrs)
Set wsm_UpdateContentTypesXmlDocument = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_DeleteContentTypeXmlDocument(listName As String, contentTypeId As String, documentUri As String) As MSXML2.IXMLDOMNodeList
Const method As String = "DeleteContentTypeXmlDocument"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "contentTypeId", contentTypeId)
Call AddAttributes(attrs, "documentUri", documentUri)
body = Soap_Body(method, attrs)
Set wsm_DeleteContentTypeXmlDocument = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_ApplyContentTypeToList(webUrl As String, contentTypeId As String, listName As String) As MSXML2.IXMLDOMNodeList
Const method As String = "ApplyContentTypeToList"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "webUrl", webUrl)
Call AddAttributes(attrs, "contentTypeId", contentTypeId)
Call AddAttributes(attrs, "listName", listName)
body = Soap_Body(method, attrs)
Set wsm_ApplyContentTypeToList = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_GetList(listName As String) As MSXML2.IXMLDOMNodeList
Const method As String = "GetList"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
body = Soap_Body(method, attrs)
Set wsm_GetList = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_GetListAndView(listName As String, viewName As String) As MSXML2.IXMLDOMNodeList
Const method As String = "GetListAndView"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "viewName", viewName)
body = Soap_Body(method, attrs)
Set wsm_GetListAndView = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_DeleteList(listName As String) As MSXML2.IXMLDOMNodeList
Const method As String = "DeleteList"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
body = Soap_Body(method, attrs)
Set wsm_DeleteList = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_AddList(listName As String, description As String, templateID As Integer) As MSXML2.IXMLDOMNodeList
Const method As String = "AddList"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "description", description)
Call AddAttributes(attrs, "templateID", templateID)
body = Soap_Body(method, attrs)
Set wsm_AddList = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_AddListFromFeature(listName As String, description As String, featureID As String, templateID As Integer) As MSXML2.IXMLDOMNodeList
Const method As String = "AddListFromFeature"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "description", description)
Call AddAttributes(attrs, "featureID", featureID)
Call AddAttributes(attrs, "templateID", templateID)
body = Soap_Body(method, attrs)
Set wsm_AddListFromFeature = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_UpdateList(listName As String, listProperties As MSXML2.IXMLDOMNodeList, newFields As MSXML2.IXMLDOMNodeList, updateFields As MSXML2.IXMLDOMNodeList, deleteFields As MSXML2.IXMLDOMNodeList, listVersion As String) As MSXML2.IXMLDOMNodeList
Const method As String = "UpdateList"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "listProperties", listProperties)
Call AddAttributes(attrs, "newFields", newFields)
Call AddAttributes(attrs, "updateFields", updateFields)
Call AddAttributes(attrs, "deleteFields", deleteFields)
Call AddAttributes(attrs, "listVersion", listVersion)
body = Soap_Body(method, attrs)
Set wsm_UpdateList = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_GetListCollection() As MSXML2.IXMLDOMNodeList
Const method As String = "GetListCollection"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
body = Soap_Body(method, attrs)
Set wsm_GetListCollection = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_GetListItems(listName As String, viewName As String, Query As MSXML2.IXMLDOMNodeList, viewFields As MSXML2.IXMLDOMNodeList, rowLimit As String, queryOptions As MSXML2.IXMLDOMNodeList, webID As String) As MSXML2.IXMLDOMNodeList
Const method As String = "GetListItems"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "viewName", viewName)
Call AddAttributes(attrs, "query", Query)
Call AddAttributes(attrs, "viewFields", viewFields)
Call AddAttributes(attrs, "rowLimit", rowLimit)
Call AddAttributes(attrs, "queryOptions", queryOptions)
Call AddAttributes(attrs, "webID", webID)
body = Soap_Body(method, attrs)
Set wsm_GetListItems = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_GetListItemChanges(listName As String, viewFields As MSXML2.IXMLDOMNodeList, since As String, contains As MSXML2.IXMLDOMNodeList) As MSXML2.IXMLDOMNodeList
Const method As String = "GetListItemChanges"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "viewFields", viewFields)
Call AddAttributes(attrs, "since", since)
Call AddAttributes(attrs, "contains", contains)
body = Soap_Body(method, attrs)
Set wsm_GetListItemChanges = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_GetListItemChangesWithKnowledge(listName As String, viewName As String, Query As MSXML2.IXMLDOMNodeList, viewFields As MSXML2.IXMLDOMNodeList, rowLimit As String, queryOptions As MSXML2.IXMLDOMNodeList, syncScope As String, knowledge As MSXML2.IXMLDOMNodeList, contains As MSXML2.IXMLDOMNodeList) As MSXML2.IXMLDOMNodeList
Const method As String = "GetListItemChangesWithKnowledge"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "viewName", viewName)
Call AddAttributes(attrs, "query", Query)
Call AddAttributes(attrs, "viewFields", viewFields)
Call AddAttributes(attrs, "rowLimit", rowLimit)
Call AddAttributes(attrs, "queryOptions", queryOptions)
Call AddAttributes(attrs, "syncScope", syncScope)
Call AddAttributes(attrs, "knowledge", knowledge)
Call AddAttributes(attrs, "contains", contains)
body = Soap_Body(method, attrs)
Set wsm_GetListItemChangesWithKnowledge = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_GetListItemChangesSinceToken(listName As String, viewName As String, Query As MSXML2.IXMLDOMNodeList, viewFields As MSXML2.IXMLDOMNodeList, rowLimit As String, queryOptions As MSXML2.IXMLDOMNodeList, changeToken As String, contains As MSXML2.IXMLDOMNodeList) As MSXML2.IXMLDOMNodeList
Const method As String = "GetListItemChangesSinceToken"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "viewName", viewName)
Call AddAttributes(attrs, "query", Query)
Call AddAttributes(attrs, "viewFields", viewFields)
Call AddAttributes(attrs, "rowLimit", rowLimit)
Call AddAttributes(attrs, "queryOptions", queryOptions)
Call AddAttributes(attrs, "changeToken", changeToken)
Call AddAttributes(attrs, "contains", contains)
body = Soap_Body(method, attrs)
Set wsm_GetListItemChangesSinceToken = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_UpdateListItems(listName As String, updates As MSXML2.IXMLDOMNodeList) As MSXML2.IXMLDOMNodeList
Const method As String = "UpdateListItems"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "updates", updates)
body = Soap_Body(method, attrs)
Set wsm_UpdateListItems = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_UpdateListItemsWithKnowledge(listName As String, updates As MSXML2.IXMLDOMNodeList, syncScope As String, knowledge As MSXML2.IXMLDOMNodeList) As MSXML2.IXMLDOMNodeList
Const method As String = "UpdateListItemsWithKnowledge"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "updates", updates)
Call AddAttributes(attrs, "syncScope", syncScope)
Call AddAttributes(attrs, "knowledge", knowledge)
body = Soap_Body(method, attrs)
Set wsm_UpdateListItemsWithKnowledge = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_AddDiscussionBoardItem(listName As String, message As Variant) As MSXML2.IXMLDOMNodeList
Const method As String = "AddDiscussionBoardItem"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "listName", listName)
Call AddAttributes(attrs, "message", message)
body = Soap_Body(method, attrs)
Set wsm_AddDiscussionBoardItem = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_AddWikiPage(strlistName As String, listRelPageUrl As String, wikiContent As String) As MSXML2.IXMLDOMNodeList
Const method As String = "AddWikiPage"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "strListName", strlistName)
Call AddAttributes(attrs, "listRelPageUrl", listRelPageUrl)
Call AddAttributes(attrs, "wikiContent", wikiContent)
body = Soap_Body(method, attrs)
Set wsm_AddWikiPage = Request("/_vti_bin/Lists.asmx", method, body)
End Function
Public Function wsm_GetView(strlistName As String, strviewName As String) As MSXML2.IXMLDOMNodeList
Const method As String = "GetView"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "strlistName", strlistName)
Call AddAttributes(attrs, "strviewName", strviewName)
body = Soap_Body(method, attrs)
Set wsm_GetView = Request("/_vti_bin/Views.asmx", method, body)
End Function
Public Function wsm_GetViewHtml(strlistName As String, strviewName As String) As MSXML2.IXMLDOMNodeList
Const method As String = "GetViewHtml"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "strlistName", strlistName)
Call AddAttributes(attrs, "strviewName", strviewName)
body = Soap_Body(method, attrs)
Set wsm_GetViewHtml = Request("/_vti_bin/Views.asmx", method, body)
End Function
Public Function wsm_DeleteView(strlistName As String, strviewName As String) As MSXML2.IXMLDOMNodeList
Const method As String = "DeleteView"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "strlistName", strlistName)
Call AddAttributes(attrs, "strviewName", strviewName)
body = Soap_Body(method, attrs)
Set wsm_DeleteView = Request("/_vti_bin/Views.asmx", method, body)
End Function
Public Function wsm_AddView(strlistName As String, strviewName As String, xmlviewFields As MSXML2.IXMLDOMNodeList, xmlquery As MSXML2.IXMLDOMNodeList, xmlrowLimit As MSXML2.IXMLDOMNodeList, strtype As String, bmakeViewDefault As Boolean) As MSXML2.IXMLDOMNodeList
Const method As String = "AddView"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "strlistName", strlistName)
Call AddAttributes(attrs, "strviewName", strviewName)
Call AddAttributes(attrs, "xmlviewFields", xmlviewFields)
Call AddAttributes(attrs, "xmlquery", xmlquery)
Call AddAttributes(attrs, "xmlrowLimit", xmlrowLimit)
Call AddAttributes(attrs, "strtype", strtype)
Call AddAttributes(attrs, "bmakeViewDefault", bmakeViewDefault)
body = Soap_Body(method, attrs)
Set wsm_AddView = Request("/_vti_bin/Views.asmx", method, body)
End Function
Public Function wsm_GetViewCollection(strlistName As String) As MSXML2.IXMLDOMNodeList
Const method As String = "GetViewCollection"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "strlistName", strlistName)
body = Soap_Body(method, attrs)
Set wsm_GetViewCollection = Request("/_vti_bin/Views.asmx", method, body)
End Function
Public Function wsm_UpdateView(strlistName As String, strviewName As String, xmlviewProperties As MSXML2.IXMLDOMNodeList, xmlquery As MSXML2.IXMLDOMNodeList, xmlviewFields As MSXML2.IXMLDOMNodeList, xmlaggregations As MSXML2.IXMLDOMNodeList, xmlformats As MSXML2.IXMLDOMNodeList, xmlrowLimit As MSXML2.IXMLDOMNodeList) As MSXML2.IXMLDOMNodeList
Const method As String = "UpdateView"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "strlistName", strlistName)
Call AddAttributes(attrs, "strviewName", strviewName)
Call AddAttributes(attrs, "xmlviewProperties", xmlviewProperties)
Call AddAttributes(attrs, "xmlquery", xmlquery)
Call AddAttributes(attrs, "xmlviewFields", xmlviewFields)
Call AddAttributes(attrs, "xmlaggregations", xmlaggregations)
Call AddAttributes(attrs, "xmlformats", xmlformats)
Call AddAttributes(attrs, "xmlrowLimit", xmlrowLimit)
body = Soap_Body(method, attrs)
Set wsm_UpdateView = Request("/_vti_bin/Views.asmx", method, body)
End Function
Public Function wsm_UpdateViewHtml(strlistName As String, strviewName As String, xmlviewProperties As MSXML2.IXMLDOMNodeList, xmltoolbar As MSXML2.IXMLDOMNodeList, xmlviewHeader As MSXML2.IXMLDOMNodeList, xmlviewBody As MSXML2.IXMLDOMNodeList, xmlviewFooter As MSXML2.IXMLDOMNodeList, xmlviewEmpty As MSXML2.IXMLDOMNodeList, xmlrowLimitExceeded As MSXML2.IXMLDOMNodeList, xmlquery As MSXML2.IXMLDOMNodeList, xmlviewFields As MSXML2.IXMLDOMNodeList, xmlaggregations As MSXML2.IXMLDOMNodeList, xmlformats As MSXML2.IXMLDOMNodeList, xmlrowLimit As MSXML2.IXMLDOMNodeList) As MSXML2.IXMLDOMNodeList
Const method As String = "UpdateViewHtml"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "strlistName", strlistName)
Call AddAttributes(attrs, "strviewName", strviewName)
Call AddAttributes(attrs, "xmlviewProperties", xmlviewProperties)
Call AddAttributes(attrs, "xmltoolbar", xmltoolbar)
Call AddAttributes(attrs, "xmlviewHeader", xmlviewHeader)
Call AddAttributes(attrs, "xmlviewBody", xmlviewBody)
Call AddAttributes(attrs, "xmlviewFooter", xmlviewFooter)
Call AddAttributes(attrs, "xmlviewEmpty", xmlviewEmpty)
Call AddAttributes(attrs, "xmlrowLimitExceeded", xmlrowLimitExceeded)
Call AddAttributes(attrs, "xmlquery", xmlquery)
Call AddAttributes(attrs, "xmlviewFields", xmlviewFields)
Call AddAttributes(attrs, "xmlaggregations", xmlaggregations)
Call AddAttributes(attrs, "xmlformats", xmlformats)
Call AddAttributes(attrs, "xmlrowLimit", xmlrowLimit)
body = Soap_Body(method, attrs)
Set wsm_UpdateViewHtml = Request("/_vti_bin/Views.asmx", method, body)
End Function
Public Function wsm_UpdateViewHtml2(strlistName As String, strviewName As String, xmlviewProperties As MSXML2.IXMLDOMNodeList, xmltoolbar As MSXML2.IXMLDOMNodeList, xmlviewHeader As MSXML2.IXMLDOMNodeList, xmlviewBody As MSXML2.IXMLDOMNodeList, xmlviewFooter As MSXML2.IXMLDOMNodeList, xmlviewEmpty As MSXML2.IXMLDOMNodeList, xmlrowLimitExceeded As MSXML2.IXMLDOMNodeList, xmlquery As MSXML2.IXMLDOMNodeList, xmlviewFields As MSXML2.IXMLDOMNodeList, xmlaggregations As MSXML2.IXMLDOMNodeList, xmlformats As MSXML2.IXMLDOMNodeList, xmlrowLimit As MSXML2.IXMLDOMNodeList, stropenApplicationExtension As String) As MSXML2.IXMLDOMNodeList
Const method As String = "UpdateViewHtml2"
Dim attrs As Collection
Set attrs = New Collection
Dim body As String
Call AddAttributes(attrs, "strlistName", strlistName)
Call AddAttributes(attrs, "strviewName", strviewName)
Call AddAttributes(attrs, "xmlviewProperties", xmlviewProperties)
Call AddAttributes(attrs, "xmltoolbar", xmltoolbar)
Call AddAttributes(attrs, "xmlviewHeader", xmlviewHeader)
Call AddAttributes(attrs, "xmlviewBody", xmlviewBody)
Call AddAttributes(attrs, "xmlviewFooter", xmlviewFooter)
Call AddAttributes(attrs, "xmlviewEmpty", xmlviewEmpty)
Call AddAttributes(attrs, "xmlrowLimitExceeded", xmlrowLimitExceeded)
Call AddAttributes(attrs, "xmlquery", xmlquery)
Call AddAttributes(attrs, "xmlviewFields", xmlviewFields)
Call AddAttributes(attrs, "xmlaggregations", xmlaggregations)
Call AddAttributes(attrs, "xmlformats", xmlformats)
Call AddAttributes(attrs, "xmlrowLimit", xmlrowLimit)
Call AddAttributes(attrs, "stropenApplicationExtension", stropenApplicationExtension)
body = Soap_Body(method, attrs)
Set wsm_UpdateViewHtml2 = Request("/_vti_bin/Views.asmx", method, body)
End Function