cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP SOAP XML monitor help needed

alex100
Cirrus
Cirrus

Hi All,

 

I am attempting to implement HTTPS heath monitor that sends SOAP POST request to an XML gateway. I have had my request sorted out through SOAP UI which work as expected. The response I am getting in XML format indicates that back-end service is up and running.

With some trial and error, I have converted SOAP UI request into send sting as below:

POST /servcie HTTP/1.1\r\nHost: applicaiton.companyname.com:8443\r\nAccept-Encoding: gzip,deflate\r\nUser-Agent: Apache-HttpClient/4.1.1 (java 1.5)\r\nContent-Type: text/xml;charset=utf-8\r\nSOAPAction: http://www.companyname.com/EnterpriseServices/Scheduling/v1.0.0/GetDemographics\r\nContent-Length: 1314\r\nConnection: Close\r\n\r\n<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Header><wsse:Security soap:mustUnderstand = \"1\" xmlns:wsse = \"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\"><wsse:UsernameToken wsu:Id = \"UsernameToken-7198221\" xmlns:wsse = \"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\" xmlns:wsu = \"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\"><wsse:Username xmlns:wsse = \"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">serviceuser</wsse:Username><wsse:Password Type = \"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\" xmlns:wsse = \"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">somepassword</wsse:Password></wsse:UsernameToken></wsse:Security></soap:Header><soap:Body><GetDemographics xmlns=\"http://www.companyname.com/EnterpriseServices/Scheduling/v1.0.0\"><getDemographicsRequestParam><Body><ClientCode>ABC</ClientCode><ProgramCode>ABC</ProgramCode><examCode>2NE</examCode></Body></getDemographicsRequestParam></GetDemographics></soap:Body></soap:Envelope>\r\n

 

I see the request from the monitor and successful response on XML gateway appliance. As a receive string I am expecting message status below:

<Success>true</Success>

 

While the response is HTTP 200, my monitor still seems to fail with response string match . Looking at the monitor log I see the request and response. However, the format of response shows as heximal representation. This is weird. I have checked against some other monitors and they show response content in readable format.

 

