Find your content:

Search form

You are here

What are the main differences between Http Callout and Webservice Callout in Salesforce?

 
Share

I am quite a bit confused to understand the difference between http callout and webservice callout. though it is a simple question i just want to know most important differences. Can anyone please guide me through?


Attribution to: Bforce

Possible Suggestion/Solution #1

From my understanding you are asking the difference between them. 'HTTP Callout' is the same thing as a 'Webservice Callout'. Now the only difference between the two is the context you use them in. IE: if you are making a 'Webservice', you are creating the endpoint and code behind the scene which ends up doing what ever processing it needs to and returns a respond to the originating point


Attribution to: Double A

Possible Suggestion/Solution #2

From SF doc:

  • WebServiceMock: Enables sending fake responses when testing Web service callouts of a class auto-generated from a WSDL.
  • HttpCalloutMock: Enables sending fake responses when testing HTTP callouts.

So WebServiceMock is mainly used for SOAP web service while the HttpCalloutMock is mainly used for HTTP (REST) web service.


Attribution to: sherry peng
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/31899

My Block Status

My Block Content