I was unable to get the soap transaction tested through web inject.
I even tried using the simple check_http option but all the soap xml sent in the body post is being removed by XI
here is the sample efforts
web inject sample
<testcases repeat="1">
<case
id="1"
description1="SAMPLE TEST CASE"
description2="Verify Account Exist"
method="post"
posttype="text/xml"
url="http://hostaddress/AccountVerificationW ... ation.asmx"
addheader='SOAPAction: "http://hostaddress/AccountVerificationW ... rifyByAcct"'
postbody='<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:Body>
<VerifyByAcct xmlns="http://hostaddress/AccountVerificationWebService">
<acctId>8908080980808</acctId>
<allPremises>true</allPremises>
</VerifyByAcct>
</soap:Body>
</soap:Envelope>'
verifypositive="\<Verified>true"
/>
</testcases>
this works through webinject gui with the file option for post message. But with the wizard i do not know how to give that option.
My next attempt was using the check_http option which as per author works for through nagios core but I find that when I setup as a command in the GUI it looses all the xml post information in there
here is the sample setup
$USER1$/check_http -H $HOSTADDRESS$ -k $ARG1$ -T 'text/xml' -P $ARG2$ -t 10 -m 512 -u $ARG3$
when I pass the ARG2 with the soap xml while executing it just passes empty string . is there a way to get the xml posted in there?
Web service SOAP Transaction with Web inject
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Web service SOAP Transaction with Web inject
Just to ask, have you verified if this works from cli on the nagios machine? Also, have you url encoded the string prior to putting it in ARG2? As far as I can tell this does seem to be proper xml, so that should not be the issue. Another thought for testing, have you tried statically defining your arguments within the check command definition. This would only be to verify if and what XI is sanitizing. A final note for the moment, the test command function and actually letting the command run via nagios daemon can lead to vastly different results. This is due to php sanitization and not nagios, so if you have not let the actual check run as you have it configured I would highly suggest applying configuration and letting it run to see what your results are.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.