I have an issue calling web service which is in cross-domain. I've read some articles here about it, but I didn't really find a solution. I've just understood that I need the json
format of the data, because I was always getting Error: Access denied.
while trying to get xml
data from service, but now I have a different problem. Here is my .ajax()
call:
$.ajax({
type: "GET",
contentType: "application/jsonp; charset=utf-8",
url: "http://tomas/_vti_bin/EmmaService.asmx/GetResult",
dataType: "jsonp",
data: {
value : "testValue",
converstionId : "testId"
},
success: function(resp) {
alert("success: " + resp);
},
error: function (xhr, ajaxOptions, thrownError) {
alert("error status: " + xhr.status);
alert("error status text: " + xhr.statusText);
alert("error response text: " + xhr.responseText);
},
});
From this I get error with 3 following alerts:
error status: 200
error status text: success
error response text: undefined
What I don't understand is error status text: success
.
Code in my web service:
[WebMethod(EnableSession = false, Description = "Gets result")]
public EmmaServiceResult GetResult(string value, string converstionId)
{
...
return result;
}
Any suggestions on how to get this working? Thanks! :)