# Support for text/XML and SOAP Protocol

The API Client now supports the text/xml content type, allowing for seamless integration of XML-based data into API requests and responses. This enhancement enables users to effectively interact with APIs that require XML-formatted data or supply XML responses.

To use the text/xml content type in the Astera Client, you can now send and retrieve data in XML format. This content type allows you to exchange data using XML-based representations.

XML, being a widely adopted format for hierarchical data structuring, supplies a standardized approach for representing and exchanging information between various systems. With the text-xml content type in the API Client, users can make SOAP API requests in integration flows.

### Use Case

To start, let’s make an API request using text/xml content type in the API Client, which allows you to send and retrieve data in XML format.

1. To start, drag-and-drop the *API Connection* and *API Client* objects onto the Dataflow.

<figure><img src="/files/n8gfGJAMRwD9wUhGTZrE" alt=""><figcaption></figcaption></figure>

2. Configure the *API Connection* with the *Base URL* and *Authentication*.

We are calling a SAP Success Factor API as an example.

<figure><img src="/files/zTMrcd1Su4Mz7rrbBsxw" alt=""><figcaption></figcaption></figure>

3. Next, open the properties of the *API Client* object and select the configured shared connection from the drop-down.

<figure><img src="/files/M8pstygfFBeHewHcRKsL" alt=""><figcaption></figcaption></figure>

4. Choose the *POST* method and define the resource to be appended after the base URL.

<figure><img src="/files/PPVetXh0v7uc1i4cXHcm" alt=""><figcaption></figcaption></figure>

5. To define an xml input and output, select the input and output content types as text/xml.

<figure><img src="/files/4MyKCZwqb39FKZjyYSoR" alt=""><figcaption></figcaption></figure>

6. Proceed to the next screen to define any parameters.

{% hint style="info" %}
**Note:** Since SOAP (Simple Object Access Protocol) request usually does not have any parameters, we would skip this screen.
{% endhint %}

7. Click *Next* to navigate to the *Input Layout* screen.

On the *Input Layout* screen click on *Generate Layout by Providing Sample Text* and supply the raw xml content to be sent in the request.

Click *Generate* to automatically create the layout for the request, allowing you to supply any default values or supply mappings from the preceding flow.

<figure><img src="/files/e8XzZPHRZ0fpzFYGgOXa" alt=""><figcaption></figcaption></figure>

8. Click *Next* and you will be led to the *Output Layout* screen.

Here, there are two options to create a layout, by supplying sample text or running a request to generate the layout.

<figure><img src="/files/zuxJiWpOFMHhQ7YRv7Jj" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/DIigkt42tdojPSmUs2Hb" alt=""><figcaption></figcaption></figure>

9. Right-click on the *API Client* object and select *Preview Output*.

In the *Data Preview* window, we can see the following result:

<figure><img src="/files/m6YTvOAXkyvD0BISTErx" alt=""><figcaption></figcaption></figure>

This concludes seamlessly integrating XML SOAP API requests and responses, enabling smooth data exchange and integration with APIs.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.astera.com/astera-data-stack-v10/api-flow/api-consumption/consume/support-for-text-xml-and-soap-protocol.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
