SOAP Request 415 error

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",
"ip": "555.222.555.555",
"id": "http@http://myhost/.svc?wsdl",
"scheme": "http",
"name": "http",
"type": "http"
},
"resolve": {
"ip": "555.222.555.555",
"rtt": {
"us": 27038
},
"host": "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"
},
"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'
1 Like

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

- 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'
1 Like

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