Forum Discussion

Heidi_35827's avatar
Heidi_35827
Icon for Nimbostratus rankNimbostratus
Oct 06, 2014

Help with SOAP Monitor

I am attempting to use the built-in SOAP monitor on an LTM with 10.2.4.

 

I have made several attempts, but no success yet. Any help or advice would be much appreciated!

 

One of the biggest issues I have is how to I validate that the customer has given me a legitimate POST request and that I'm getting back the result they say I should? They claim to have verified using SOAP-UI, and tell me that this request should work but so far my pool members all fail this monitor.

 

Admittedly, I have very little SOAP knowledge and so I'm having trouble deconstructing the SOAP POST request the customer has provided me, with what I need to put in the fields of the monitor. Can someone help me identify what components of this request need to be included in my SOAP monitor fields and what goes where?

 

31 Replies

  • 'POST /EAS/CLEDRTest HTTP/1.1\r\nAccept-Encoding: gzip,deflate\r\nContent-Type: text/xml;charset=UTF-8\r\nSOAPAction: \"/CLEDRTest.serviceagent/CLEDRTestSOAP1/CLEDRTest\"\r\nContent-Length: 244\r\nHost: qaesb.nscorp.com:40020\r\nUser-Agent: Apache-HttpClient/4.1.1 (java 1.5)\r\nConnection: Close\r\n\r\n\r\n\r\n\r\n?\r\n\r\n'

     

  • After Connection: Close there should be only 2 \r\n\r\n

     

    Then after that you need your post body, the

     

    Your cotent length should be the number of characters in this last body section only, not any of the characters in the header. If you could post that section as text instead of a picture, I should be able to put it all together for you

     

    • Heidi_35827's avatar
      Heidi_35827
      Icon for Nimbostratus rankNimbostratus
      Sorry for the confusion, I had a hard time getting it to post the string literally.
  • put a Tab before your text and it will format it a little better.

    Try this. I don't think you can have \r\n in the body, as I believe this signifies the end of the body. I believe you need to use just \n if you really want a newline in the body. I just remove them all for simplicity though, the server won't care about the formatting.

    POST /EAS/CLEDRTest HTTP/1.1\r\nAccept-Encoding: gzip,deflate\r\nContent-Type: text/xml;charset=UTF-8\r\nSOAPAction: \"/CLEDRTest.serviceagent/CLEDRTestSOAP1/CLEDRTest\"\r\nContent-Length: 239\r\nHost: qaesb.nscorp.com:40020\r\nUser-Agent: Apache-HttpClient/4.1.1 (java 1.5)\r\nConnection: Close\r\n\r\n?\r\n
    

    Also note that removing all the newlines shortened the content-length

    • mimlo_61970's avatar
      mimlo_61970
      Icon for Cumulonimbus rankCumulonimbus
      ick, it looked fine in the preview, but it got cut off. so ignore my advice on formatting POST /EAS/CLEDRTest HTTP/1.1\r\nAccept-Encoding: gzip,deflate\r\nContent-Type: text/xml;charset=UTF-8\r\nSOAPAction: \"/CLEDRTest.serviceagent/CLEDRTestSOAP1/CLEDRTest\"\r\nContent-Length: 239\r\nHost: qaesb.nscorp.com:40020\r\nUser-Agent: Apache-HttpClient/4.1.1 (java 1.5)\r\nConnection: Close\r\n\r\n?\r\n
    • mimlo_61970's avatar
      mimlo_61970
      Icon for Cumulonimbus rankCumulonimbus
      If that doesn't work, telnet to the port on the server and paste this in to see what response code comes back POST /EAS/CLEDRTest HTTP/1.1 Accept-Encoding: gzip,deflate Content-Type: text/xml;charset=UTF-8 SOAPAction: "/CLEDRTest.serviceagent/CLEDRTestSOAP1/CLEDRTest" Content-Length: 239 Host: qaesb.nscorp.com:40020 User-Agent: Apache-HttpClient/4.1.1 (java 1.5) Connection: Close ? After you hit enter on the last line, you should get a response. if you get a response before inputting the last line, something is wrong with the header
    • Heidi_35827's avatar
      Heidi_35827
      Icon for Nimbostratus rankNimbostratus
      Ok, let me try the telnet...I didn't see this suggestion before now...I'll be back
  • Thank you for your help! Unfortunately I took your string above and pasted into my monitor and I still have the same result....tcpdump shows the reply to the monitor request is a HTTP 500. Do you know how I can share the tcpdumps with you?

     

  • ' HTTP/1.1 505 HTTP Version Not Supported Server: Apache-Coyote/1.1 Date: Tue, 07 Oct 2014 17:44:39 GMT Connection: close

     

    Connection closed by foreign host.'

     

  • does that server not support HTTP/1.1? You can try HTTP/1.0. Get rid of the Connection: Close portion of the header

     

    In the packet capture of the example they gave you that works, is it 1.1 or 1.0?

     

  • The working request in the tcpdump I have - specifies 1.1 as well. That one successfully returns a 200 OK.

     

    I did just try the same request in telnet, but changed it to 1.0. Oddly enough, I get the same error - HTTP/1.1 505 HTTP Version Not Supported.

     

  • Ok, so lets assume it is erroring on something other than the HTTP version.

     

    I'm not sure how to attach a tcpdump here. In wireshark, you can right click on one of the packets and choose 'follow tcp stream' that will bring up a text representation of the request, hopefully allow you to compare them easily to see what is different. You can paste that in here if you want and I will look.

     

  • Thank you for all of your help today, it has been invaluable. It will likely be tomorrow morning before I have an opportunity to dive deeper into the traces. I will be back on here then and let you know what I find.

     

  • I have a working monitor! Thanks to the help of my local F5 sales engineer a resident SOAP expert within F5 that he solicited for help (John Alam). He found two errors in my SOAP message - the URI following the POST message was incorrect. He found this by comparing my monitor string to the string in the SOAP request generated by SOAP-UI from my customer. The 2nd error he identified was missing whitespace in the SOAP envelope statement, before 'xmlns:v1'. Once I fixed those 2 errors - my pool members turned green. Thanks so much for all your help, mimlo!