Salesforce-MuleSoft-Developer-I Exam Questions

Total 234 Questions

Last Updated Exam : 22-Oct-2024

Refer to the exhibits. Client sends the request to ClientRequestFlow which calls ShippingFlow using HTTP Request activity.
During E2E testing it is found that that HTTP:METHOD_NOT_ALLOWED error is thrown whenever client sends request to this flow.
What attribute you would change in ClientRequestFlow to make this implementation work successfully?


A. Change the method attribute value to "*’’


B. Change the path attribute value to "/api/ship"


C. Change the allowed method attributes value to "POST"


D. Change the protocol attribute value to "HTTPS"





C.
  Change the allowed method attributes value to "POST"

Explanation: Correct answer is Change the method attributes value to "POST". It can be fixed in either of the two ways as below.
1) Changing method attribute to POST in ClientRequestFlow
2) Setting allowedMethods as PUT in ShippingFlow (but doesn't fit as question mentions about changing ClientRequestFlow)

What module and operation will throw an error if a Mule events payload is not number ?


A. Filter modules Is Number operation


B. Validation modules Is Number operation


C. Validation modules Is not Number operation


D. None of these





B.
  Validation modules Is Number operation

Explanation:
Correct answer is Validation modules Is Number operation.
Mule 4 does not use filters anymore. The functionality provided by filters in Mule 3 can be achieved by using the Validation Module.

A shopping API contains a method to look up store details by department.
To get the information for a particular store, web clients will submit requests with a query parameter named department and uri parameter named storeId
What is valid RAML snippet that supports requests from a web client to get a data for a specific storeId and department name?


A. 1. /department:
2. get:
3. uriParameter:
4. storeId:


B. 1. get:
2. uriParameter:
3. {storeId}:
4. queryParameter:
5. department:


C. 1.get:
2. queryParameter:
3. department:
4. uriParameter:
5. {storeId}:


D. 1./{storeId}:
2. get:
3. queryParameter:
4. department:





D.
  1./{storeId}:
2. get:
3. queryParameter:
4. department:


Explanation: Lets revise few concepts RAML which can help us to find the answer of this question.
URI Parameters
Lets have a look at below example.
/foos:
/{id}:
/name/{name}:
Here, the braces { } around property names define URI parameters. They represent placeholders in each URI and do not reference root-level RAML file properties as we saw above in the baseUri declaration. The added lines represent the
resources /foos/{id} and /foos/name/{name}. Query Parameters
Now we'll define a way to query the foos collection using query parameters. Note that query parameters are defined using the same syntax that we used above for data types:
/foos:
get:
description: List all Foos matching query criteria, if provided; otherwise list all Foos
queryParameters:
name?: string ownerName?: string
Based on the above information , below is the only option which defines storeid as uri parameter and department as query parameter.
/{storeId}: get:
queryParameter: department:

What is the output type of the DataWeave map operator?


A. String


B. Array


C. Map


D. Object





B.
  Array

Where would you create SLA Tiers for an API?


A. Exchange


B. API Manager


C. Anypoint Studio


D. In RAML specifications





B.
  API Manager

Explanation:
Steps to create SLA Tier are as follows:
1) In API Manager, in API Administration, click a version.
2) Check that the API supports resource-level policies: On the API version details page, in Status, click Configure Endpoint, and check that Type is RAML.
3) Choose the SLA Tiers, and click Add SLA Tier. Set up limit on SLA tier

Refer to the exhibits.



A web client submits the request to the HTTP Listener. What response message would be returned to web client?


A. End


B. String is not blank


C. No response would be sent back to client and request will get errored out in Mule


D. Start





B.
  String is not blank

Explanation:
Correct answer is String is not blank.
---------------------------------------------------------------------------
Here’s specifically what is happening here:
1) Payload is successfully set to “Start”
2) The Is Blank String validator creates an Error Object because the payload is string "Start".
Execution stops
#[error.description] = “String is not blank”
3) Because no error handler is defined, the Mule default error handler handles the error.
Remember, at its heart, the Mule Default Error handler is an error handling scope with just an on error propagate
4) “String is not blank” is the error message returned to the requestor in the body of the HTTP requestHTTP Status Code: 500

