New in 2.4: Test runs you can trust See what's new →

Get the calculator WSDL

GEThttps://api.testingapis.com/api/soap/calculator

Get the calculator WSDL (with ?wsdl) or usage information.

GET /api/soap/calculator?wsdl returns a WSDL 1.1 document with SOAP 1.1 and 1.2 bindings, which SoapUI, WCF or zeep can import. Without ?wsdl you get JSON listing the operations and ready-to-send sample envelopes.

Responses

200
WSDL (text/xml) or usage JSON.

Example

Request
curl -X GET "https://api.testingapis.com/api/soap/calculator"
Run in Studio
Response200 OK
{
  "service": "Calculator",
  "wsdl": "https://api.testingapis.com/api/soap/calculator?wsdl",
  "operations": ["Add", "Subtract", "… 2 more items"],
  "soap11": {
    "contentType": "text/xml; charset=utf-8",
    "soapAction": "http://tempuri.org/Add",
    "sample": "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Body><Add xmlns=\"http://tempuri.org/\"><intA>5</intA><in…
  },
  "soap12": {
    "contentType": "application/soap+xml; charset=utf-8",
    "sample": "<soap:Envelope xmlns:soap=\http://www.w3.org/2003/05/soap-envelope\><soap:Body><Add xmlns=\http://tempuri.org/\><intA>5</intA><intB…
  }
}

Code examples

JavaScript (fetch)
const response = await fetch("https://api.testingapis.com/api/soap/calculator");
console.log(response.status, await response.text());
Python (requests)
import requests

response = requests.request(
    "GET",
    "https://api.testingapis.com/api/soap/calculator",
    allow_redirects=False,
)
print(response.status_code, response.text)
Java (HttpClient)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newBuilder()
            .followRedirects(HttpClient.Redirect.NEVER)
            .build();

        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.testingapis.com/api/soap/calculator"))
            .method("GET", HttpRequest.BodyPublishers.noBody())
            .build();

        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.statusCode() + " " + response.body());
    }
}