Skip to main content
Version: 4.15.0

Post messages to SOAP servers

SOAP Component

Posting to a SOAP Service is always a challenge, and even more so when you want to dynamically create the request. That's why Dovetail has its own SOAP Component that simplifies that for you, it's documentation can be found here.

Manually

With the current set of components you can post messages to a SOAP Server by chaining them together. First of all SOAP servers expect to receive XML content encapsulated in a Soap Envelope. To create a valid Soap message in Dovetail you need to surround your content with the following XML structure (e.g. the Soap Envelope):


<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
PLACE YOUR CONTENT HERE
</soap:Body>
</soap:Envelope>

You can achieve this by using the XSLT Component and creating an XSLT transformation that wraps the body of your message in this Soap Envelope XML, see below for an example.

Second you need to specify the content type. Using the SetHeaderComponent you can set the content type. The headername should be CONTENT_TYPE. The value for the expression depends on the version of SOAP you are using.

SOAP Versioncontent type
SOAP 1.1text/xml
SOAP 1.2application/soap+xml

Finally use the HTTP Component to post messages to a SOAP Server. Like always you only need to specify the URL and you're good to go!

Soap XSLT example


<?xml version="1.0"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
PLACE YOUR CONTENT HERE
</soap:Body>
</soap:Envelope>
</xsl:template>
</xsl:stylesheet>