Salesforce Certified B2C Commerce Developer Practice Questions

Salesforce Certified B2C Commerce Developer exam preparation

Salesforce Certified B2C Commerce Developer practice questions in English: 180 questions with explanations. The mock exam has 60 questions and 105 minutes.

Salesforce Certified B2C Commerce Developer free question 9 / 10 · Domain 4: Application Development

A script calls Service.call for a SOAP service, and the framework invokes the callbacks of the service. In which order are they called?

  1. initServiceClient, createRequest, execute, parseResponse
  2. initServiceClient, execute, createRequest, parseResponse
  3. createRequest, execute, parseResponse, initServiceClient
  4. createRequest, initServiceClient, execute, parseResponse
Show the answer and explanation

Answer: A

Why this is correct
The Web Services page lists the callback methods in the order in which the framework calls them when Service.call is used. First initServiceClient creates the underlying client, then createRequest configures the request, then execute performs it, and finally parseResponse converts the result into the object that Service.call returns. Some callbacks are optional, depending on the type of service.

Why the other options are wrong
"createRequest, initServiceClient, execute, parseResponse" … The client is created first with initServiceClient, and createRequest then configures the actual request.
"initServiceClient, execute, createRequest, parseResponse" … createRequest configures the request, and execute performs it, so createRequest comes before execute.
"createRequest, execute, parseResponse, initServiceClient" … initServiceClient creates the underlying client used to make the call, so it comes first and not last.

Key points
initServiceClient is required only for SOAP services, because other client types are created automatically.

Go to the Salesforce Certified B2C Commerce Developer practice app (10 free questions; purchase unlocks all questions)

See the full practice set