34
Chapter 3: Common Tasks
4.
If you want to provide links to content items in the form of absolute URLs, determine the
domain name of the folder:
<cfset domainElement= XmlSearch(xml,
"//sco[@tree-id='#myTreeId#']/domain-name")>
<cfset domainName= domainElement[1].XmlText>
5.
Call the
sco-contents
action, using the folder’s SCO ID.
The following action provides a list of the contents of the specified folder:
<cfhttp url="#baseurl#api/xml?
action=sco-contents&accesskey=#accesskey#
&sco-id=#contentSco#" method="post">
<cfhttpparam type="Cookie" name="BREEZESESSION" value="#loginCookie#">
</cfhttp>
6.
Parse the returned XML and display relevant information to the user:
<cfset response= cfhttp.FileContent >
<cfset contentXml= XmlParse(response)>
<cfset contents= XmlSearch(contentXml, "//sco")>
<cfset contentCount= ArrayLen(contents)>
<cfoutput>
<table>
<tr>
<th>SCO ID</th>
<th>Name</th>
<th>Type</th>
</tr>
<cfloop index="i" from="1" to="#contentCount#">
<cfset item=contents[#i#]>
<tr>
<td>#item.XmlAttributes["sco-id"]#</td>
<td>#item.name.XmlText#</td>
<td>#item.XmlAttributes["type"]#</td>
</tr>
</cfloop>
</table>
</cfoutput>
7.
To provide links to launch content items, call the
sco-info
action for each item, and determine
the item’s full absolute URL by appending the returned
url-path
tag to the domain name you
acquired. This results in a URL such as http://breeze.example.com/p12345678/.
For more information about launching content, see
“About security and launching content”
on page 20
.
Содержание BREEZE-USING THE BREEZE XML WEB SERVICES
Страница 1: ...Using the Breeze XML Web Services...
Страница 8: ...8 Contents...
Страница 12: ...12 Introduction Before You Begin...
Страница 26: ...26 Chapter 2 Working with Filters...
Страница 36: ...36 Chapter 3 Common Tasks...
Страница 112: ...112 Chapter 4 Action Reference...
Страница 186: ...186 Chapter 5 XML Results Reference...
Страница 196: ...196 Index...