Your company has a SOAP service that receives requests in XML.
The service is going to be placed behind the API gateway service.
Which of the following must be done to ensure that the SOAP service can consume requests made to the API gateway service?
Click on the arrows to vote for the correct answer
A. B. C. D.Answer - A.
The AWS Documentation mentions the following.
In API Gateway, an API's method request can take a payload in a different format from the corresponding integration request payload, as required in the backend.
Similarly, the backend may return an integration response payload different from the method response payload, as expected by the frontend.
API Gateway lets you use mapping templates to map the payload from a method request to the corresponding integration request and from an integration response to the corresponding method response.
A mapping template is a script expressed in Velocity Template Language (VTL) and applied to the payload using JSONPath expressions.
The payload can have a data model according to the JSON schema draft 4
You must define the model to have API Gateway to generate an SDK or to enable basic request validation for your API.
You do not have to define any model to create a mapping template.
However, a model can help you create a template because API Gateway will generate a template blueprint based on a provided model.
Option B is incorrect since this is used to customize gateway responses.
Option C is incorrect since this is used specifically for binary workloads.
Option D is incorrect since this is used for use within a VPC.For more information on models and mappings, please refer to the below URL-
https://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.htmlThe correct answer is A. Create a mapping template.
Explanation:
The API Gateway service is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale. It supports many different types of web service protocols, including RESTful services and SOAP-based services.
SOAP is an XML-based protocol that is often used for creating web services. If you want to place a SOAP service behind an API Gateway service, you need to create a mapping template. A mapping template is used to transform the incoming request from the API Gateway service into the format that the SOAP service can understand.
To create a mapping template, you need to specify the input and output format. The input format is the format of the incoming request, which is typically in JSON or XML format. The output format is the format that the SOAP service expects, which is typically in XML format.
Once you have created the mapping template, you can configure the API Gateway service to use it to transform incoming requests before forwarding them to the SOAP service.
Option B, Setup a gateway response, is not relevant in this scenario. Gateway responses are used to customize the response that the API Gateway service sends back to the client. They are not used to transform the request that the API Gateway service sends to the backend service.
Option C, Enable support for binary workloads, is also not relevant in this scenario. Enabling support for binary workloads is useful when you need to send binary data, such as images or videos, in your API requests. It is not necessary for handling XML-based requests.
Option D, Setup Private integrations, is not relevant either. Private integrations are used to integrate APIs that are hosted in a VPC. They are not used to integrate SOAP services.