Web service SOAP Transaction with Web inject
Posted: Fri May 10, 2013 10:35 am
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?
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?