SOAP Endpoint

A SOAP endpoint has been created so that you can build hybrid services for REST or SOAP. All rules of REST Service are applied to the SOAP endpoint, instead for the return, that is transformed in a SOAP Envelope using a Template.

Since there's no built-in support for the WSDL, the envelope must be created manually. You can declare the SOAP Template in the endpoint as this:

RESTService.addEndpoint({ 
  "name": "CelsiusToFahrenheit", 
  "method": "POST", 
  "path": "/{id}" , 
  "SOAPTemplate": "tempconvert.templates.CelsiusToFahrenheit"  
}, CelsiusToFahrenheit);

And the template sample:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<CelsiusToFahrenheitResponse xmlns="http://www.w3schools.com/xml/">
<CelsiusToFahrenheitResult>{{ data.Fahrenheit }}</CelsiusToFahrenheitResult>
</CelsiusToFahrenheitResponse>
</soap:Body>
</soap:Envelope>

The SOAP endpoint will work over "/soap-api" endpoint instead of "/api". But it should work both ways.