Layanan SOAP
Layanan SOAP untuk menguji klien SOAP (SoapUI, Postman, WCF, zeep...). SOAP 1.1 (text/xml + SOAPAction) dan SOAP 1.2 (application/soap+xml) sama-sama diterima; response memakai versi yang sama dengan request. /api/soap/calculator: Add / Subtract / Multiply / Divide pada intA + intB (namespace http://tempuri.org/), dengan ?wsdl. /api/soap/countries: GetCountryInfo(countryCode) / ListCountries atas data tetap. Error kembali sebagai SOAP Fault (1.1: selalu 500; 1.2: Sender fault 400, Receiver fault 500).
- GET
https://api.testingapis.com/api/soap/calculatorGet the calculator WSDL (with?wsdl) or usage information. - POST
https://api.testingapis.com/api/soap/calculatorCall a calculator operation: Add, Subtract, Multiply or Divide. - GET
https://api.testingapis.com/api/soap/countriesGet the countries WSDL (with?wsdl) or usage information. - POST
https://api.testingapis.com/api/soap/countriesCall a countries operation: GetCountryInfo or ListCountries.
Contoh request
Get the calculator WSDL (with ?wsdl) or usage information. Referensi lengkap dan tombol Send (dalam bahasa Inggris).
cURL
curl -X GET "https://api.testingapis.com/api/soap/calculator"Response · 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…
}
}