cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

If your Cloud Collaboration question is not answered quickly, please email devsupport@webex.com for additional help

486
Views
0
Helpful
3
Replies
Highlighted
Cisco Employee

Unable to get response back from webex

Hi, I am trying to run a LstsummaryMeeting, but, all I get back in the response is Success.

Can you help me find the problem in this Javascript code I have:

function getFormattedDate() {

    var date = new Date();

    var str = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() + " " +  date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();

    return str;

}

function log(fromwhere, message) {

    $('#logarea').append("<tr><td>" + getFormattedDate() + "</td><td>" + fromwhere + "</td><td>" + message + "</td></tr>");

}

function validateMeetingType() {

var strUser = <a user ID>;

var strPass = <a password>";

var sr = "<serv:message xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" +

                "<header>" +

                "<securityContext>" +

                "<webExID>xxxxxxxxr@cisco.com</webExID>" +

                "<password>xxxxxxxx</password>" +

                "<siteID>753647</siteID>" +

                "<partnerID></partnerID>" +  

                "</securityContext>" +

                "</header>" +

                "<body>" +

                "<bodyContent xsi:type=\"java:com.webex.service.binding.meeting.LstsummaryMeeting\">" +

                "<listControl>" +

                "<startFrom>1</startFrom>" +

                "<maximumNum>150</maximumNum>" +

                "<listMethod>OR</listMethod>" +

                "</listControl>" +

                "<order>" +

                "<orderBy>HOSTWEBEXID</orderBy>" +

                "<orderAD>ASC</orderAD>" +

                "</order>" +

                "</bodyContent>" +

                "</body>" +

                "</serv:message>";

var strHost = "safeway.webex.com";

var strURI = "http://" + strHost + "/WBXService/XMLService";

var xmlhttp = new XMLHttpRequest();

xmlhttp.onreadystatechange = function () {

        log("onreadystatechange", "readystate=" + xmlhttp.readyState);

        if (xmlhttp.readyState == 4) {

            if (xmlhttp.status == 200) {

                var safestr = xmlhttp.responseText;

                log("onreadystatechange", "<br/>4/200: " + safestr);

            }

            if (xmlhttp.status == 404) {

                var safestr = xmlhttp.responseText;

                log("onreadystatechange", "<br/>4/404: " + safestr);

            }

            if (xmlhttp.status == 12007) {

                var safestr = xmlhttp.responseText;

                log("onreadystatechange", "<br/>4/12007: " + safestr);

            }

            if (xmlhttp.status == 0) {

                var safestr = xmlhttp.responseText;

                log("onreadystatechange", "<br/>4/0: " + safestr);

            }

        }

    }

  

log("Main", "<br/>open");

xmlhttp.open("GET", strURI, false);

log("Main", "<br/>opened");

//xmlhttp.setRequestHeader('Content-Type', 'application/xml');

    try {

        var safestr = sr;

        safestr = safestr.replace(/</g, "&lt;");

        safestr = safestr.replace(/>/g, "&gt;");

        log("Main", "<br/>sending: " + safestr);

        xmlhttp.send(sr);

        log("Main", "<br/>sent");

    } catch (err) {

        var error =  err.message;

        log("Main", "<br/>fatal error: " + error);

    }

}


This code returns the following:

2014-9-10 18:17:44Main
open
2014-9-10 18:17:44onreadystatechangereadystate=1
2014-9-10 18:17:44Main
opened
2014-9-10 18:17:44Main
sending: <serv:message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><header><securityContext><webExID>a user ID</webExID><password>a password</password><siteID>753647</siteID><partnerID></partnerID></securityContext></header><body><bodyContent xsi:type="java:com.webex.service.binding.meeting.LstsummaryMeeting"><listControl><startFrom>1</startFrom><maximumNum>150</maximumNum><listMethod>OR</listMethod></listControl><order><orderBy>HOSTWEBEXID</orderBy><orderAD>ASC</orderAD></order></bodyContent></body></serv:message>
2014-9-10 18:17:44onreadystatechangereadystate=1
2014-9-10 18:17:44onreadystatechangereadystate=2
2014-9-10 18:17:44onreadystatechangereadystate=3
2014-9-10 18:17:44onreadystatechangereadystate=4
2014-9-10 18:17:44onreadystatechange
4/200: SUCCESS: WebEx XML API V6.0.0, WebEx XML API V5.4.0, WebEx XML API V5.9.0, WebEx XML API V5.8.0, WebEx XML API V5.6.0, WebEx XML API V7.3.0, WebEx XML API V8.0.0
2014-9-10 18:17:44Main
sent

I thought I would see an actual listing of meeting types rather than a Success message. It is as if the Send is never actually called and I am only getting back the running of /WBXService/XMLService

When I run in debug mode, this is the contents of the variable "sr" being passed into send():

"<serv:message xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><header><securityContext><webExID>xxxxxxx</webExID><password>xxxxxx</password><siteID>753647</siteID><partnerID></partnerID></securityContext></header><body><bodyContent xsi:type=\"java:com.webex.service.binding.meeting.LstsummaryMeeting\"><listControl><startFrom>1</startFrom><maximumNum>150</maximumNum><listMethod>OR</listMethod></listControl><order><orderBy>HOSTWEBEXID</orderBy><orderAD>ASC</orderAD></order></bodyContent></body></serv:message>"

There must be some minor oversight in this code as I had all this working a couple months ago.

-john

3 REPLIES 3
Highlighted
Cisco Employee

Re: Unable to get response back from webex

Hi John,

The response you are getting is expected because you are using http and GET. The payload is ignored when using GET.

Try changing to https and POST (both required by our servers) and see if that returns the results you are looking for.

Kasey

Highlighted
Cisco Employee

Re: Unable to get response back from webex

Thanks, that does make a lot of difference.

Changed to a POST and now get Sorry, no record foundPRIMARY000015

Could this be due to the fact that I did not specify a Partner ID? At the customer location the admin there said he did not see a Partner ID and thought it might be null.

-john mennear

408-894-6856

http://cisco-ucdt.blogspot.com/

http://cisco-ciac.blogspot.com/

Highlighted
Cisco Employee

Re: Unable to get response back from webex

Hi John,

I don't believe it's going to be the missing Partner ID in this case. You should get another error if that's the case.

Some things to keep in mind here:

- When authenticated as an admin, LstsummaryMeeting will return meetings for all hosts on the site.

- When authenticated as a host, it will only return your meetings.

- Any past meetings that have already been deleted from My Meetings will not be returned.

In this case, however, I've pulled an upcoming meetings report for this site and there are none, so you may want to try scheduling one or two and trying again.

Hope this helps,

Kasey

This widget could not be displayed.