function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sfdeveloper9sfdeveloper9 

Return bulk records from custom apex web service

I need to develop a custom web service which might return high volume of data. what is max reponse size limit 3MB? If I have to return more than the limit what would be the easiest way. I am using SOAP.

 

Thanks in advance.

forecast_is_cloudyforecast_is_cloudy

The max. size of the response (or incoming request) is 3MB when developing a custom Apex SOAP service. There is unfortunately no way around that limit. You could however add custom pagination logic in your custom web service and in effect implement the query/queryMore pattern that the standard Force.com SOAP API does. This will require you to make multiple calls to the custom web service to get back all the data, but there really is no way around that.

Check out this cool blog entry that describes the custom pagination approach - http://nickhamm.com/how-to-use-an-apex-webservice-to-pull-more-th. Hope this helps.