0

I'm using Sharepoint 365. I would like to call a WCF Service located in a server in my intranet to read data using a script editor webpart and jquery ajax. Anyone has any example of how to accomplish this? I have read that using jsonp and cross-domains but hadn't found any good example. Thanks in advance. Regards.

1 Answer 1

0

I used these block code to call an application installed in the client and configured to listen a port on the localhost, from a page with a form published in Sharepoint Online. In this case I had to asign "http://localhost:xxxx" to call_UrlEndpoint, but try to put your intranet url instead.

function openLocalApp(call_UrlEndpoint, dataJson){
$.ajax({
    url: call_UrlEndpoint,
    type: 'POST',
    async: true,
    data: JSON.stringify(dataJson),
    jsonp:"callback",
    jsonpCallback: "save",
    contentType: 'application/json',
    processData: false,
    crossDomain: true,
    dataType: 'jsonp',
    succes: function (response) {
        alert("Success");
    },
    error: function (response) {
        alert("Scanning component failed!");
    }
});

}

2
  • Hi Ernesto. I added more detail on the following url: link I just want to be able to call an on premises WCF web service from sharepoint online. If you have any example will be really appreciated. Regards! Commented Jun 27, 2019 at 17:29
  • Maybe this can be useful... social.technet.microsoft.com/wiki/contents/articles/… Commented Jun 29, 2019 at 4:53

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.