cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1136
Views
0
Helpful
2
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Yasar Arafath on 17-06-2013 04:42:49 AM
Hi,
              I am try to create meeting by using

xsi:type="java:com.webex.service.binding.meeting.CreateMeeting"
this.

But am not able to create meeting.I got 

FAILUREThe specified meeting type doesn't belong to current service typePRIMARY110052


How to Create meeting,please send the step's for create meeting.

Regard's,
Yasar.

Subject: RE: Create Meeting
Replied by: Lushanthan Sivaneasharajah on 17-06-2013 05:06:53 AM
hi Yasar,
please remove the <meetingType>1</meetingType> tag from your xml and try to send. Meeting type actually means meeting template I think. Since you don't have any templates created remove that one, so that it tries the default template.

Subject: RE: Create Meeting
Replied by: Yasar Arafath on 17-06-2013 07:06:23 AM
Hi Lushanthan ,

    Thanks for your response.It's working fine,here i got

SUCCESSPRIMARY693430337https://apidemoeu.webex.com/apidemoeu/j.php?ED=92720682&UID=481257127&ICS=MIFH&ST=1https://apidemoeu.webex.com/apidemoeu/j.php?ED=92720682&UID=481257127&ICS=MIFA&ST=1af6b71f8bb43955dc2d543009e462808

But how to use this response in my asp.net page.

Regard's
Yasar.

Subject: RE: Create Meeting
Replied by: Yasar Arafath on 17-06-2013 08:15:33 AM
Thanks Lushanthan,

        I'll try this .
Regard's
Yasar.

Subject: RE: Create Meeting
Replied by: Lushanthan Sivaneasharajah on 17-06-2013 07:21:34 AM
Actually what do you want to do? If you are going to show just a success or a error msg on meeting creation, then by reading the xml using an xml parser you can get the values you want. Here is my example code which I'm using assuming I have the response xml. I'm just printing them to a label. The only thing you need to do is to process the xml.

private void ProcessMeetingResponse(XmlDocument xmlReply)
        {
            StringBuilder sb = new StringBuilder();
            try
            {
                XmlNamespaceManager manager = new XmlNamespaceManager(xmlReply.NameTable);
                manager.AddNamespace("serv", "http://www.webex.com/schemas/2002/06/service");
                manager.AddNamespace("meet", "http://www.webex.com/schemas/2002/06/service/meeting");
                manager.AddNamespace("com", "http://www.webex.com/schemas/2002/06/common");
                manager.AddNamespace("att", "http://www.webex.com/schemas/2002/06/service/attendee");

                string status = xmlReply.SelectSingleNode("/serv:message/serv:header/serv:response/serv:result", manager).InnerText;

                if (status == "SUCCESS")
                {
                    //Process Success Meeting Message
                    lblMessage.ForeColor = System.Drawing.Color.Green;
                    sb.Append("Meeting Created Successfully.<br/><br/><b>Meeting Information</b>:</br>");
                    string meetingKey = xmlReply.SelectSingleNode("/serv:message/serv:body/serv:bodyContent/meet:meetingkey", manager).InnerText;
                    sb.Append("Meeting Key:" + meetingKey + "<br/>");

                    string hostCalenderURL = xmlReply.SelectSingleNode("/serv:message/serv:body/serv:bodyContent/meet:iCalendarURL/serv:host", manager).InnerText;
                    sb.Append("Host iCalender Url:</br><a href='" + hostCalenderURL + "'>  " + hostCalenderURL + "</a><br/>");

                    string attendeeCalenderURL = xmlReply.SelectSingleNode("/serv:message/serv:body/serv:bodyContent/meet:iCalendarURL/serv:attendee", manager).InnerText;
                    sb.Append("Attendee iCalender Url:</br><a href='" + attendeeCalenderURL + "'>  " + attendeeCalenderURL + "</a><br/>");
                }
                else if (status == "FAILURE")
                {
                    //Process Failure Meeting Message
                    lblMessage.ForeColor = System.Drawing.Color.Red;
                    sb.Append("Error in Meeting Creation. <br/><br/><b>Error Details</b>: <br/>");
                    string error = xmlReply.SelectSingleNode("/serv:message/serv:header/serv:response/serv:reason", manager).InnerText;
                    string exceptionID = xmlReply.SelectSingleNode("/serv:message/serv:header/serv:response/serv:exceptionID", manager).InnerText;
                    sb.Append("Error:");
                    sb.Append(error);
                    sb.Append("<br/>Exception Id:" + exceptionID);
                }
                else
                {
                    lblMessage.ForeColor = System.Drawing.Color.Red;
                    sb.Append("An Unknown error occurred. Please contact the Administrator.");
                }
            }
            catch (Exception e)
            {
                sb.Append("Error: " + e.Message);
            }
          lblMessage.Text= sb.ToString();
        }

Subject: RE: Create Meeting
Replied by: Yasar Arafath on 18-06-2013 04:57:05 AM
Hi Lushanthan,
                  Thanks  It's working fine,here i got

Meeting Created Successfully.
Meeting Information:
Meeting Key:692415749
Host iCalender Url:
  https://apidemoeu.webex.com/apidemoeu/j.php?ED=92728032&UID=481257127&ICS=MIFH&ST=1
Attendee iCalender Url:
  https://apidemoeu.webex.com/apidemoeu/j.php?ED=92728032&UID=481257127&ICS=MIFA&ST=1

Here how i am use this response,and how to invite meeting for contacts.

Regard's
Yasar.
Comments
krupathakker
Community Member

Hi,

