I have hosted a web-service in let
http://example1.com/webservice.asmx
and want to call from
http://example2.com
i have Code of jQuery like in example2.com
GetData: function () {
$.ajax({
crossDomain: true,
type: "POST",
url: "http://example1.com/webservice.asmx/GetData",
dataType: "jsonp",
contentType: "application/json; charset=utf-8",
data: { Date: '' },
success: function (data, textStatus, jqXHR) {
debugger;
},
error: function (data, textStatus, jqXHR) {
alert("data");
}
});
}
it hit url like
http://example1.com/webservice.asmx/GetData?callback=jQuery19106349606812515739_1396429620115&Date=&_=1396429620116
and it hit that url by using GET Method (From firebug). actually where is problem i am unable to find it. it response data in XML format. and also responsed data in XML Format but not get in success event . but it work fine if i put same code on same domain.