Hi,
I am calling a rest web service created in SAP PO, from a UI5 app created in NWDS.
The code is as follows:
$.ajax({ url: "http://<server>:<port>/RESTAdapter/checkvendorexistence?vendornumber=<value>?anycode=value",
type: "GET",
crossDomain: true,
//data: JSON.stringify(data),
contentType: "application/json; charset=utf-8",
dataType: "jsonp",
success: function (response) {
var resp = JSON.parse(response);
alert(resp.status);
},
error: function (xhr, status) {
alert("error"); } });
In chrome, I am getting status 200 OK, and in SAP PO monitoring, I am getting the request and response. But the alert i get is of error function. Where am I going wrong?
Any guidance would be useful.
Thanks