User Guide

32 Chapter 3: Common Tasks
10.
For each user whose information in Breeze must be updated, obtain the user’s ID, as follows:
a
Examine the data returned by the principal-list action in steps 2 through 4 and search
for the ID associated with the users login.
b
Obtain the user’s old first name and last name by calling the principal-info action.
c
Change the values as needed to match the name given by the directory service.
d
Call the principal-update action.
e
Check the returned XML to ensure the status code returned is "ok".
The following code doesnt include code for calling
principal-update or checking the
status code because those procedures were described in earlier steps:
<cfset principal= XmlSearch(xmlPrincipalList,
"//principal[login='#login#']")>
<cfset principalId= principal[1].XmlAttributes["principal-id"]>
<cfhttp url="#baseurl#api/xml?
action=principal-info&accesskey=#accesskey#&principal-id=#principalId#
" method="post">
<cfhttpparam type="Cookie" name="BREEZESESSION" value="#loginCookie#">
</cfhttp>
...
<!--- Add code here to check for an "ok" status code. --->
...
<cfset xml= XmlParse(cfhttp.FileContent)>
<cfset firstElement= XmlSearch(xml, "results/contact/first-name")>
<cfset firstName= firstElement[1].XmlText>
<cfset lastElement= XmlSearch(xml, "results/contact/last-name")>
<cfset lastName= lastElement[1].XmlText>
...
<!--- Add code here to set the new values for first name and last name,
call principal-update, and check for an "ok" status code. --->
Integrating Breeze with a portal
Suppose you have a portal application, such as a company’s intranet portal. You can integrate
Breeze into the portal to let users view and modify Breeze-related information from within the
context of the portal. For example, users can view upcoming Breeze meetings and see which
courses they are enrolled in.
The procedures in this section describe how to perform various tasks for a portal application
integrated with Breeze.
To log in as a particular user:
1.
Obtain the user’s login name and password, using a web-based form.
2.
Call the login action on the Breeze server, using the specified login name and password.
3.
Check the returned XML to ensure the status code returned is "ok".