> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apinizer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SOAP Type API Proxy Creation

> You can fix the SOAP Action value in SOAP or REST-SOAP-REST API Proxies. You can determine SOAP version (Content-Type and namespace based), configure SOAPAction and Content-Type settings, and perform SOAP 1.1 and SOAP 1.2 operations

<Info>
  **Loading from WSDL URL** When loading a WSDL file from URL, if the spec URL requires authentication, enable **Use Spec Authorization** to enter custom headers or **Basic Auth** (username/password). In the **SSL / Certificate Settings** panel, configure **Connection Timeout**, **Customize SSL/TLS Settings**, **Skip SSL Verification**, and **Server Certificate Verification** (System Default, TrustStore, or PEM). Authorization credentials are also automatically used when downloading sub-schema (XSD import) files within the WSDL. For details, see [API Proxy Creation](/en/develop/api-proxy-creation/api-proxy-creation).
</Info>

In API Proxies of type SOAP or REST-SOAP-REST, if the **"Fix SOAP Action value"** option is selected in the routing tab on the message coming to Apinizer, some changes can be made according to the following conditions.

In order for these changes to be made, the SOAP version of the incoming message is first determined.

To decide on the SOAP version, the **Content-Type** value sent in the Request Header and the **namespace** value of the SOAP XML in the Request Body are checked.

<Warning>
  If these two values differ, priority is given to the Content-Type header. If the Content-Type value is empty or meaningless, the SOAP version is determined from the namespace value of the SOAP XML.
</Warning>

## SOAP Version Determination

The methods for determining SOAP version are detailed below:

<AccordionGroup>
  <Accordion title="Determination by Content-Type">
    If the SOAP version value is determined by Content-Type, the following rules apply:

    * If it starts with `text/xml` value, it is SOAP 1.1
    * If it starts with `application/soap+xml` value, it is SOAP 1.2
    * If it starts with `application/xop+xml` value and the `type` value in the Content-Type value contains `text/xml`, it is SOAP 1.1
    * If it starts with `application/xop+xml` value and the `type` value in the Content-Type value contains `application/soap+xml`, it is SOAP 1.2

    **Examples:**

    ```http theme={null}
    Content-Type: text/xml; charset=UTF-8
    → SOAP 1.1
    ```

    ```http theme={null}
    Content-Type: application/soap+xml; charset=UTF-8
    → SOAP 1.2
    ```

    ```http theme={null}
    Content-Type: application/xop+xml; type="text/xml"
    → SOAP 1.1
    ```

    ```http theme={null}
    Content-Type: application/xop+xml; type="application/soap+xml"
    → SOAP 1.2
    ```
  </Accordion>

  <Accordion title="Determination by Namespace">
    If the SOAP version value is determined by the namespace value of the SOAP XML, the following rules apply:

    * If the namespace value is `http://schemas.xmlsoap.org/soap/envelope/`, it is SOAP 1.1
    * If the namespace value is `http://www.w3.org/2003/05/soap-envelope`, it is SOAP 1.2

    **Example SOAP 1.1 Message:**

    ```xml theme={null}
    <soap:Envelope 
      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        {/* Message content */}
      </soap:Body>
    </soap:Envelope>
    ```

    **Example SOAP 1.2 Message:**

    ```xml theme={null}
    <soap:Envelope 
      xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
      <soap:Body>
        {/* Message content */}
      </soap:Body>
    </soap:Envelope>
    ```
  </Accordion>
</AccordionGroup>

## Operations According to SOAP Version

When the SOAP version value is determined, the following operations are performed:

1. The namespace value of the SOAP XML is corrected according to the SOAP version.
2. According to the SOAP version, the following operations are performed:

<AccordionGroup>
  <Accordion title="SOAP 1.1 Operations">
    For requests with SOAP version 1.1:

    1. If the `soapaction` keyword exists in the request header, the spelling is corrected, otherwise a header is added in the form of `SOAPAction`.
    2. The value to be added to the `SOAPAction` keyword is the SOAPAction value belonging to the method from which the message came and obtained by parsing from the WSDL definition.
    3. If there are no quotation marks at the beginning and end of the SOAPAction value, quotation marks are added.
    4. The Content-Type value is set to `text/xml`.
    5. If there is a Character Encoding value, it is added to the Content-Type value, otherwise `;charset=UTF-8` value is added by default.

    **Example SOAP 1.1 Request:**

    ```http theme={null}
    POST /service HTTP/1.1
    Content-Type: text/xml; charset=UTF-8
    SOAPAction: "http://example.com/GetUser"

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        {/* Request content */}
      </soap:Body>
    </soap:Envelope>
    ```
  </Accordion>

  <Accordion title="SOAP 1.2 Operations">
    For requests with SOAP version 1.2:

    1. The Content-Type value is set to `application/soap+xml`.
    2. If there is a Character Encoding value, it is added to the Content-Type value, otherwise `;charset=UTF-8` value is added by default.
    3. The expression `;action=<SOAPAction>` is added to the Content-Type value.

    **Example SOAP 1.2 Request:**

    ```http theme={null}
    POST /service HTTP/1.1
    Content-Type: application/soap+xml; charset=UTF-8; action="http://example.com/GetUser"

    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
      <soap:Body>
        {/* Request content */}
      </soap:Body>
    </soap:Envelope>
    ```

    <Tip>
      In SOAP 1.2, the `action` parameter in Content-Type is used instead of the SOAPAction header. This is an important difference from SOAP 1.1.
    </Tip>
  </Accordion>
</AccordionGroup>
