How To receive a SOAP Response message from web service


Hi Folks,

NOTE: Logstash version 5.6.2

Currently, I receive events in (json format) from apache kafka and I use logstash with HTTP Output plugin for sending SOAP Request message to Web Service, via WSDL.

output {
http {
url => ""
http_method => "post"
content_type => "text/xml;charset=UTF-8"
headers => {
"SOAPAction" => ""
format => "message"
message => '<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:ent="" xmlns:soapenv=""> xmlns:soapenv="">soapenv:Headerpwduid</soapenv:Header>soapenv:Body>ent:mySOAPAction</ent:mySOAPAction></soapenv:Body></soapenv:Envelope>'
...other output plugin..

my goal is to receive the SOAP Response message in Logstash and forward to kafka in json format but I do not find any official plugin that support this functionality.

Do you have any experience/suggestion which plugin or strategy I can use to receive those SOAP Response?

Many thanks in advance for your response.

(Guy Boertje) #2

As I don't have access to a SOAP endpoint I can't test any suggestions.

Some folks on here have tried the http_poller plugin. However you said you want XML to JSON conversion and that is a problem because we don't have a XML codec to decode the XML to a LS Event.

The XML filter uses XPath to "pluck" values out of the XML and add them with keys to an event and that may work for you.

http_poller -> xml filter -> kafka output + json codec


Hi @guyboertje,

thank you for your response.

Actually, I am thinking to use HTTP_Poller Input Plugin for this purpose but the http_poller performes async request to wdsl (setting up polling interval attribute) and I concern about the performance and resilience of LS plugin.

Regarding the XML Filter, I would forward the soap response as I receive, to kafka topic in json format.


(Arnaud Giffard) #4

Hi @s1m0ne,

Could you post your logstash pipeline please ?
I try to work with http_poll to call SOAP Service but I don't understand why my conf not works...

thanks :wink:


(Arnaud Giffard) #5

My pipeline

input {
http_poller {
urls => {
testVersion => {
method => post
url => "https://forge.douane/mantis/api/soap/mantisconnect.php"
headers => {
"Content-Type" => "text/xml; charset=UTF-8"
"SOAPAction" => "urn:mc_version"
body => '<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soapenv="" xmlns:man="">
<man:mc_version soapenv:encodingStyle=""/>
request_timeout => 30
schedule => @every 30s
codec => "plain"
# A hash of request metadata info (timing, response headers, etc.) will be sent here
metadata_target => "http_poller_metadata"
output {
stdout {
codec => rubydebug

(Arnaud Giffard) #6


I find the problem, it is my property "schedule".
It must be a hash.

(system) #7

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.