text/xml for 1.1, application/soap+xml for 1.2). Setting contentType explicitly overrides this, e.g. to add a charset.Example Configuration
api:
port: 2000
flow:
- soapBody:
version: '1.2'
src: |
<cs:getCity xmlns:cs="https://predic8.de/cities">
<name>${params.city}</name>
</cs:getCity>
api:
port: 2000
flow:
- soapBody:
version: '1.2'
src: |
<cs:getCity xmlns:cs="https://predic8.de/cities">
<name>${params.city}</name>
</cs:getCity>
Syntax
soapBody:
charset: <string>
contentType: <string>
location: <string>
pretty: <boolean>
src: <string>
version: <string>soapBody: charset: <string> contentType: <string> location: <string> pretty: <boolean> src: <string> version: <string>
Attributes
| Name | Required | Default | Description | Examples |
|---|---|---|---|---|
| charset | false | UTF-8 | Encoding of the template text. | UTF-16, iso-8859-1 |
| contentType | false | text/plain | Content-Type of the generated body content. | application/json |
| location | false | N/A | A file or URL location where the content that should be set as body could be found | conf/body.txt |
| pretty | false | false | Format the content of the template. Depending on the contentType the a formatter for JSON, XML or plain text is used. | true |
| src | false | - | - | - |
| version | false | 1.1 | SOAP version of the generated envelope. 1.1 uses the http://schemas.xmlsoap.org/soap/envelope/ namespace and a text/xml Content-Type; 1.2 uses http://www.w3.org/2003/05/soap-envelope and application/soap+xml. | 1.2 |