Corporation Server User Manual
Using the Presence Web Services Interfaces
OCMS Parlay X Web Services 6-3
Using the Presence Web Services Interfaces
This section describes how to use each of the operations in the interfaces, and includes
code examples.
Interface: PresenceConsumer, Operation: subscribePresence
This is the first operation the application must call before using another operation in
this interface. It serves two purposes:
■ It allows the Web services to associate the current HTTP session with a user.
■ It provides a context for all the other operations in this interface by subscribing to
at least one presentity (SUBSCRIBE presence event).
Code Example
// Setting the attribute to activity
PresenceAttributeType pa = PresenceAttributeType.Activity;
PresenceAttributeType[] pat = new PresenceAttributeType[]{pa};
startPresenceNotification Not supported.
endPresenceNotification Not supported.
Table 6–2 PresenceNotification Interface
Operation Description
statusChanged Not supported.
statusEnd Not supported.
notifySubscription Not supported.
subscriptionEnded Not supported.
Table 6–3 PresenceSupplier Interface
Operation Description
publish Maps directly to a SIP PUBLISH.
getOpenSubscriptions Called by the presentity (supplier) to check if any watcher
wants to subscribe to its presence data. No SIP message maps
to this method. Returns pending subscriptions currently in
the Web services server.
updateSubscriptionAuthorizati
on
The supplier uses this method to answer any open pending
subscriptions. An XCAP PUT message is sent to the XDMS
server to update the presence-rule document.
getMyWatchers Retrieves the local list of watchers from the Web services
server.
getSubscribedAttributes Retrieves the local list of subscribed attributes from the Web
services server. Currently, only returns Activity.
blockSubscription Causes the Web services server to end a watcher subscription
by modifying the XCAP document on the XDMS server (i.e.,
putting the watcher on the block list).
Table 6–1 (Cont.) PresenceConsumer Interface
Operation Description