easy xdm / ajax call no response back #175

Open
innovativexdm opened this Issue Apr 14, 2012 · 3 comments

3 participants

@innovativexdm

Hi, i am actually new to easyXDM integration. I am trying to do a cross domain communication and when i fire the request from my Ajax, i can see the application deployed on the remote server is properly executed ( i can see on the server logs ), but in retutrn i am not seeing any response. its not even entering into the call back function. any clues will be highly appreciated.

here are the debug logs:

domain.org:333 - 08:37:13.849: easyXDM present on 'http://domain.org:333/context/easyXDM/cors/sample.html?xdm_e=http%3A%2F%2Flocalhost%3A8080&xdm_c=default6634&xdm_p=1
easyXDM.debug.js (line 895)

domain.org:333 - 08:37:13.858: native JSON found
easyXDM.debug.js (line 895)

domain.org:333 - 08:37:13.985: easyXDM.Rpc: constructor
easyXDM.debug.js (line 895)

domain.org:333 - 08:37:13.987: {Private}: preparing transport stack
easyXDM.debug.js (line 895)

domain.org:333 - 08:37:13.989: {Private}: using parameters from query
easyXDM.debug.js (line 895)

domain.org:333 - 08:37:13.990: easyXDM.stack.PostMessageTransport: constructor
easyXDM.debug.js (line 895)

domain.org:333 - 08:37:13.992: easyXDM.stack.QueueBehavior: constructor
easyXDM.debug.js (line 895)

domain.org:333 - 08:37:13.994: easyXDM.stack.RpcBehavior: init
easyXDM.debug.js (line 895)

domain.org:333 - 08:37:14.015: {Private}: firing dom_onReady
easyXDM.debug.js (line 895)

domain.org:333 - 08:37:14.018:... deferred messages ...
easyXDM.debug.js (line 940)

domain.org:333 - 08:37:14.020:easyXDM.Rpc: constructor
easyXDM.debug.js (line 940)

domain.org:333 - 08:37:14.021:{Private}: preparing transport stack
easyXDM.debug.js (line 940)

domain.org:333 - 08:37:14.022:{Private}: using parameters from query
easyXDM.debug.js (line 940)

domain.org:333 - 08:37:14.023:easyXDM.stack.PostMessageTransport: constructor
easyXDM.debug.js (line 940)

domain.org:333 - 08:37:14.024:easyXDM.stack.QueueBehavior: constructor
easyXDM.debug.js (line 940)

domain.org:333 - 08:37:14.026:easyXDM.stack.RpcBehavior: init
easyXDM.debug.js (line 940)

domain.org:333 - 08:37:14.027:{Private}: firing dom_onReady
easyXDM.debug.js (line 940)

domain.org:333 - 08:37:14.028:... end of deferred messages ...
easyXDM.debug.js (line 940)

domain.org:333 - 08:37:14.029:easyXDM.stack.PostMessageTransport: init
easyXDM.debug.js (line 940)

domain.org:333 - 08:37:14.031:{Private}: adding listener message
easyXDM.debug.js (line 940)

domain.org:333 - 08:37:14.033:{Private}: firing dom_onReady
easyXDM.debug.js (line 940)

domain.org:333 - 08:37:14.037:easyXDM.stack.QueueBehavior: removing myself from the stack
easyXDM.debug.js (line 940)

domain.org:333 - 08:37:14.040:easyXDM.stack.PostMessageTransport: received message 'default6634 {"method":"request","params":[{"url":"/context/sample/samplerows/","method":"GET"}],"id":1,"jsonrpc":"2.0"}' from http://localhost:8080
easyXDM.debug.js (line 940)

domain.org:333 - 08:37:14.041:easyXDM.stack.RpcBehavior: received request to execute method request using callback id 1
easyXDM.debug.js (line 940)

domain.org:333 - 08:37:14.043:easyXDM.stack.RpcBehavior: requested to execute procedure request
easyXDM.debug.js (line 940)

GET http://domain.org:333/context/sample/samplerows?

so at the end i am seeing the remote url is appended with "?". and then the call back function (success function) not being called.

below is the code:

var rserver = "http:///context/easyXDM/cors/sample.html";
var xhr = new easyXDM.Rpc({
remote: rserver,
},
{
remote: {
request: {}
}
});

ajax call:

          xhr.request({
            url: "/context/samplerows",
            method: "GET"
        }, function(response){
            console.log("response"+dojo.toJson(response.data));
    });
@innovativexdm

i had a typo in the code i pasted earlier:
correcting the code here:

below is the code:

var rserver = "http://domain.org:333/context/easyXDM/cors/sample.html";
var xhr = new easyXDM.Rpc({
remote: rserver,
},
{
remote: {
request: {}
}
});

@emirotin

I confirm this - doing xhr.request with method POST and the server receives the request
i also see 200 OK response (though the response body is empty)
the success callback nor the error callback are called

upd: stopped reproducing after a while

@srinivas1985

I see the same issue in IE 7 with Antivirus enabled. GET request reaches the server and server sends back the response. But the response doesnt come to success callback nor the error callback.

Then I tried running the easyXDM RPC example in the machine which has the issue. When i ran the example in IE7, the remote call failed there too..

When i disable the antivirus it seems to work fine.

Any suggestions on how to resolve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment