# SOAP Request 415 error

**URL:** <https://discuss.elastic.co/t/soap-request-415-error/122877>\
**Category:** Beats\
**Tags:** heartbeat\
**Created:** [March 7, 2018, 12:02pm UTC](https://discuss.elastic.co/t/soap-request-415-error/122877 "2018-03-07T12:02:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rams134](https://avatars.discourse-cdn.com/v4/letter/r/eb9ed0/32.png) [@rams134](https://discuss.elastic.co/u/rams134)\
**Post date:** [March 7, 2018, 12:02pm UTC](https://discuss.elastic.co/t/soap-request-415-error/122877/1 "2018-03-07T12:02:32Z")

</div>

Hi ,

I am trying heartbeat feature for sending the soap request to listen the custom response. I am getting 415 exception. Kindly help . both .svc and ?wsl url's are showing same error. when i am running this wuth curl, i am receiving valid response. kindly help.

Publish event: {  
"@timestamp": "2018-03-07T11:46:35.433Z",  
"@metadata": {  
"beat": "heartbeat",  
"type": "doc",  
"version": "6.2.2"  
},  
"monitor": {  
"duration": {  
"us": 35773  
},  
"status": "down",  
"host": "[myhost.com](http://myhost.com)",  
"ip": "555.222.555.555",  
"id": "http@[http://myhost/.svc?wsdl](http://myhost/.svc?wsdl)",  
"scheme": "http",  
"name": "http",  
"type": "http"  
},  
"resolve": {  
"ip": "555.222.555.555",  
"rtt": {  
"us": 27038  
},  
"host": "[myhost.com](http://myhost.com)"  
},  
"error": {  
"type": "validate",  
"message": "415 Cannot process the message because the content type 'applica tion/octet-stream' was not the expected type 'text/xml; charset=utf-8'."  
},  
"type": "monitor",  
"tcp": {  
"port": 80,  
"rtt": {  
"connect": {  
"us": 1634  
}  
}  
},  
"http": {  
"response": {  
"status": 415  
},  
"rtt": {  
"content": {  
"us": 53  
},  
"total": {  
"us": 8656  
},  
"write\_request": {  
"us": 121  
},  
"response\_header": {  
"us": 6907  
},  
"validate": {  
"us": 6960  
}  
},  
"url": "[http://myhost/.svc?wsdl](http://myhost/.svc?wsdl)"  
},  
"fields": {  
"env": "staging"  
},  
"beat": {  
"version": "6.2.2",  
"name": "machineip",  
"hostname": "machineip"  
}  
}

* * *

```
- type: http
  #SOAP/HTTP
  urls: ["http://myhost/.svc?wsdl"]
  check.request.method: POST
  check.request.headers:
  soapaction: 'HeartBeat'
  content-type: 'text/xml; charset=utf-8'
  check.request.body: '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://XXX.WebServices.ESB.Schemas.HeartBeatRequest/2013/10"><soapenv:Header/><soapenv:Body><ns:HeartBeatRequest/></soapenv:Body></soapenv:Envelope>'
  schedule: '@every 30s'
```

---

<div class="post-metadata">

**Author:** ![adrisr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adrisr/32/25423_2.png) [@adrisr](https://discuss.elastic.co/u/adrisr)\
**Post date:** [March 8, 2018, 9:58pm UTC](https://discuss.elastic.co/t/soap-request-415-error/122877/2 "2018-03-08T21:58:57Z")

</div>

The indentation on your configuration is wrong, the check.request.headers dictionary must be indented:

```auto
- type: http
  #SOAP/HTTP
  urls: ["http://myhost/.svc?wsdl"]
  check.request.method: POST
  check.request.headers:
    soapaction: 'HeartBeat'
    content-type: 'text/xml; charset=utf-8'
  check.request.body: '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://XXX.WebServices.ESB.Schemas.HeartBeatRequest/2013/10"><soapenv:Header/><soapenv:Body><ns:HeartBeatRequest/></soapenv:Body></soapenv:Envelope>'
  schedule: '@every 30s'

```

---

<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:** [April 5, 2018, 9:59pm UTC](https://discuss.elastic.co/t/soap-request-415-error/122877/3 "2018-04-05T21:59:15Z")

</div>

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