# SOAP request with logstash

**URL:** <https://discuss.elastic.co/t/soap-request-with-logstash/188969>\
**Category:** Logstash\
**Created:** [July 4, 2019, 7:48pm UTC](https://discuss.elastic.co/t/soap-request-with-logstash/188969 "2019-07-04T19:48:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![He\_Pamela](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/he_pamela/32/42370_2.png) [@He\_Pamela](https://discuss.elastic.co/u/He_Pamela)\
**Post date:** [July 4, 2019, 7:48pm UTC](https://discuss.elastic.co/t/soap-request-with-logstash/188969/1 "2019-07-04T19:48:55Z")

</div>

Hi,

I'd need to recibe a Soap response from a web service. I coudn't find an oficial documentation and I don't now how to do that with the http poller input from logstash.  
Somebody nows how to do this?

Thanks.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 5, 2019, 3:59pm UTC](https://discuss.elastic.co/t/soap-request-with-logstash/188969/2 "2019-07-05T15:59:20Z")

</div>

The http\_poller [documentation](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-http_poller.html) has an example. What have you tried, and what do you not like about the result?

---

<div class="post-metadata">

**Author:** ![He\_Pamela](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/he_pamela/32/42370_2.png) [@He\_Pamela](https://discuss.elastic.co/u/He_Pamela)\
**Post date:** [July 9, 2019, 5:12pm UTC](https://discuss.elastic.co/t/soap-request-with-logstash/188969/3 "2019-07-09T17:12:24Z")

</div>

This is what I've tried.

> input {  
> http\_poller {  
> urls =\> {  
> testVersion =\> {  
> method =\> post  
> url =\> "[http://xxx.xxx.xx.xx/wsservice/service.asmx](http://xxx.xxx.xx.xx/wsservice/service.asmx)"
> 
> headers =\> {  
> "Content-Type" =\> "text/xml; charset=utf-8"  
> "SOAPAction" =\> "[http://www.ruronline.com/actualstate](http://www.ruronline.com/actualstate)"  
> }
> 
> body =\> {  
> \<x:Envelope xmlns:x="[http://schemas.xmlsoap.org/soap/envelope/](http://schemas.xmlsoap.org/soap/envelope/)" xmlns:www="[http://www.rtsolutionsonline.com](http://www.rtsolutionsonline.com)"\>  
> \<x:Header/\>  
> \<x:Body\>  
> www:EstadoActualCruces  
> www:party3\_keyRN495720-974e-11e9-89b2-0a094ac228f2\</www:party3\_key\>  
> \</www:EstadoActualCruces\>  
> \</x:Body\>  
> \</x:Envelope\>
> 
> }
> 
> }  
> }  
> request\_timeout =\> 30  
> schedule =\> @every 30s  
> codec =\> "json"  
> metadata\_target =\> "http\_poller\_metadata"  
> }   
> }
> 
> output {  
> elasticsearch {  
> .............  
> }  
> stdout { codec =\> rubydebug }
> 
> }

I got a general error with the http poller.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 9, 2019, 5:33pm UTC](https://discuss.elastic.co/t/soap-request-with-logstash/188969/4 "2019-07-09T17:33:52Z")

</div>

> [@He\_Pamela](#):
>
> I got a general error with the http poller.

What error message did you get?

---

<div class="post-metadata">

**Author:** ![He\_Pamela](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/he_pamela/32/42370_2.png) [@He\_Pamela](https://discuss.elastic.co/u/He_Pamela)\
**Post date:** [July 9, 2019, 7:38pm UTC](https://discuss.elastic.co/t/soap-request-with-logstash/188969/5 "2019-07-09T19:38:38Z")

</div>

> [2019-07-09T19:37:18,652][ERROR][logstash.agent] Failed to execute action {:action=\>LogStash::PipelineAction::Create/pipeline\_id:main, :exception=\>"LogStash::ConfigurationError", :message=\>"Expected one of #, -, ", ', } at line 38, column 1 (byte 827) after input {\n\thttp\_poller {\n\t\turls =\> {\n\t\ttestVersion =\> {\n\t\t\tmethod =\> post\n\t\t\turl =\> "[http://192.168.20.4/ServicioWebCentral/RTServicioCentral.asmx\](http://192.168.20.4/ServicioWebCentral/RTServicioCentral.asmx%5C)"\n\n\t\theaders =\> {\n\t\t\t"Content-Type" =\> "text/xml; charset=utf-8"\n\t\t\t"SOAPAction" =\> "[http://www.rtsolutionsonline.com/EstadoActualCruces\](http://www.rtsolutionsonline.com/EstadoActualCruces%5C)"\n\t}\nbody =\> {\n", :backtrace=\>["/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:41:in `compile_imperative'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:49:in `compile\_graph'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:11:in `block in compile_sources'", "org/jruby/RubyArray.java:2486:in `map'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:10:in `compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:149:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:22:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:90:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline\_action/create.rb:42:in `block in execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:92:in `block in exclusive'", "org/jruby/ext/thread/Mutex.java:148:in `synchronize'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:92:in `exclusive'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline\_action/create.rb:38:in `execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:317:in `block in converge\_state'"]}

the output is like this

```
output {
	 elasticsearch {
	 ssl => true
     ssl_certificate_verification => false
	 hosts => ["https://xx.xx.xx.xx:9200"] 
     index => "status"
	 document_type => "doc"
	 user => "user"
    password => "password"
	 }
	    stdout { codec => rubydebug }

}

```

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 9, 2019, 9:06pm UTC](https://discuss.elastic.co/t/soap-request-with-logstash/188969/6 "2019-07-09T21:06:29Z")

</div>

An http\_poller input does not have an option to specify the body of the request. If you need to specify a body you can use an http filter. Use an exec input running /bin/true every 30 seconds to create a dummy event that the filter can add to.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 6, 2019, 9:06pm UTC](https://discuss.elastic.co/t/soap-request-with-logstash/188969/7 "2019-08-06T21:06:33Z")

</div>

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