jQuery cannot access java webservice

I'm trying to write a simple 'proof of concept' front end for our webservice. The webservice is a java webapp returning simple xml running in tomcat. The front end consists of simple html pages with some jquery functions. I'm developing the pages on my local machine while the webservice runs on one of our servers.

Basically this is what I do:

var url = "http://ourserver.com:51088/service/action/?param=123";
$.get(url,function(data,status) {
    alert("Data: " + data + "\nStatus: " + status);
});

When I put the url in the Firefox address bar, I get the resulting xml.

When I run the jquery code Firebug shows the resulting xml, but the alert never shows.

Thinking it might be a cross-browser scripting problem, I wrote a little node.js proxy server that passes any localhost:51088/path to ourserver.com:51088/path. So I changed the url var to

var url = "http://localhost:51088/service/action/?param=123";

Again, testing this url in the browser results in the xml. So the node.js proxy server is working fine.

When I run the jquery code in Firebug I now consistently get Reload the page to get source for: http://localhost:51088/.....

I'm at a loss now.

UPDATE: after reading more I changed the jquery code to:

$.ajax( {
   type: "GET",
   contentType: "application/xml",
   url: url,
   datatype: "text xml",
   xhrFields: {
     withCredentials: true
   },
   succes: function(xml) { alert(xml) },
   error: function(obj, status, err) { alert ("error\nstatus: " + status + "\nerr: " + err)}
});

Now it doesn't matter if I use the remote url or the local url. Both return the xml in the console log, but the success function is still not called.

You misspelled the "success" option.

Seems to me your proxy is not working as you expect.

And as to your first problem, seems to me that it is cross-domain request issue.