Apex Salesforce中的Json Webservice调用
任何人都可以分享一个通过Salesforce中的Apex(VisualForcePagesandController)进行JSONWebService调用的端到端示例。Apex Salesforce中的Json Webservice调用,json,salesforce,apex,Json,Salesforce,Apex,任何人都可以分享一个通过Salesforce中的Apex(VisualForcePagesandController)进行JSONWebService调用的端到端示例。 就像我们在HTML5中所做的一样,Jquery由Ajax实现 在调用REST web服务的文档中有一些例子 发件人: 您可以将该方法更改为以下方法之一: 获取、发布、放置、删除、跟踪、连接、标题和选项 有关更完整的示例,请访问 也有人支持这种做法 不要忘记使用打开对目标域的访问 对于SOAP web服务,您可以。对于RestFu
就像我们在HTML5中所做的一样,Jquery由Ajax实现 在调用REST web服务的文档中有一些例子 发件人: 您可以将该方法更改为以下方法之一: 获取、发布、放置、删除、跟踪、连接、标题和选项 有关更完整的示例,请访问 也有人支持这种做法 不要忘记使用打开对目标域的访问
对于SOAP web服务,您可以。对于RestFul web服务和SOAP web服务。
public class HttpCalloutSample {
// Pass in the endpoint to be used using the string url
public String getContent(String url) {
// Instantiate a new http object
Http h = new Http();
// Instantiate a new HTTP request, specify the method (GET) as well as the endpoint
HttpRequest req = new HttpRequest();
req.setEndpoint(url);
req.setMethod('GET');
// Send the request, and return a response
HttpResponse res = h.send(req);
return res.getBody();
}
}