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

SOAP 服务

用于测试 SOAP 客户端(SoapUI、Postman、WCF、zeep 等)的 SOAP 服务。接受 SOAP 1.1(text/xml + SOAPAction)和 SOAP 1.2(application/soap+xml),响应使用与请求相同的版本。/api/soap/calculator:对 intA + intB 做 Add / Subtract / Multiply / Divide(命名空间 http://tempuri.org/),提供 ?wsdl。/api/soap/countries:基于固定数据的 GetCountryInfo(countryCode) / ListCountries。错误以 SOAP Fault 返回(1.1:始终 500;1.2:Sender fault 400,Receiver fault 500)。

请求示例

Get the calculator WSDL (with ?wsdl) or usage information. 完整参考和 Send 按钮(英文).

cURL
curl -X GET "https://api.testingapis.com/api/soap/calculator"
在 Studio 中运行
响应 · 200 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…
  }
}