简体   繁体   English

Java Rest Web服务以从Salesforce访问静态资源

[英]java rest webservice to access static resources from salesforce

Is there any way to access static resources from salesforce using java rest webservices? 有什么方法可以使用Java Rest Web服务从Salesforce访问静态资源?

I have the static resource URL with me. 我有静态资源URL。 I am not sure how to connect through java rest webservice. 我不确定如何通过Java Rest Web服务进行连接。

String queryURL = "<myURL>";
HttpGet getMethod = new HttpGet(queryURL);
CloseableHttpClient cl = null;
CloseableHttpResponse response = null;
cl = getDefaultHttpClient();
response = cl.execute(getMethod);

I am receiving HttpResponseProxy as 302. Can someone help me on this? 我收到的HttpResponseProxy为302。有人可以帮我吗?

Get the enterpise wsdl.. Get the session object Expose the your functionality as wsdl. 获取企业wsdl。获取会话对象将您的功能公开为wsdl。

Pass the session through in the required soap call. 通过所需的肥皂呼叫传递会话。

Another method Expose your Salesforce functionality as rest call. 另一种方法将Salesforce功能公开为rest调用。 call it using httpclient from your rest app. 在其余应用中使用httpclient调用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM