I'm trying to get some xml information from a service that is not mine. Basically, the user will authenticate on the other service and my script should go get the information using it authentication cookie via cross-site.
I'm using jquery to do that, and I can see that the response I want to process is returned by the service (via firebug), the thing is that I'm using jsonp to do the call, so jquery returns a parsing error.
I've tried all the solutions that I encountered to do this kind of operation, like YQL and proxy server.
My frustration in here is that I'm seeing the response I want but jquery just don't give me the raw information.
I know that I'm calling a function that expects json response, but isn't any workaround or other way to this? like xmlp xD.
$.ajax(
{
url: "serviceurl",
dataType: 'jsonp', //I've tried 'jsonp xml'
crossDomain: true,
xhrFields: {
withCredentials: true
},
success: function()
{
alert('Load was performed.');
},
error: function(jqxhr,error)
{
alert('Failed!');
},
});
EDIT: Here is the output from the server
<User>
DVD_PT
</User>
<Apps>
<App>
<name>Last.fm Scrobbler</name>
</App>
</Apps>
Thanks