Using easyXDM for HTTP service availability tests (or response parsing in general) possible?

73 views
Skip to first unread message

Andreas Dietrich

unread,
Mar 27, 2014, 2:56:54 AM3/27/14
to eas...@googlegroups.com

copied from http://stackoverflow.com/questions/22400966/using-easyxdm-or-any-other-client-side-framework-for-http-service-availability (I'll try to keep both sites up-to-date)

I can't see from the docs how it should work. Debugging with Firebug did not help either. Maybe I would have to sit for some hours to understand it better.

The basic problem is, that I'd like to check the availability of various geo services (WFS,WMS). Due to the problem of XSS browser restrictions XmlHttpRequest did not work.

I guess the Socket interface is the proper one to use, since I am not able to implement some CORS scenarios because I have no influence on the external services.

Using the following code works fine and returns some requested data (Firefox popup for the downloaded XML response):

var socket = new easyXDM.Socket({
    remote: "http://path.to/provider/", // the path to the provider
    onReady:function(success) {
        alert(success);  // will not be called
    }
    onMessage:function(message, origin) {
        alert(message, origin);  // will not be called
    }
});

However I did not find a way (trying with the onReady and onMessage callbacks) to somehow get to some HTTP status object that I can process to determine which kind of response, e.g. 200, 404, I got.

Maybe it's the complete wrong way to solve this?

Andreas Dietrich

unread,
Apr 2, 2014, 6:28:45 AM4/2/14
to eas...@googlegroups.com
Added my findings here. (please see there for further discussions)
Reply all
Reply to author
Forward
0 new messages