# Get Data from XML WebService

**URL:** <https://discuss.elastic.co/t/get-data-from-xml-webservice/149830>\
**Category:** Logstash\
**Created:** [September 25, 2018, 1:02pm UTC](https://discuss.elastic.co/t/get-data-from-xml-webservice/149830 "2018-09-25T13:02:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Android\_Games](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/android_games/32/45618_2.png) [@Android\_Games](https://discuss.elastic.co/u/Android_Games)\
**Post date:** [September 25, 2018, 1:02pm UTC](https://discuss.elastic.co/t/get-data-from-xml-webservice/149830/1 "2018-09-25T13:02:04Z")

</div>

I'm new to Logstash and trying to build a dashboard,which will consume data webservice .

I've installed elastic,Kibana and trying to configure logstash using http poller for pulling data from webservice

I'm trying to access XML web Service on periodic interval with http Poller , using certificate base authentication.

```
input 
{
	http_poller 
	{
		urls => 
		{
		
		test1 =>
				{		
				"https://abc//SS/inc.asmx/GetList?Severity=Informational"
				method => get
				}
		}
		truststore => "C:\Users\Downloads\logstash-6.4.1\logstash-6.4.1\data\abc.p12"
		truststore_password => "pass"
		request_timeout => 60
		schedule => { cron => "* * * * * UTC"}
		codec => "plain"
	}
}     
output 
{
  elasticsearch 
  {
index => "cs_users"
  }
}

```

Error

```
C:\Users\Chezhian\Downloads\logstash-6.4.1\logstash-6.4.1\bin>logstash -f poller.conf
Sending Logstash logs to C:/Users/Downloads/logstash-6.4.1/logstash-6.4.1/logs which is now configured via log4j2.properties
[2018-09-25T12:56:55,582][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2018-09-25T12:56:56,175][INFO][logstash.runner] Starting Logstash {"logstash.version"=>"6.4.1"}
[2018-09-25T12:56:56,832][ERROR][logstash.agent] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of #, => at line 11, column 5 (byte 167) after input \n{\n\thttp_poller \n\t{\n\t\turls => \n\t\t{\n\t\t\n\t\ttest1 =>\n\t\t\t\t{\t\t\n\t\t\t\t\"https://abc//SS/inc.asmx/GetList?Severity=Informational\"\n\t\t\t\t", :backtrace=>["C:/Users/Downloads/logstash-6.4.1/logstash-6.4.1/logstash-core/lib/logstash/compiler.rb:41:in `compile_imperative'", "C:/Users/Downloads/logstash-6.4.1/logstash-6.4.1/logstash-core/lib/logstash/compiler.rb:49:in `compile_graph'", "C:/Users/Downloads/logstash-6.4.1/logstash-6.4.1/logstash-core/lib/logstash/compiler.rb:11:in `block in compile_sources'", "org/jruby/RubyArray.java:2486:in `map'", "C:/Users/Downloads/logstash-6.4.1/logstash-6.4.1/logstash-core/lib/logstash/compiler.rb:10:in `compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:149:in `initialize'", "C:/Users/Downloads/logstash-6.4.1/logstash-6.4.1/logstash-core/lib/logstash/pipeline.rb:22:in `initialize'", "C:/Users/Downloads/logstash-6.4.1/logstash-6.4.1/logstash-core/lib/logstash/pipeline.rb:90:in `initialize'", "C:/Users/Downloads/logstash-6.4.1/logstash-6.4.1/logstash-core/lib/logstash/pipeline_action/create.rb:38:in `execute'", "C:/Users/Downloads/logstash-6.4.1/logstash-6.4.1/logstash-core/lib/logstash/agent.rb:309:in `block in converge_state'"]}
[2018-09-25T12:56:57,145][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=>9600}

```

Am i missing something ?

---

<div class="post-metadata">

**Author:** ![yaauie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yaauie/32/23363_2.png) [@yaauie](https://discuss.elastic.co/u/yaauie)\
**Post date:** [September 26, 2018, 12:45am UTC](https://discuss.elastic.co/t/get-data-from-xml-webservice/149830/2 "2018-09-26T00:45:43Z")

</div>

> [@Android\_Games](#):
>
> Expected one of #, =\> at line 11, column 5

In your "test1" block, you have a keyless-value. It should be:

```auto
		test1 =>
				{		
				url => "https://abc//SS/inc.asmx/GetList?Severity=Informational"
				method => get
				}
		}

```

---

<div class="post-metadata">

**Author:** ![Android\_Games](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/android_games/32/45618_2.png) [@Android\_Games](https://discuss.elastic.co/u/Android_Games)\
**Post date:** [September 26, 2018, 5:29am UTC](https://discuss.elastic.co/t/get-data-from-xml-webservice/149830/3 "2018-09-26T05:29:03Z")

</div>

Thanks for the reply.  
but i get this error when queried from Kibana

```
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

```

Now my configuration file looks as below

```
input 
{
	http_poller 
	{
		urls => 
		{
		
		test1 =>
				{		
				url=>"https://abc//SWS/incidents.asmx/GetList?Severity=Informational"
				method => get
				}
		}
		ssl_certificate_validation => false
		verify_ssl => false
		truststore => "C:\Users\Downloads\logstash-6.4.1\logstash-6.4.1\data\abc.p12"
		truststore_password => "pass"
		request_timeout => 60
		schedule => { cron => "* * * * * UTC"}
		codec => "plain"
	}
}

output 
{
  elasticsearch 
  {
    index => "cs_users"
  }
}
```

---

<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:** [October 24, 2018, 5:29am UTC](https://discuss.elastic.co/t/get-data-from-xml-webservice/149830/4 "2018-10-24T05:29:08Z")

</div>

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