# 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FdZeoSuCyUAhxtUUXom8P%2F01-API-Objects.PNG?alt=media&#x26;token=d42f3516-a89e-40bc-aa4b-e391aae44fea" 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F7l1w1T0AuyIJ4t5ThjIA%2F02-SAP-Success.PNG?alt=media&#x26;token=391d46e0-ab81-454f-b7b4-af31a83447d9" 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FxQp2d3k6hKQGnBIsP78M%2F03-API-Client.PNG?alt=media&#x26;token=d3f01dda-c733-438f-a117-c8d7a7c5024d" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FZUMJZ46PbWBRntIJqMqd%2F04-Http.PNG?alt=media&#x26;token=fa6b5be8-8ccf-408c-afb2-c098cfc53f98" 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FTPRMPc187UbFeVg5ZLcG%2F05-Input-Output.PNG?alt=media&#x26;token=e4cb60ce-1fd6-405d-901b-1fd4ab570ac8" 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FxUUdRVkLp7zZFD4TLyKK%2F06-Layout.PNG?alt=media&#x26;token=b1706c23-38f4-417b-9912-d11e314774e2" 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2Fc5nD46wQFjAixavhWLC7%2F07-Output.PNG?alt=media&#x26;token=81012589-830a-400e-be8a-aebaf670bd58" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FxO3XG6RYyySq0kUbOpYx%2F08-Generate-Flow.PNG?alt=media&#x26;token=61b16354-672d-4c0b-ab0b-18e3f70bc6e4" 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FjaR1CYzZW34hMleklQbh%2F09-Output-Preview.PNG?alt=media&#x26;token=b843adaa-64dc-41e1-9581-3830d8e9594f" alt=""><figcaption></figcaption></figure>

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