Skip to main content

Example of Frends and SOAP

How to send SOAP messages and publish web services (WSDL)

Ossi Galkin avatar
Written by Ossi Galkin
Updated over a year ago

Frends doesn't have direct support for SOAP, but as SOAP is fundamentally XML messages sent over HTTP, it is possible to make SOAP calls and publish web services.

SOAP call

To make a SOAP call you can use a normal HttpRequest Task. Just include a SOAP envelope in the body and and the correct headers. For SOAP 1.2 you need to use the HTTP headers: Content-Type: application/soap+xml and charset=utf-8.

It should be noted that the HttpRequest Task does not support more advanced SOAP messages such as WS-Security. However, it is possible to sign XML documents with the community Task XMLSignature.

Publish Web Services (WSDL)

To mimic web services you have to make an HTTP Trigger for each endpoint. SOAP messages are XML so handling them won't cause any trouble in a Frends Process.

If you want to publish WSDL from your own URL you have to make your own HTTP Trigger.

Your HTTP endpoints would look like the following:

example.com/ws/             (WSDL is served here)
example.com/ws/operation1
example.com/ws/operation2
example.com/ws/operation3
example.com/ws/operation4
example.com/ws/operation5

If you want to serve WSDL when a caller calls your service with some URL parameter, e.g. example.com/ws/operation1?wsdl=true you have to add logic to each process to detect that parameter and then return WSDL. Generally, it is best to add this kind of recurring logic in a Frends subprocess. 

Furthermore, if WSDL needs to be served from example.com/ws?wsdl=true you have to add a Trigger and detect parameters.

Did this answer your question?