[0][16420] 2021-04-06 16:50:06.599136: ID 367   :(_recv_active_service_ping): rcvd 715 bytes: -->HTTP/1.1 200 OK\x0d\x0aServer: Apache-Coyote/1.1\x0d\x0aContent-Encoding: gzip\x0d\x0aContent-Type: text/xml;charset=utf-8\x0d\x0aContent-Length: 530\x0d\x0aDate: Tue, 06 Apr 2021 20:50:06 GMT\x0d\x0aConnection: close\x0d\x0a\x0d\x0a\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x00\xad\x95\xc9n\xdb0\x10\x86_e\xa0K\x93CL;\xe9\xa10h\x05\x8d\xb7\x04\xb0\x03#\x02\xd2^Yr"\x11\x15I\x81\x8bl\xbf})\xc7n\xed\x14i \xd57\x91\xd4\xf7\xcfp8\x0b\xbd\xdd\xa8\x12j\xb4N\x1a=J\x06\xbd~\x02\xa8\xb9\x11R\xe7\xa3$\xf8\x97\xab/\xc9mJ\x9da\xd5p\xaak,M\x85\x10\x11\xed\x86\xcd\xde()\xbc\xaf\x86\x848^\xa0b\xae\x17\x8f\x9a\xfd\x9e\xb19i>\x08\xee!\x92\xec\xb1\x8d\x93\xbf\xa9\xf5z\xdd[\xdf\xec~\xbe\xee\xf7\x07\xe4\xfbr\x91\xed\x84\xae\xa4v\x9ei\x8e\x7f(\xf11\x95\xec\x1d\xbd3b\x9b\xd29\xfa\x09*\x93[V\x15\x92\xbb't\x95\xd1n\xef\xfd\x89\xd8\xca\x1a\x85\xdeJ\xde\xe3F\x91\xa9\xf6h++\x1dfhk\xc9\xd1\x91F^\x842\xc6\x84\xd41D1H\xef\xca\xa7\xf4\x1e\x99@\x9b\xd2%:\xc7r\xcc<\xf3\xc1\xa54\x0b<J\xb9\xd4\xdb\x80\x94\x1cV\x94\xbc\xf9\x8d\x1c\xf0\xd7K\x1c\x9b8Y\xa5\xf4\x91)Lg\xd2:\x0f\x17sY\xa3\xbe\x84f\x8b\x92\xdd\x01}fe@ Q\xf1\x84\xfa[b)\x85(\xb1\x1b\xbb`\x8d\xf5\x19S\xb2\xdcv4?6\xaabz\xdb\x0d\xce\xbcE\xf4\xf0U\x08\x1b\xc3\x08\x0b\xa9\x11\x06gQ\xb9>\x8b\xca\xcdYT>\xb7\x0f\xaa\xf4\xdb\x0e\xa6\x99G\x12\x8b\xa1\x96\xb1\xf2Z\xe3+\x13K\xb6\x84\xb1\x11]\x92 ho\xdb\xbb<UL\x96\x87`\xb5\xa6\xbf\x19\xfb\x93L\xd8\x16V\x85\xd1\xed\x9d>\xc5a\xba\xf1\xa8\x9b6\xdaZ\xe8>\xb6\x1f\xb8\x98\xc6\x12\x8e\x1d\xe6\xb2\xa373\xb6\xe9HN\xe2\xb3\x83y\x81;i}\xd1>k\x0c\x97\xf1\xd93\xe4\xc1\xc6\xac\x83\xc7\xa0~\xa0m\xdf\x85\x8c/\xd0~r\xb0dR\xa0\xee\xd6\x0e\xe6&N2\xadP{x\x98\xfc\x1f\x0d\x0f\xce\x85\xf8\x1c\xd055\xc7\xc6\xda\xddL\x88\xb7\xe1\x08\x0b\xa6\xf3\x10\xfb\xfc\x07:\xc7\xabf\x1a\xbcN\x01\xf2\xee\xb0\xf9\xc7\xc9\xd1($'\xf3;\xfd\x05,\xa4\x8a2\xf5\x07\x00\x00<-- [ tmm?=false td=true tr=false addr=::ffff:10.2.1.123:8443 srcaddr=::ffff:10.2.1.2%0:49550 ]

 

It almost looks like LTM is failing to interpret response properly. Any Ideas? Has anyone seen something like this before?

 

All help is greatly appreciated.

 

Thanks,

Alex

 

 

1 ACCEPTED SOLUTION

alex100
Cirrus
Cirrus

Ok this is solved now. Looks like monitor does not like or does not know how to deal with compression. I should have paid more attention to Accept-Encoding header that was included in my send string as my intent was to mimic the request from SOAP UI. That's why all those hexidecimals where showing in the monitor log. My send string was instructing server side to send compressed response that monitor failed to decompress. That simple!. Once, [Accept-Encoding: gzip,deflate] was removed, the response was now sent in plain text and I was able to see in the monitor log.

View solution in original post

4 REPLIES 4

SanjayP
MVP
MVP

For a troubleshooting purpose, enable monitor logging option for one of the member. Logs would be created in /var/log/monitors/ directory. It would show request and response. Compare it with the curl output and try to adjust the send/receive string accordingly. Please note, logging should be disabled after troubleshooting.

 

You can also post the curl ouput and monitor logs here and someone can take a look.

That response that I have posted above is what I see in the monitor log. My send string seems to be ok as I can see request from the monitor on the xml gateway. What is confusing is why I am seeing the receive string in hex. That is the part I don't get.

Can you post curl output also here to see if you get the correct response? ​

alex100
Cirrus
Cirrus

Ok this is solved now. Looks like monitor does not like or does not know how to deal with compression. I should have paid more attention to Accept-Encoding header that was included in my send string as my intent was to mimic the request from SOAP UI. That's why all those hexidecimals where showing in the monitor log. My send string was instructing server side to send compressed response that monitor failed to decompress. That simple!. Once, [Accept-Encoding: gzip,deflate] was removed, the response was now sent in plain text and I was able to see in the monitor log.