Getting the URL to Access a Conference Center with the Live Meeting service API
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
To manage meetings or users in a conference center using the Live Meeting service API, you must first obtain, in a session, the URL to the Live Meeting service API processor. This URL is different from the one used to manage meetings and users through the Live Meeting Web user interface. The URL for API access can be obtained using an HTTPS GET operation with the following special URL.
https://www.livemeeting.com/cc/<conference_center>/xml/4.0/GetPostingURLRequest
Here <conference_center> is the placeholder for the name of your Live Meeting conference center. The xml/4.0 part of the URL indicates that the access is to use the Live Meeting service API for the Live Meeting 2005 or Live Meeting 2007 service. The last part of the URL GetPostingURLRequest specifies the message to be processed. The response to this request is the physical URL to the conference centers API processor. This response is sent as an XML document containing a GetPostingURLReply element. For more information, see the GetPostingURL message in Live Meeting service API Reference.
Example Implementation of Getting the Posting URL for Access Using the Live Meeting service API
The following example shows one way to implement this HTTP GET operation, with the help of the HttpWebRequest and HttpWebResponse classes supported by the Microsoft .NET Framework.
public string GetPostingURLRequest(string confCenter)
{
string strUrl = string.Empty;
XmlDocument xmldoc = new XmlDocument();
// Get the posting URL.
getPostingUrl = String.Format(
"https://www.livemeeting.com/cc/{0}/xml/4.0/GetPostingURLRequest",
confCenter);
// Send the GetPostingURLRequest message to the conference center;
HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create(getPostingUrl);
myReq.Method = "GET";
HttpWebResponse myResp = null;
try
{
// Get the response from the conference center
myResp = (HttpWebResponse)myReq.GetResponse();
Stream respStream = myResp.GetResponseStream();
if (myResp.ContentType == "application/xml")
{
StreamReader reader = new StreamReader(
respStream, Encoding.UTF8);
xmldoc.Load(respStream);
// Retrieve the url attribute of <GetPostingURLReply>
XmlNode attrUrl = xmldoc.SelectSingleNode(
"/PlaceWareConfCenter/GetPostingURLReply/@url");
if (attrUrl != null)
strUrl = attrUrl.Value;
}
}
catch (Exception e)
{
// Log the error message or do other error handling routines.
Console.WriteLine("Exception: {0}\nTrace: {1}",
e.Message, e.StackTrace);
}
finally
{
if (myResp != null)
myResp.Close();
}
return strUrl;
}
VBScript Example of Getting the Posting URL
The following is another implementation using Microsoft Visual Basic® Scripting Edition (VBScript).
set xmlpost = createobject("WinHttp.WinHttpRequest.5.1")
if err.number <> 0 then
wscript.echo "Error 0x" & myHex(err.number,8) & ": creating WinHttp object"
wscript.echo err.source & " - " & err.description
wscript.quit
end if
URL = "http://www.livemeeting.com/cc/" _
& wscript.arguments(0) _
& "/xml/4.0/GetPostingURLRequest"
call xmlpost.Open ("GET", URL, FALSE)
if err.number <> 0 then
wscript.echo "Error 0x" & Hex(err.number,8) & ": using WinHttp.Open method"
wscript.echo err.source & " - " & err.description
wscript.quit
end if
xmlpost.Send
if err.number <> 0 then
wscript.echo "Error 0x" & Hex(err.number,8) & ": using WinHttp.Send method"
wscript.echo err.source & " - " & err.description
wscript.quit
end if
set xmlbody = createobject("Msxml2.DOMDocument")
xmlbody.loadXML(xmlpost.responsetext)
wscript.echo URL & vbcrlf
Set replynode = xmlbody.selectSingleNode("//GetPostingURLReply")
wscript.echo replynode.getAttribute("url")