I was asked today how easy it would be to create a web control that would display a user's presence on their blog. My answer is it is pretty easy, which it is, but it isn't as intuitive as one might think. If you are familair with UC APIs at all your first instinct would be UC AJAX API and you'd be 50% correct.
As Oscar Newkerk pointed out to me, the UC AJAX API is a registered endpoint, meaning that OCS might just decide that your Instant Messages should go to that endpoint.... Which isn't what we want to have happen.
Q. How should we tackle this? A. We need to expose the UC AJAX API via a WCF Service.
First we will need to create a UC enabled AD account in which our service can log into CWA via the UC AJAX API with. We can give it a name like "WebServiceUser".
Next we need to create a WCF Service using a Publisher\Subscriber design pattern & it needs to be ASP.NET familiar WCF Service.
Finally we can create a AJAX Server Side control, which will be a client to our service and display a nice little presence bubble icon for the current status of the queried user.
The BIG benefit by exposing the UC AJAX as a service is we can use it for other purposes..but that is for another post some other time.
MSDN References: http://msdn2.microsoft.com/en-us/library/ms752254.aspxhttp://msdn2.microsoft.com/en-us/library/bb924552.aspx
As soon as I have completed the code I will post it here for everyone to download and use. I just need to find the time between my other projects.
Did you ever had the chance to finish your code?