# 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="https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/tfZXjAePiVT0PjvWz2NZ/01-API-Objects.PNG" 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="https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/d3fPRSiPl3ibx5LiRBux/02-SAP-Success.PNG" 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="https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/OM33jNGxLZ3wT7CbzzQF/03-API-Client.PNG" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/D1UT2cIMvYWuNsPvBviM/04-Http.PNG" 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="https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/L5DeRjEIipCPStFA60pv/05-Input-Output.PNG" 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="https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/KfV7az87B0oqzwZNACI7/06-Layout.PNG" 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="https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/UbWCfqzLBGt4STqX3QjS/07-Output.PNG" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/wz3jTkTK6hT1ygww1NVR/08-Generate-Flow.PNG" 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="https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/4KhiYMOMHjNHYRFfpJhr/09-Output-Preview.PNG" alt=""><figcaption></figcaption></figure>

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