Whatever message this page gives is out now! Go check it out!
<cfsharepoint
action="webservice action"
params="parameter structure"
domain="domain name"
name ="result variable name"
password="connection password"
userName="user ID"
wsdl="WSDL file path">
or
<cfsharepoint
action="webservice action"
params="parameter structure"
login = "credentials structure"
name ="result variable name"
wsdl="WSDL file path"><cfsharepoint
authType="NTLM"
action="webservice action"
params="parameter structure"
domain="domain name"
ntlmdomain="domain where user is registered"
workstation="workstation name"
name="result variable name"
password="connection password"
username="user ID"
wsdl="WSDL file path"><cfscript>
loginStruct = {domain="myDomain", username="userName", password="pa$$w0rd",authtype="ntlm", ntlmdomain="myNTLMDomain"};
cfsharepoint(action="getlistcollection", login=loginStruct, name="myResult");
writeDump(myResult);
</cfscript>| Attribute | Req/Opt | Default | Description |
| action | Required | The name of a web service action. See Usage for the list of service actions you can specify. | |
| authType | Optional | The authentication type to use. You can use NTLM or BASIC. | |
| domain | Optional | The domain name required to connect to the SharePoint server. Required if you do not specify a login attribute. | |
| login | Optional | A structure containing user, password, and domain login credentials to pass to the service. If you do not specify domain, password, and userName attributes, specify a login structure with domain , password, and userName entries. | |
| name | Optional | Name of the result variable in which to put the data returned by the SharePoint service. | |
| ntlmDomain | If authType=NTLM, ntlmDomain is required. | Domain in which a user is registered. Note: When a user is part of a domain, the ntlmDomain attribute is mandatory. When a user is not part of a domain, the ntlmDomain attribute is not mandatory. | |
| params | Optional | A structure containing names and values of the parameters to pass to the service. This attribute is required for any service that requires parameters. | |
| password | Optional | The password required to connect to the SharePoint server. Required if you do not specify a login attribute. | |
| userName | Optional | The user name required to connect to the SharePoint server. Required if you do not specify a login attribute. | |
| wsdl | Optional | Path to the service wsdl file. Required to invoke an action that is not in the list of supported actions. See Usage for details. | |
| workstation | Optional | Host name of the client machine. |
cancreatedwsurl | deletedwsfolder | renamedws |
createdws | finddwsdoc | updatedwsdata |
createdwsfolder | getdwsdata | |
deletedws | removedwsuser |
delete | getitemsbyids | upload |
download | listpicturelibrary | |
getimaginglistitems | rename |
addattachment | getattachmentcollection | updatelist |
addlist | getlist | updatelistitems |
deleteattachment | getlistcollection | |
deletelist | getlistitems |
spsearch/search is not present in Windows SharePoint Services 2.0.query | registration |
queryex | status |
addgrouptorole | getgroupcollection | removerole |
addrole | getrolecollection | removeusercollectionfromgroup |
addusercollectiontogroup | getusercollectionfromrole | removeuserfromgroup |
addusercollectiontorole | getusercollectionfromrole | |
addusertogroup | getuserinfo |
addview | getview | updateview |
deleteview | getviewcollection |
SharePoint data type | ColdFusion Java data type |
XmlNode | XMLNodeList - corresponds to a ColdFusion XML object, for example created by passing an XML string to the XmlParse function.) |
ArrayOfString | string array - corresponds to a ColdFusion array containing string data. |
UnsignedInt | int - corresponds to a ColdFusion number that is an integer value |
ArrayOfUnsignedInt | int array - corresponds to a ColdFusion array containing string data. |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>cfsharepoint Views Example</title>
</head>
<body>
<cfoutput>
Getting the list collection<br />
<!--- All login information is defined using variables in the Application.cfc file. --->
<cfsharepoint action="getlistcollection" login="#login#" name="result"/>
result.ResultFlag: #result.ResultFlag#<br><br>
Deleting mycustomlist from the collection, if it exists.<br>
<cfloop array=#result.lists# index="list">
<cfif list.Title EQ "mycustomlist">
<cfsharepoint action="deletelist" login="#login#"
name="result1" params="#{listname="mycustomlist"}#"/>
</cfif>
</cfloop>
Was anything deleted?
<cfif IsDefined("result1")>
<b>YES.</b> The result is:</b><br>
<cfdump var="#result1#"><br>
<cfelse>
<b>NO</b>
</cfif>
Adding a mycustomlist list<br />
<cfsharepoint action="addlist" login="#login#" name="result1"
params="#{listname="mycustomlist",
description="Adding a list via cfsharepoint",
templateid=100}#"/>
addlist result.ResultFlag: #result1.ResultFlag#<br><br>
<cfset viewFields = xmlparse("<ViewFields>
<FieldRef Name='Title'/>
<FieldRef Name='ID'/>
</ViewFields>")>
<cfset query = xmlparse("<Query>
<Where>
<Lt>
<FieldRef Name='ID'/>
<Value Type='Counter'>10</Value>
</Lt>
</Where>
<OrderBy>
<FieldRef Name='ID'/>
</OrderBy>
</Query>")>
<cfset rowlimit = xmlparse("<RowLimit Paged='True'>50</RowLimit>")>
Adding a myview1 view for the mycustomlist list<br />
<cfsharepoint action="addview" login="#login#" name="result"
params="#{listName="mycustomlist",viewname="myview1",
viewFields="#viewFields#", query="#query#",rowlimit="#rowlimit#",
type="grid",makeViewDefault=false}#"/>
addview result.ResultFlag: #result.ResultFlag#<br><br>
Adding a myview3 view for the mycustomlist list<br />
<cfsharepoint action="addview" login="#login#" name="result" params="#{listName="mycustomlist",viewname="myview3",viewFields="#viewFields#",
query="#query#",rowlimit="#rowlimit#",type="grid",makeViewDefault=false}#"/>
addview result.ResultFlag: #result.ResultFlag#<br><br>
Getting the updated mycustomlist view collection<br>
<cfsharepoint action="getviewcollection" login="#login#" name="result"
params="#{listName="mycustomlist"}#"/>
<b>getviewcollection result</b><br>
<cfdump var="#result#"><br />
The names of the collection's views:<br>
<cfloop array=#result.views# index=v>
<cfoutput>#v.displayname#<br></cfoutput>
</cfloop>
<br>
Deleting the list<br>
<cfsharepoint action="deletelist" login="#login#" name="result1" params="#{listname="mycustomlist"}#"/>
deletelist result.ResultFlag: #result1.ResultFlag#
</cfoutput>
</body>
</html>