12-09-2014 03:13 PM
Hi,
I have built a custom application using CAXL and would like to add additional functionality which allows for updating the presence for a given user. I am not sure if my approach is incorrect or if special permissions need to be set up on the server for the user connecting to the client in order for that user to update another user's presence. Below is my attempt.
To create the contact for the user whose presence needs updating I'm calling:
var contact = client.entitySet.entity(jid);
I am then storing the presence object for this contact:
var presence = contact.getPrimaryPresence();
Next I update the status message:
presence.setStatus("New Message");
Finally, update the presence for the contact:
var success = contact.updatePresence(presence, false);
After this call, success = false, and thus the presence hasn't been updated as desired. I have confirmed that the contact and presence exist/are not null.
Thanks!
Solved! Go to Solution.
12-11-2014 10:25 AM
The CAXL API provides IM&Presence capabilities for a single end-user. It does not have the ability to manage the presence status of other users.
To do something like that you will want to investigate the server-to-server 'Presence Web Services' APIs (SOAP and REST flavors) available on Cisco IM&P - see the Developer Guide for more details: https://developer.cisco.com/site/unified-presence/documentation/
There is a fairly extensive sample application and doc covering this API that may be helpful: https://developer.cisco.com/site/unified-presence/overview/web-services-reference-application/index.gsp
12-11-2014 07:30 AM
I'm not sure what you're trying to accomplish. Are you trying to set the presence of someone other than yourself? Someone in your roster or quick contact list?
12-11-2014 10:14 AM
Essentially, yes. The app should allow our receptionist to modify the presence for any user on the roster/quick contact list.
12-11-2014 10:25 AM
The CAXL API provides IM&Presence capabilities for a single end-user. It does not have the ability to manage the presence status of other users.
To do something like that you will want to investigate the server-to-server 'Presence Web Services' APIs (SOAP and REST flavors) available on Cisco IM&P - see the Developer Guide for more details: https://developer.cisco.com/site/unified-presence/documentation/
There is a fairly extensive sample application and doc covering this API that may be helpful: https://developer.cisco.com/site/unified-presence/overview/web-services-reference-application/index.gsp
12-11-2014 10:29 AM
Great, I will look into that. Thanks!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide