Domanda

Sto lavorando su un'app per SharePoint 2013 che è SharePoint-Hosted e non riesco a ottenere dati da un servizio Web remoto utilizzando una chiamata jQuery.ajax.Gli unici due modi per ottenere dati remoti documentati da Microsoft sono: Utilizzo di Chiamata Proxy Web o Pagina proxy personalizzata .

Questi metodi sono solo quelli che puoi usare o c'è qualcos'altro disponibile?Sto cercando qualcosa che sia simile con la chiamata jquery.ajax.

È stato utile?

Soluzione

Here is a method to accomplish this: from the JavaScript page code use the jQuery.ajax function with the argument "dataType" set to "jsonp" and call the web service that supports jsonp requests and that returns a json result back.

You can find more details about a .NET specific implementation of a web service and the call code here: Rick Strahl - Creating a JSONP Formatter for ASP.NET Web API. You can get data from any web service that supports jsonp calls: it can be a node.js or a rails service.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top