# SOAP

SOAP in ZBrain Flow is a protocol for exchanging structured information to implement web services. It enables you to define and call SOAP methods from a given WSDL (Web Services Description Language) specification, allowing you to interact with a wide range of SOAP-based APIs and services.

#### **How to Integrate SOAP with ZBrain Flow?**

1. **Click the “+” Button in the Flow**\
   Open your ZBrain Flow and select the plus sign (**+**) to add a new step.
2. **Search for “SOAP”**\
   Type **“SOAP”** in the search bar to view the available task.
3. **Choose the Desired Task**\
   Tasks You Can Perform on SOAP - **Call SOAP Method**

&#x20;

#### **Call SOAP Method**

Interact with SOAP-based web services by specifying the WSDL endpoint, the desired operation, and any required parameters or headers. This allows you to send and receive structured data, enabling integration with legacy systems or specialized SOAP APIs.

#### **How to Configure the “Call SOAP Method” Action in ZBrain Flow?**

**Step 1: Add the “Call SOAP Method” Step**

1. **Insert a New Step**
   * In your flow, click the **+** button to add a new step.
2. **Search for “SOAP”**
   * Type **“SOAP”** in the search bar and select **Call SOAP Method** from the available actions.

**Step 2: Create or Select a SOAP Connection**

1. **Select/Create Connection**

* Go to **Connection** and select or create a new connection.

Below is an overview of the fields you’ll see when creating a **SOAP Connection** in ZBrain Flow, along with a brief explanation of how to fill them out:

1. **Connection Name**
   * Give your connection a descriptive name (e.g., “My SOAP Service”).
   * This label helps you identify and manage multiple SOAP connections within ZBrain Flow.
2. **Authentication Type**
   * Select how you want to authenticate with the SOAP service.
   * Common options include **Basic Authentication** (username/password) or **WS-Security**.
   * Refer to your SOAP service’s documentation to determine the required method.
3. **Username**
   * If using Basic Authentication or WS-Security with a username token, enter the **username** provided by your SOAP service.
   * If no authentication is needed or you’re using another method, you can leave this blank (unless otherwise specified).
4. **Password**
   * Enter the **password** corresponding to the username above, if required.
   * Make sure you store and handle your credentials securely.
5. **Custom Header Content** (Optional)
   * If your SOAP service requires custom headers (e.g., additional tokens, license keys, or specialized security elements), provide them here.
   * Typically, this content should be formatted according to the SOAP service’s documentation (e.g., XML or other structured data).
6. **Save the Connection**
   * Click **Save** to finalize your SOAP connection. You can then use it in the “Call SOAP Method” action.

**Step 3: Configure the “Call SOAP Method” Action**

1. **WSDL URL**
   * Paste the **URL** to your SOAP service’s WSDL (Web Services Description Language).
   * This tells ZBrain Flow how to structure requests and what methods are available.
2. **Method**
   * Specify the **SOAP operation** you want to call (e.g., `GetUser`, `ProcessOrder`).
   * Make sure the method name matches what’s defined in your WSDL.
3. **Parsed** (Toggle)
   * If enabled, ZBrain Flow will attempt to parse the SOAP response into structured data (e.g., JSON).
   * If disabled, the raw XML response is returned.

**Step 4: Save and Test**

1. **Save Your Configuration**
   * Once you’ve entered the WSDL URL and chosen a method, click **Save** or **Done**.
2. **Run the Flow**
   * Trigger your flow to confirm that the “Call SOAP Method” action successfully invokes your SOAP service.
3. **Inspect the Output**
   * Check the action’s response to ensure you receive the expected data (parsed JSON or raw XML).
   * If something goes wrong, verify your WSDL URL, method name, and authentication settings.


---

# 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://docs.zbrain.ai/zbrain-documentation/zbrain-builder/flows/flow-components/soap.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.
