WebEx Meeting Integration Steps

November 5, 2008 12:18 by Madhu

In order to integrate WebEx into web application we need to complete the following steps:

  1. 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.
  2. 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:

  1. Sign up at http://developers.webex.com/ with a valid email id to recieve your credentials to the WebEx system.
  2. 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.
  3. Email will have the SITE ID and PARTNER ID of your account.
  4. 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.
  5. Check API Reference Guide to understand more on Parameter nodes and Key Words for the requests to be made to organise meetings.
    http://www.webex.com/pdf/white_paper_integration_APIs.pdf page number 14 onwards.

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.


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

January 6. 2009 10:05
|