I have integrated the webex api code in asp.net for creating meeting but it is giving me Failure Message : "Failed to get siteUrl" . The exception Id is 010000.

Below is my code

  • I have created an xml file named CreateMeeting.xml as below

<?xml version="1.0" encoding="utf-8" ?>

<serv:message xmlns:serv="http://www.webex.com/schemas/2002/06/service" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://www.webex.com/schemas/2002/06/service http://www.webex.com/schemas/2002/06/service/service.xsd">

<header>

<securitycontext>

<siteName>apidemoeu</siteName>

<webExID>abc@xyz.com</webExID>

<password>xxxxx</password>

<siteID>yyyyyy</siteID>

<partnerID>zzzzz</partnerID>

</securitycontext>

</header>

<body>

<bodycontent xsi:type="java:com.webex.service.binding.meeting.CreateMeeting">

<accesscontrol>

              </accesscontrol>

<metadata>

<confname>Sample Meeting</confname>

<!--<meetingtype>1</meetingType>-->

<agenda>Test</agenda>

</metadata>

<participants>

<maxusernumber>4</maxusernumber>

<attendees>

<attendee>

<person>

            <name>abc</name>

            <email>pqr@xyz.com</email>

</person>

</attendee>

</attendees>

</participants>

<schedule>

<startdate>2014-03-15</startdate>

<opentime>900</opentime>

<!--<jointeleconfbeforehost>true</joinTeleconfBeforeHost>-->

<duration>20</duration>

<timezoneid>42</timezoneid>

<!-- Colombo Time Zone Id=42-->

</schedule>

<!--<telephony>

<telephonysupport>CALLIN</telephonySupport>

<exttelephonydescription>

          Call 1-800-555-1234, Passcode 98765

</extTelephonyDescription>

</telephony>-->

</bodycontent>

</body>

</serv:message>

  • Below is the code in my button click event in asp.net

protected void btnCreate_Click(object sender, EventArgs e)

    {

        WebResponse response = null;

        Stream dataStream = null;

        try

        {

            string confName = "Sample Meeting";

            //Get Emails separated by commas

            string[] emails = attendeeList.Split(',');

            //Create New Meeting and reload page               

            //string strXMLServer = @"https://go.webex.com/WBXService/XMLService";

            string strXMLServer = @"https://apidemoeu.webex.com/WBXService/XMLService";

            WebRequest request = WebRequest.Create(strXMLServer);

            // Set the Method property of the request to POST.

request.Method = "POST";

            // Set the ContentType property of the WebRequest.

request.ContentType = "application/x-www-form-urlencoded";

            UTF8Encoding encoding = new UTF8Encoding();

            XmlDocument xmlDocument = new XmlDocument();

            try

            {

XmlReader reader = new XmlTextReader(Server.MapPath("xml/CreateMeeting.xml"));

xmlDocument.Load(reader);

            }

            catch (Exception)

            {

throw;

            }

            //XmlNamespaceManager manager = new XmlNamespaceManager(xmlDocument.NameTable);

            //manager.AddNamespace("serv", "http://www.webex.com/schemas/2002/06/service");

            ////Set Meeting metadata

            //xmlDocument.SelectSingleNode("/serv:message/body/bodycontent/metadata/confname", manager).InnerText = confName;

            //xmlDocument.SelectSingleNode("/serv:message/body/bodycontent/schedule/startdate", manager).InnerText = DateTime.Now.ToString();

            ////Set Attendees

            //XmlNode attendeeListNode = xmlDocument.SelectSingleNode("/serv:message/body/bodycontent/participants/attendees", manager);

            //if (attendeeListNode != null)

            //{

            //    foreach (string email in emails)

            //    {

            //        try

            //        {

            //            XmlNode attendeeNode = xmlDocument.CreateNode(XmlNodeType.Element, "attendee", "");

            // attendeeNode.InnerXml = "<person><name>" + email.Split('@')[0] + "</name><email>" + email.Trim() + "</email></person>";

            // attendeeListNode.AppendChild(attendeeNode);

            //        }

            //        catch (Exception)

            //        {

            //            throw new Exception("Please insert valid email addresses");

            //        }

            //    }

            //}

            byte[] byteArray = Encoding.UTF8.GetBytes(xmlDocument.OuterXml);

            // Set the ContentLength property of the WebRequest.

request.ContentLength = byteArray.Length;

            // Get the request stream.

request.GetRequestStream().Write(byteArray, 0, byteArray.Length);

            // Write the data to the request stream.

            //dataStream.Write(byteArray, 0, byteArray.Length);

            // Close the Stream object.

            dataStream.Close();

            // Get the response.

response = request.GetResponse();

            // Get the stream containing content returned by the server.

dataStream = response.GetResponseStream();

            XmlDocument xmlReply = null;

            //if (response.ContentType == "application/xml" || response.ContentType == "text/xml;charset=UTF-8")

            //{

xmlReply = new XmlDocument();

xmlReply.Load(dataStream);

            //}

            //Process Meeting Response

            string result = this.ProcessMeetingResponse(xmlReply);

            if (!string.IsNullOrEmpty(result))

            {

lblMessage.Text = result;

            }

        }

  

Kindly suggest a solution.

Thanks,

Krupa

jaydem
Cisco Employee
Cisco Employee

Hi Krupa,

The error "Failed to get siteUrl" means the API info in the securityContext (siteName, siteID, partnerID) don't match for the WebEx site you are POSTing your XML request to.  If you are POSTing to https://apidemoeu.webex.com/WBXService/XMLService, please make sure the siteID and partnerID are the ones associated with apidemoeu.webex.com.

Regards,

Jayde

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links