What is not the function of API Gateway ?


A. Determine which traffic is authorized to pass through the API to backend services


B. Meter the traffic flowing through


C. Logs all transactions , collecting and tracking analytics data


D. Specify throttling , security and other policies





B.
  Meter the traffic flowing through

Explanation:
Correct answer is Specify throttling , security and other policies
API Gateway is responsible for below functions.
1) Determine which traffic is authorized
2) Meter the traffic
3) Logs transaction
4) Apply throttling and other policies (Not specifying. These are specified in API Manager)

Why would a Mule application use the ${http.port} property placeholder for its HTTP Listener port when it is deployed to CloudHub?


A. Allows CloudHub to automatically change the HTTP port to allow external clients to connect to the HTTP Listener


B. Allows CloudHub to automatically register the application with API Manager


C. Allows MuleSoft Support to troubleshoot the application by connecting directly to the HTTP Listener


D. Allows clients to VPN directly to the application at the Mule application's configured HTTP port





A.
  Allows CloudHub to automatically change the HTTP port to allow external clients to connect to the HTTP Listener

A flow contains an HTTP Listener as the event source. What is the DataWeave expression to log the Content-Type header using a Logger component?


A. #["Content-Type: " ++ attributes.headers.'content-type']


B. #["Content-Type: " + headers.'content-type']


C. #["Content-Type: " + attributes.headers.'content-type']


D. #["Content-Type: " ++ headers.'content-type']





A.
  #["Content-Type: " ++ attributes.headers.'content-type']

Explanation: Option 1 is the only correct choice due to two reasons. 1) Concatenation is always with ++ sign and not with + sign which makes option 2 and 3 wrong 2) hearders can be accessed with attributes. headers and not with only headers which makes option 4 incorrect

A company has defined two RAML fragments, Book Data Type and Book Example to be used in APIs.
What would be valid RAML to use these fragments ?


A. 1. #%RAML 1.0
2. title: Books
3. types:
4. Book: ABC/Examples/bookDataType.raml
5. /books:
6. post:
7. body:
8. application/json:
9. type: Book
10. examples:
11. input: ABC/Examples/bookExample.raml
12. responses:
13. 201:
14. body:
15. application/json:
16. example:
17. message: Book added


B. 1. #%RAML 1.0
2. title: Books
3. Book: !include bookDataType.raml 4./books:
5. post:
6. body:
7. application/json:
8. type: Book
9. examples:
10. input: !include bookExample.raml
11. responses:
12. 201:
13. body:
14. application/json:
15. example:
16. message: Book added


C. 1.#%RAML 1.0
2.title: Books
3.Book: bookDataType.raml 4./books:
5. post:
6. body:
7. application/json:
8. type: Book
9. examples:
10. input: bookExample.raml
11. responses:
12. 201:
13. body:
14. application/json:
15. example:
16. message: Book added


D. 1.#%RAML 1.0
2.title: Books
3.Book: bookDataType.raml 4./books:
5. post:
6. body:
7. application/json:
8. type: Book
9. examples:
10. input: bookExample.raml
11. responses:
12. 201:
13. body:
14. application/json:
15. example:
16. message: Book added





D.
  1.#%RAML 1.0
2.title: Books
3.Book: bookDataType.raml 4./books:
5. post:
6. body:
7. application/json:
8. type: Book
9. examples:
10. input: bookExample.raml
11. responses:
12. 201:
13. body:
14. application/json:
15. example:
16. message: Book added

Explanation:
* RAML file contains lot of information that could be considered as "not API-describing". Sort of "economy-class" members.
Equally important, but not necessarily part of the main RAML file.
* Through !includes, RAML allows us to build file-distributed API definitions, which is not only useful to encourage code reuse but also improves readability.
* We can create RAML fragments with such code and then include them in main RAML project using !include like:
types:
Book: !include bookDataType.raml and examples:
input: !include bookExample.raml
* Additionally for

Correct Answer: D


Page 11 out of 24 Pages
Previous