Home

WebEx, currently acquired by CISCO, was started up aiming to provide a suite of applications specifically designed for business processes such as sales, support, training and marketing processes. Any company taking web platform seriously in their business will find it advantage with WebEx’s on-demand collaboration, online meeting, web conferencing and video conferencing applications.

Using WebEx out of the box is straight forward. However, to date, WebEx seriously need to have their documentation relooked, especially the “Lesson-1: How to get started” kind of documentation.

Here, we are going to look at the fundamental steps in integrating WebEx API, particularly in ASP.NET.

What Can We Do?

Generally, you will need SiteID and PartnerID for each XML API calls, and to have your own dedicated siteID and partnerID you will need to sign up as Gold developer (USD$2500/year at point of this blog entry was created).

However, WebEx is kind enough to allow anyone to test out their API on a shared sandbox site (https://apidemoeu.webex.com) without any costs before deciding whether their services really suits your business needs and requirements. Do note that site admin privileges will not be granted, hence you will be limited to APIs that do not require admin level access.

Let’s Get Started

Before you go ahead exploring the sandbox site, you will first need to be logged into the Cisco Developer Community. Get your free developer account from WebEx Developer Portal, if you haven’t got one.

Once you have got your account created and logged in, you will need to obtain the shared SiteID and PartnerID for use in shared sandbox site.

Click on “Support” from the navigation menu on top and click on “Try WebEx APIs” under Support Resources. Alternatively, you may click here to access the page directly.

On Top Of That

Great, now that you have a developer account, the shared SiteID and PartnerID.

Next, you will need to sign up for a host account on WebEx shared sandbox site. Do note that this is on top of the developer account that you signed up earlier, and not accessible elsewhere if you are not logged in as a developer.

On the same “Try WebEx APIs” page, you will notice the line at the bottom that writes: “Click Here to access the sign-up form.” Yes. Click there.

* Useful Tips: try use the same WebEx ID and Password as your WebEx account details to avoid confusions!

The whole purpose of this sign-up is to obtain the WebEx ID that you are going to use to make API calls (to let WebEx knows that it is You making the requests).

The Code, The Calls

Up to this point, you should have the shared SiteID and PartnerID, and your dedicated WebEx ID and Password.

If you missed out any of these, do go through again the steps from the beginning.

To make XML request is simple, and many alternative ways of doing so. If you have no idea how that is done, you may refer to the code block as follow.

Do note that you need to replace the parameters to your own details.

Imports System.IO
Imports System.Net
Imports System

Partial Public Class sample
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Try

'Dim strXMLServer As String = "https://go.webex.com/WBXService/XMLService"
Dim strXMLServer As String = "https://apidemoeu.webex.com/WBXService/XMLService"

Dim wwwrequest As WebRequest = WebRequest.Create(strXMLServer)
' Set the Method property of the request to POST.
wwwrequest.Method = "POST"
' Set the ContentType property of the WebRequest.
wwwrequest.ContentType = "application/x-www-form-urlencoded"

' Create POST data and convert it to a byte array.
Dim strXML As String = "<?xml version=""1.0"" encoding=""UTF-8""?>" + vbCrLf
strXML += "<serv:message xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:serv=""http://www.webex.com/schemas/2002/06/service"" xsi:schemaLocation=""http://www.webex.com/schemas/2002/06/service http://www.webex.com/schemas/2002/06/service/service.xsd"">" + vbCrLf
strXML += "<header>" + vbCrLf
strXML += "<securityContext>" + vbCrLf
strXML += "<webExID>_YOUR_WEBEX_ID_</webExID>" + vbCrLf
strXML += "<password>_YOUR_PASSWORD_</password>" + vbCrLf
strXML += "<siteID>_YOUR_SITE_ID_</siteID>" + vbCrLf
strXML += "<partnerID>_YOUR_PARTNER_ID_</partnerID>" + vbCrLf
strXML += "</securityContext>" + vbCrLf
strXML += "</header>" + vbCrLf
strXML += "<body>" + vbCrLf

strXML += "<bodyContent xsi:type=""java:com.webex.service.binding.site.GetSite"" ></bodyContent>" + vbCrLf

strXML += "</body>" + vbCrLf
strXML += "</serv:message>"

Dim byteArray() As Byte = Encoding.UTF8.GetBytes(strXML)

' Set the ContentLength property of the WebRequest.
wwwrequest.ContentLength = byteArray.Length

' Get the request stream.
Dim dataStream As Stream = wwwrequest.GetRequestStream()

' Write the data to the request stream.
dataStream.Write(byteArray, 0, byteArray.Length)
' Close the Stream object.
dataStream.Close()

' Get the response.
Dim wwwresponse As WebResponse = wwwrequest.GetResponse()

' Get the stream containing content returned by the server.
dataStream = wwwresponse.GetResponseStream()

' Open the stream using a StreamReader for easy access.
Dim reader As New StreamReader(dataStream)

' Read the content.
Dim responseFromServer As String = reader.ReadToEnd()

' Display the content.

Response.ContentType = "text/xml"
Response.ContentEncoding = System.Text.Encoding.UTF8
Response.Write(responseFromServer)

' Clean up the streams.
reader.Close()
dataStream.Close()
wwwresponse.Close()

Catch ex As Exception

Response.Write(ex.Message.ToString)

End Try

End Sub

End Class

Shown above is how you mare making a test XML request to WebEx XML API, to retrieve the details based on the SiteID. In order to make other method calls, simply change the type attribute of bodyContent tag.

For other methods, kindly check out their Reference Guide at http://developer.webex.com/web/meetingservices/xmlapi

Hope you will find this helpful in helping you getting started with WebEx API integration.

BOOKMARK
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Furl
  • Live
  • Spurl
  • StumbleUpon
  • TwitThis
  • YahooMyWeb

SPEAK / ADD YOUR COMMENT

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Return to Top

*Details

Sideblog


  • [01/28/2010]

    Apple has just announced their latest product - iPad (a new product category in between iPod Touch and Mac computer), starting at USD$499 - http://www.apple.com/ipad/

  • [12/09/2009]

    New SG iPhone plans released, from 2 carriers - http://bit.ly/5xzZ0I (M1) http://bit.ly/7f41zc (Starhub) - apparently M1 has the better deal, with 10GB & unlimited data bundle! woot!

  • [06/11/2009]

    WordPress "Baker" 2.8 released. Faster, redesigned theme management, new widget interface, and new Screen Options on every page. Find out more

  • My Wall


    Latest on Wed, 12:04

    d0rr: wth, my listing styles are not appearing, anyone can help to spot where the problem is??

    d0rr: larger font size, wider content area - does little changes make difference?

    d0rr: hey yuan, nice to see u here before u sleep :P

    TCY: hor hor hor Is time to sleep ~~~~~~~

    real rape footage: mm.. strange :)

    » Say something!



    *Who, adorr?

    I am a self-taught photographer who earns a living as web developer. I am a Technology Engineer, in which am professionally concerned with developing economical and safe solutions to practical problems. And if you are expecting the magical mixture between science and arts, you found me.



    • USA Road Trip 2009/10
    • W3 Silver Awards
    • Red Lanterns
    • Blossom
    • Cheng Ho Marine
    • Flight @ Dawn
    • Full Moon
    • Arial, 17px
    • Home-cooked, With Love
    • Pepper Lunch
    • Happy Birthday, Singapore
    • Lilo the Steeeetch
    • Hunny the Pooooooh