HsacExamples.SlimTests.HttpTests.HttpPost1Test


Body in Wiki


Send a HTTP POST supplying the content to post in a variable so the script table does not have newlines in its cells.

variable defined: POST_BODY= {{{ <s11:Envelope xmlns:s11="http://schemas.xmlsoap.org/soap/envelope/"> <s11:Body> <ns1:AddInteger xmlns:ns1="http://tempuri.org"> <ns1:Arg1>10</ns1:Arg1> <ns1:Arg2>11</ns1:Arg2> </ns1:AddInteger> </s11:Body> </s11:Envelope> }}}

script xml http test
set value http://tempuri.org/SOAP.Demo.AddInteger for header SOAPAction
post
<s11:Envelope xmlns:s11="http://schemas.xmlsoap.org/soap/envelope/">
  <s11:Body>
    <ns1:AddInteger xmlns:ns1="http://tempuri.org">
      <ns1:Arg1>10</ns1:Arg1>
      <ns1:Arg2>11</ns1:Arg2>
    </ns1:AddInteger>
  </s11:Body>
</s11:Envelope>
to http://www.crcind.com/csp/samples/SOAP.Demo.cls
check response status 200
show response
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
        <AddIntegerResponse xmlns="http://tempuri.org">
            <AddIntegerResult>21</AddIntegerResult>
        </AddIntegerResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
show response headers
Cache-Control no-cache
Pragma no-cache
Content-Length 382
Content-Type text/xml; charset=UTF-8
Expires Thu, 29 Oct 1998 17:04:19 GMT
Server Microsoft-IIS/7.5
Set-Cookie [CSPSESSIONID-SP-80-UP-csp-samples-=001000010000WT3DRxxd7B00003GYxVLAg0P2AKyGp6HX3uA--; path=/csp/samples/; httpOnly;, CSPWSERVERID=e7193bb0902d499bc4224b3ddce2e29b8f774043; path=/; httpOnly;]
X-Powered-By ASP.NET
Date Mon, 16 Mar 2020 08:31:17 GMT
register prefix tempuri for namespace http://tempuri.org
check xPath //tempuri:AddIntegerResult/text() 21