I'm writing a mobile application using phonegap that subscribes to a SIBus jms Topic.
First I was able to run a demo after configuration but I'm not able to run It from a different domain because the application must be runnig on an external domain from the server.
I had many problems with cross domain ajax call to webservices the solution was to change the header to header("Access-Control-Allow-Origin", "*");
I'm worndering how to fix this to change the header to the incoming requests
dojo.require("dojox.cometd");
dojo.addOnLoad(function(){
dojox.cometd.init("http://localhost:9080/ClientWeb/webmsgServlet");
dojox.cometd.subscribe("/T.Frs", window, "display");
}
);
function display(msg) {
console.log(msg);
alert("Message " + msg.data.test);
}