MACROMEDIA BREEZE 5 Integration Manual page 34

Hide thumbs Also See for BREEZE 5:
Table of Contents

Advertisement

Check that the
2.
the value of the
If the status code isn't
following:
<cfset xml= XmlParse(cfhttp.FileContent)>
<cfset resultsElement= XmlSearch(xml, "//status[@code='ok']")>
<cfif ArrayLen(resultsElement) neq 1>
<!--- No status code "ok" found. Check for other status codes and handle
errors. --->
</cfif>
Request a list of Breeze users from the Breeze server by calling the
3.
The server returns a complete list of all principals, including principals that aren't users.
(For information about principals, see
The following code calls the
included as an HTTP parameter.
<cfhttp url="#baseurl#api/xml?action=principal-list" method="post">
<cfhttpparam type="Cookie" name="BREEZESESSION" value="#loginCookie#">
</cfhttp>
Note: This HTTP request uses the POST method rather than GET because the only way to specify
an HTTP parameter in CFML is by using POST. The URL and the query parameters remain the
same as if you were using GET, however.
Make sure that the API completed successfully by parsing the returned XML to ensure that the
4.
value of the
status
If your code must be robust, you should check the
API.
If the status code is
5.
attribute set to
type
The following example places a list of all Breeze users into the array
<cfset xmlPrincipalList= XmlParse(cfhttp.FileContent)>
<cfset allUsers = XmlSearch(xmlPrincipalList, "//principal [@type='user']")>
Obtain a list of all the users listed in the directory service.
6.
The procedure for obtaining this list depends on the directory service.
Compare the values contained in the
7.
from the directory service, using a list-comparison algorithm of your choice.
Determine which users are in the directory service but not in Breeze; these are new users to
a
be added to Breeze.
Determine which users are in Breeze but not in the directory service; these users should be
b
removed from Breeze.
Determine which users are in both Breeze and the directory service, but have different
c
names in the two places; these users' names should be changed in Breeze.
34
Chapter 3: Common Tasks
API completed successfully by parsing the returned XML and examining
login
tag's
attribute.
status
code
, determine what the error was and handle it appropriately, as in the
ok
principal-list
tag's
attribute is set to
code
, search the returned list of principals to find all principals that have a
ok
.
user
"About principals, SCOs, and IDs" on page
API. The cookie value from the previous step is
.
ok
tag in the returned XML after every
status
tags for the Breeze users with the e-mail addresses
login
API.
principal-list
17.)
:
allUsers

Advertisement

Table of Contents
loading

Table of Contents