Salesforce-MuleSoft-Developer-I Practice Test Questions

234 Questions


What HTTP method in a RESTful web service is typically used to completely replace an existing resource?


A. GET


B. PATCH


C. PUT


D. POST





C.
  PUT

Explanation: PUT replaces the original version of the resource, whereas the PATCH method supplies a set of instructions to modify the resource.

A Utility.dwl file is located in a Mule project at src/main/resources/modules. The Utility.dwl hie defines a function named pascalize that reformats strings to pascal case.

What is the correct DataWeave to call the pascalize function in a Transform Message component?


A. Option A


B. Option B


C. Option C


D. Option D





B.
  Option B

What DataWeave expression transforms the example XML input to the CSV output?




A. Option A


B. Option B


C. Option C


D. Option D





A.
  Option A

Explanation: Correct answer is as below. Attributes in the incoming xml payload are always accessed using @.Similarly *item is required as we have multiple items in the request %dw 2.0 output application/csv
--- payload.sale.*item map ((value, index) -> { index: index,
sale: value.@saleId, itemName: value.desc,
itemPrice: (value.quantity) * (value.price), item: value.@itemId
} )

Refer to the exhibit.



What is the correct syntax to add an employee ID as a URI parameter in an HTTP Listener path?


A. (employeelD)


B. ${emp!oyeelD}


C. {employeelD}


D. # [employeelD]





C.
  {employeelD}

Explanation:
Paths
The path of an HTTP listener can be static, which requires exact matches, or feature placeholders. Placeholders can be wildcards (*), which match against anything they are compared to, or parameters ({param}), which not only match against anything but also capture those values on a URI parameters map.
Take the following example paths for three listeners using a configuration that establishes api/v1 as the base path:
account/mulesoft/main-contact: only match the exact path request http://awesome- company.com/api/v1/account/mulesoft/main-contact
account/{accountId}/main-contact: matches all path requests structured similarly, such as http://awesome-company.com/api/v1/account/salesforce/main-contact, and save salesforce as the value of accountId.
account/{accountId}/*: matches all path requests different from main-contact, such as http://awesome-company.com/api/v1/account/mulesoft/users, and save mulesoft as the value of accountId.

Which keyword do you use to create a new function in DataWeave?


A. function


B. fun


C. func


D. map





B.
  fun

Explanation:
You can define your own DataWeave functions using the fun declaration in the header of a DataWeave script. Sample is as below. ---------------------------------------- %dw 2.0
output application/json
fun toUpper(aString) = upper(aString) --- toUpper("hello")

A Mule flow has three Set Variable transformers. What global data structure can be used to access the variables?


A. Mule event attributes


B. Mule event message


C. Mule application properties


D. Mule event





D.
  Mule event

Explanation: Mule event is correct answer. Mule event has two parts which are as follows
1) Message (which contains payload and attributes like headers and query/uri parameters
2) Variables

An API instance of type API endpoint with API proxy is created in API manager using an API specification from Anypoint Exchange. The API instance is also configured with an API proxy that is deployed and running in CloudHub.

An SLA- based policy is enabled in API manager for this API instance.

Where can an external API consumer obtain a valid client ID and client secret to successfully send requests to the API proxy?


A. In the organization's public API portal in Anypoint Exchange, from an approved client application for the API proxy


B. In Anypoint Studio, from components generated by APIkit for the API specification


C. In Anypoint Studio, from components generated by Rest Connect for API specification


D. In Runtime Manager, from the properties tab of the deployed approved API proxy





A.
  In the organization's public API portal in Anypoint Exchange, from an approved client application for the API proxy

Explanation:
* When a client application is registered in Anypoint Platform, a pair of credentials consisting of a client ID and client secret is generated.
* When the client application requests access to an API, a contract is created between the application and that API.
* An API that is protected with a Client ID Enforcement policy is accessible only to applications that have an approved contract.

------------------------------------------------------------------------------------
Correct Answer: In the organization's public API portal in Anypoint Exchange, from an approved client application for the API proxy

Refer to the exhibit. The main flow contains an HTTP Request in the middle of the flow. The HTTP Listeners and HTTP request use default configurations.

What values are accessible to the Logger at the end of the flow after a web client submit request to http://local:801/order?color=red?


A. payload


B. payload quantity var


C. payload color query param


D. payload quantity var color query param





B.
  payload quantity var

Explanation: In this case as outbound call is made using HTTP: POST /child , all attributes will be replaced by this invocation. Hence query parameter will not be accessible at logger.

What execution model is used by For Each and Batch Job scopes?


A. For Each is single-threaded and Batch Job is multi-threaded


B. Both are single-threaded


C. Both are multi-threaded


D. Batch Job is single-threaded and For Each Is multi-threaded





A.
  For Each is single-threaded and Batch Job is multi-threaded

What is the default port used by Mule application debugger configuration in Anypoint Studio?


A. 8082


B. 8080


C. 7777


D. 6666





D.
  6666

Refer to the exhibit. What is the output of logger component?


A. String


B. Object


C. Array


D. Map





C.
  Array

A company has an API to manage purchase orders, with each record identified by a unique purchase order ID. The API was built with RAML according to MuleSoft best practices.
What URI should a web client use to request order P05555?


A. /orders/{P05555}


B. /orders/order=P05555


C. /orders?order=P05555


D. /orders/P05555





D.
  /orders/P05555


Page 2 out of 20 Pages
Previous