You need to sign in to do that
Don't have an account?
sony sonu
All i need to get response from sap application through the rest callouts . When i tried to use the Chrome APP 'Advanced Rest Client' and postman have passed the appropriate URL and Content with GET AND POST method I was able to retrieve the values from local server database.
For EG : If i pass request 92126 then i was able to get response 'SAN DIEGO' which is correct.
Here is the link (https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo?hl=en-US)for Advanced REST Client.
1)i had created a remotesite setting
2) When i created this REST class in SAlesforce and tried invoking the End Point then its throwing this error.
System.HttpResponse[Status=Service Unavailable, StatusCode=503]
# as the web api url which is provided to us is in local sql server i.e hosted in private, as we know THAT salesforce for making callouts the urls must be EXPOSED in public... bt the url is in private only for the security reasons not hosted in public..we should achieve iT COMPULSARY THERE WILL A ANY SOLUTION FOR ALL THE QUESTIONS .. IS any way is there to acheive it ?? ..what changeS should be done in salesforce or LOCAL server to communicate to eachother ..and allows to make the callout ???
CANT MAKE A REST CALLOUT FORM SALESFORCE
All i need to get response from sap application through the rest callouts . When i tried to use the Chrome APP 'Advanced Rest Client' and postman have passed the appropriate URL and Content with GET AND POST method I was able to retrieve the values from local server database.
For EG : If i pass request 92126 then i was able to get response 'SAN DIEGO' which is correct.
Here is the link (https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo?hl=en-US)for Advanced REST Client.
1)i had created a remotesite setting
2) When i created this REST class in SAlesforce and tried invoking the End Point then its throwing this error.
System.HttpResponse[Status=Service Unavailable, StatusCode=503]
# as the web api url which is provided to us is in local sql server i.e hosted in private, as we know THAT salesforce for making callouts the urls must be EXPOSED in public... bt the url is in private only for the security reasons not hosted in public..we should achieve iT COMPULSARY THERE WILL A ANY SOLUTION FOR ALL THE QUESTIONS .. IS any way is there to acheive it ?? ..what changeS should be done in salesforce or LOCAL server to communicate to eachother ..and allows to make the callout ???
If the flow for this is 100% client side (ie in a Visualforce page that interacts with your web application) you could use Javascript to make the REST call on the client side and as long as the client has network access (is on the same network or VPN) then your calls would work.
All Answers
If the flow for this is 100% client side (ie in a Visualforce page that interacts with your web application) you could use Javascript to make the REST call on the client side and as long as the client has network access (is on the same network or VPN) then your calls would work.
NOTE: When adding code please use the "Add a code sample" button (icon <>) to increase readability and make it easier to reference.
iam getting this error :
Failed to load https://www.xxxxxxxxxxx...: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://.ap5.visual.force.com' is therefore not allowed access. The response had HTTP status code 404
[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS