November 5, 2008 12:18 by
Madhu
In order to integrate WebEx into web application we need to complete the following steps:
-
Create a developer account on WebEx developer community
We need to create a developer account in the sandbox environment. The credentials identify and authenticate your web application request when you make an API call to WebEx.
-
Request & Response
Make the API calls, check the response and save to database or send the meeting details to participants via email
Creating WebEx Developer Account
You will have to create a Developer Account on the WebEx developer environment in order to test your application. Following are the steps:
-
-
After signing up, account information will be sent to your mail id. It may take more time, as each application will be manually reviewed by WebEx team.
-
Email will have the SITE ID and PARTNER ID of your account.
-
You have to use the above account information (USERNAME, PASSWORD, SITE ID, and PARTNER ID) in all the requests to authenticate your web application with WebEx.
-
Creating Meeting (Sample Code)
In ASP.NET page, the following function will be called to schedule a meeting. The parameters will be Meeting Name, its Date and Time. In this example WebEx ID (Email Id), Password, Site Id, and Partner Id is hardcoded.
protected void SendCreateMeetingRequestToWebEx(string MeetingName, string MeetingDate, string MeetingTime)
{
string strReq = @"<?xml version=""1.0"" encoding=""UTF-8""?>" +
"<serv:message xmlns:xsi=" + "\"" +
"http://www.w3.org/2001/XMLSchema-instance" + "\"" + ">" +
"<header>" +
"<securityContext>" +
"<webExID>xxx@xxx.xxx</webExID>" +
"<password>xxxxxx</password>" +
"<siteID>000000</siteID>" +
"<partnerID>XXXX0000</partnerID>" +
"</securityContext>" +
"</header>" +
"<body>" +
"<bodyContent xsi:type=" + "\"" +
"java:com.webex.service.binding.meeting.CreateMeeting" +
"\"" + ">" +
"<metaData>" +
"<confName>" + MeetingName + "</confName>" +
"</metaData>" +
"<schedule> " +
"<startDate>" + MeetingDate + " " + MeetingTime + ":00" + "</startDate> " +
"</schedule>" +
"</bodyContent>" +
"</body>" +
"</serv:message>";
HttpWebRequest hwrRequest = ((HttpWebRequest)(HttpWebRequest.Create(" https://apidemoeu.webex.com/WBXService/XMLService")));
hwrRequest.Method = "POST";
hwrRequest.ContentType = "text/xml";
UTF8Encoding encoding = new UTF8Encoding();
byte[] postBytes = encoding.GetBytes(strReq);
hwrRequest.ContentLength = postBytes.Length;
Stream postStream = hwrRequest.GetRequestStream();
postStream.Write(postBytes, 0, postBytes.Length);
postStream.Close();
HttpWebResponse hwrResponse = ((HttpWebResponse)(hwrRequest.GetResponse()));
Stream responseStream = hwrResponse.GetResponseStream();
StreamReader sr = new StreamReader(responseStream);
string respString = sr.ReadToEnd();
respString = respString.Trim();
/*Here we are writing to a directory as XML file to check*/
/*Instead you read the XML nodes and find, is it success or a failure*/
/*If success, you will have Host meeting URL and Attendee meeting URL in the Response*/
TextWriter res = new StreamWriter(Server.MapPath(@"WebExReqRes\CreateMeeting.xml"));
res.WriteLine(respString.ToString(), true);
res.Close();
}
The response will have the MeetingKey, Host URL, and Attendee URL if it is success. Now you have to push them to database to show respective URL to your users based on profile. And also you can frame emails and send to them handy.
Further the MeetingKey you have to use to Update Meeting or Delete a Meeting or to create Join Meeting URL for each individual attendee seperately instead of common Attendee URL.
c882213e-e851-4c7e-9069-7f6298136b5f|0|.0