Communicator Web Access AJAX Service SDK Released!!

Published 06 April 06 05:20 PM | adarshk 

If you are looking for adding cool instant messaging and presence functionality to your web applications or simple C# applications, try out Communicator Web Access AJAX Service SDK, it already includes the sample code to get started. I will also keep posting quick code snippets here.

 

Quick Info from the SDK:

Communicator Web Access AJAX Service is the application programming interface for Microsoft Office Communicator Web Access. Application developers can use it to create Communicator-compatible clients that allow users to manage and share presence information, to manage contacts and groups, to send and receive instant messages, and to search for users within an enterprise. Such clients can be a browser-based Web application (e.g., an ASP or ASP.NET application) or a standalone network application (e.g., a .NET executable). The client applications can be written in a wide range of programming languages including JavaScript, C#, Perl, C/C++, and the Visual Basic development system. Because the Communicator Web Access AJAX Service is based on the flexible AJAX programming model, the client applications are not limited to running on Microsoft Windows operating systems and can readily be deployed to desktop, laptop, or other devices.

 

Download Link:

http://www.microsoft.com/downloads/details.aspx?familyid=A839967B-680F-41E6-99B4-F020319BBD88&displaylang=en

 

This posting is provided "AS IS" with no warranties, and confers no rights

Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Parwez Ahamad said on April 26, 2006 6:56 AM:
Please send me process for login on ajax service
# Steven Thiakos said on September 15, 2006 7:53 PM:
You can download the SDK from microsoft:
http://www.microsoft.com/downloads/details.aspx?familyid=a839967b-680f-41e6-99b4-f020319bbd88&displaylang=en

The process is as follows:
1.  Submit Logon request via POST HTTP to https://yourserver/forms/logon.html
with the following data (as an example)
“uri=jaya@contoso.com&user=contoso\\jaya&pw=<password>&signinas=0&language=en”
1b. If you use IWA then use https://yourserver/iwa/logon.html with no body
2.  You get a response and in the response is a cookie used as a ticket for any future requests to the server.
3.  Set the cookie to each http communication channel (the command channel and asynchronous event channel)
4.  Begin Communicating.
# Zille said on December 20, 2006 12:50 PM:

Hello,

I want to build a c' instant messaging application using this sdk. I am not sure how should i start,which server does it use, etc. How to go about it.

# Zille said on December 20, 2006 12:51 PM:

Hello,

I want to build a c# instant messaging application using this sdk. I am not sure how should i start,which server does it use, etc. How to go about it.

# hardik patel said on May 29, 2007 3:12 AM:

I am working on web application using C#. When I send request to server every QueryTimeout period (approx 5 second). But after some request (3 to 4 request), CWA server is going to hang and give reply after sometime. So my application is slow down and after sometime hang.

can you please help me why that cwa server is going to slow after sometime?

# Qianbo Huai said on May 30, 2007 4:20 PM:

When there isn't any event to deliver, the server will hold on the request for a while. Therefore, if events are available during the holding period, the server can respond right away.

If your application "hangs" due to delayed response from the server, you may need to change the design to avoid synchronous waiting or move the synchronous waiting to a separate thread.

# vinay said on January 7, 2008 1:42 AM:

Actually for CWA we require Web Access Server which itself provides Oc2.0 look and feel so whats the  need of AJAX API,

CAn anybody guide me in this aspect it will be much helpfull to me ,

thanks in advance

# Anoop Kumar said on April 3, 2008 11:42 AM:

<<<<Submit Logon request via POST HTTP to https://yourserver/forms/logon.html

with the following data (as an example)

“uri=jaya@contoso.com&user=contoso\\jaya&pw=<password>&signinas=0&language=en”

1b. If you use IWA then use https://yourserver/iwa/logon.html with no body>>>

Hi,

Why this uri is need?

If we don't pass any uri and just provide domain\user id and password then also it works.

Please explain the essence of uri while login

# John said on June 2, 2008 4:16 AM:

I am trying to post a login request using the sample code and i am unable to contact the server it looks like. I cant see any data going to the server from the client PC running mozilla browser. Are there any tools that would be useful in debugging the ajax calls? It looks like there is not much resources for folks trying to get started with ajax comm to the off comm web access server ( Only when it comes to plain javascript).

Thanks

var data = "<cwaRequests><logon rid="0"><user>mydomain\myname</user><password>mypass</password></logon></cwaRequests>";

var httpRequest = new XMLHttpRequest();

if(!httpRequest)

{

      alert("Can not create a XmlHttpRequest Object!");

}

var isAsync = true;

httpRequest.open("POST", url, isAsync);

httpRequest.setRequestHeader("Accept", "*/*");

httpRequest.setRequestHeader("UserAgent",  "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14");

httpRequest.setRequestHeader("ContentType", "application/x-www-form-urlencoded");

httpRequest.setRequestHeader("Timeout", 1000*60);

httpRequest.setRequestHeader("CWA-Ticket", this.authTicket);

httpRequest.onreadystatechange = ReadyStateChanged;

document.write("sending data..");

httpRequest.send(data);

document.write("sent data");

# Mahesh Varma said on October 16, 2008 6:51 AM:

I am trying to get the presence information from communicator server. I am able to login and log out but when i try to get presence it's giving a blank response(<xml></xml>).

url i am hitting to get presence :

"<OCWA Server>" + "/cwa/MainCommandHandler.ashx?Ck=" + userCookieRandomName

data i am sending :

string jsonMethod = "{\"AJAXVersion\":\"1.0\","+

                               "\"methods\":"+

                               "["+

                                   "{"+

                                       "\"RequestId\":30,"+

                                       "\"MethodName\":\"QueryPresence\"," +

                                       "\"URI\":\"sip:<uri>\"" +

                                   "}"+

                               "]"+

                               "}";

I am unable to figure out why it's returning blank response. Can anyone help me to get the presence?

Thanks in advance.

# Jency said on February 6, 2009 3:20 AM:

The login to CWA works fine with a POST request, but when I try to do a initiateSession Request using a POST request to the cwa/MainCommandHandler.ashx uri, it gives a 500 internal server error. If I check the IIS logs also it just shows a 500 error and nothing else.

Please can you suggest what is wrong in this

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required

Search

This Blog

Syndication

Page view tracker