+ Start a Discussion
Joe GaskaJoe Gaska 

WebService Callout From WebService Call


We have built a webservice which gets referenced from other SalesForce.com instances within an app to be released on the app exchange.  Within that webservice we will need to callout to another webservice outside SalesForce.com and continuously get the exception "System.CalloutException: Callout loop not allowed" and have tried every work around possible.  We have tried making the call asynchronous with the Callout=True attribute set and still get the exception.  Please tell me that SalesForce.com did not disallow WebService->WebService callouts?




If the thing making a call to the sfdc hosted web service is callout, then that webservice can't make another callout.

Joe GaskaJoe Gaska


The webservice is calling an asynchronous void method which internally generates an http get and is getting denied.  If the code is called from any other mechanism it works properly.  Why would they possibly disallow callouts from a webservice origination?

Renato CohenRenato Cohen



I am passing through the same problem.
How to solve this?
Can anyone help me, please?




Renato Cohen

Joe GaskaJoe Gaska


Build the integration layer on Heroku call webservice/JSON on the Heroku layer and you can do anything you like.  Our team has moved to combining the power of Heroku and Salesforce.com to avoid issues just like this one.  We have a single callout from Salesforce.com to Heroku and calls 5+ external services in parrallel and returns result to Salesforce.com.





Joe Gaska   


Ionia Corporation