I'm not familiar with Web Services. My company wants to integrate SharePoint 2013 to SAP. My company (right now) only allow us to develop SharePoint app using client side programming (JavaScript).
We already have some PHP application connect to SAP through RFC, so my idea is creating PHP web service and consume it from JavaScript (SharePoint).
My Question :
- Can we do that?
- Is there another ways to integrate SP to SAP with Client Side Programming?
I tried simple JavaScript calling php function (not a webservice) using Ajax below, but having error (alert:error2).
$.ajax({
type : "POST",
url : "http://10.15.5.150/testapp/test_ws",
data : "id=1",
cache : false,
success : function(data){
var data = eval('('+data+')');
if(data.success){
alert(data.msg);
}else{
alert('error');
}
},
error: function(data){
alert('error2');
}
});
Thanks.