Import SOAP API to API Management

APPLIES TO: All API Management tiers

This article shows how to import a WSDL specification, which is a standard XML representation of a SOAP API. The article also shows how to test the API in API Management.

In this article, you learn how to:

  • Import a SOAP API
  • Test the API in the Azure portal

Note

WSDL import to API Management is subject to certain limitations. WSDL files with wsdl:import, xsd:import, and xsd:include directives aren't supported. For an open-source tool to resolve and merge these dependencies in a WSDL file, see this GitHub repo.

Prerequisites

Import a backend API

  1. In the Azure portal, navigate to your API Management instance.

  2. In the left menu, select APIs > + Add API.

  3. Under Create from definition, select WSDL.

    SOAP API

  4. In WSDL specification, enter the URL to your SOAP API, or click Select a file to select a local WSDL file.

  5. In Import method, SOAP pass-through is selected by default. With this selection, the API is exposed as SOAP, and API consumers have to use SOAP rules. If you want to "restify" the API, follow the steps in Import a SOAP API and convert it to REST.

    Create SOAP API from WSDL specification

  6. The following API settings are filled automatically based on information from the SOAP API: Display name, Name, Description. Operations are filled automatically with Display name, URL, and Description, and receive a system-generated Name.

  7. Enter other API settings. You can set the values during creation or configure them later by going to the Settings tab.

    For more information about API settings, see Import and publish your first API tutorial.

  8. Select Create.


author: Johnnytechn ms.service: api-management ms.topic: include ms.date: 04/12/2023 ms.author: v-johya

Test the new API in the portal

Operations can be called directly from the portal, which provides a convenient way for administrators to view and test the operations of an API.

  1. Select the API you created in the previous step.

  2. Select the Test tab.

  3. Select an operation.

    The page displays fields for query parameters and fields for the headers.

    Note

    In the test console, API Management automatically populates an Ocp-Apim-Subscription-Key header, and configures the subscription key of the built-in all-access subscription. This key enables access to every API in the API Management instance. Optionally display the Ocp-Apim-Subscription-Key header by selecting the "eye" icon next to the HTTP Request.

  4. Depending on the operation, enter query parameter values, header values, or a request body. Select Send.

    When the test is successful, the backend responds with 200 OK and some data.

To debug an API, see Tutorial: Debug your APIs using request tracing.

Wildcard SOAP action

If you need to pass a SOAP request that doesn't have a dedicated action defined in the API, you can configure a wildcard SOAP action. The wildcard action will match any SOAP request that isn't defined in the API.

To define a wildcard SOAP action:

  1. In the portal, select the API you created in the previous step.
  2. In the Design tab, select + Add Operation.
  3. Enter a Display name for the operation.
  4. In the URL, select POST and enter /soapAction={any} in the resource. The template parameter inside the curly brackets is arbitrary and doesn't affect the execution.

Append other APIs

You can compose an API of APIs exposed by different services, including:

  • The OpenAPI Specification
  • A SOAP API
  • A Web App hosted in Azure App Service
  • Azure Function App
  • Azure Logic Apps
  • Azure Service Fabric

Append a different API to your existing API using the following steps.

Note

When you import another API, the operations are appended to your current API.

  1. Go to your Azure API Management instance in the Azure portal.

    Go to Azure API Mgmt instance

  2. Select APIs on the Overview page or from the menu on the left.

    Select APIs

  3. Click ... next to the API that you want to append another API to.

  4. Select Import from the drop-down menu.

    Select import

  5. Select a service from which to import an API.

    Select service

Next steps