This utility will reformat the body section of a web_custom_request() into a more readable form.
There are examples at the bottom of the page. This tool was created by Stuart Moncrieff.


Auto-detect
XML / SOAP
JSON
Form data
Split on \n
  • You can also paste raw XML, JSON or formdata content as it might appear in the Vugen generation log (without ecaped quotes and newline characters)
  • Invalid XML will be returned unmodified.
  • The "BodyBinary" attribute of web_custom_request is unsupported.
 

SOAP payload example

web_custom_request("AxisServlet", 
  "URL=http://www.jds.net.au:8080/AxisServlet?instance=CRAMS1", 
  "Method=POST", 
  "TargetFrame=", 
  "Resource=0", 
  "RecContentType=text/xml", 
  "Referer=", 
  "Mode=HTML", 
  "EncType=text/xml; charset=utf-8", 
  "Body=<?xml version=\"1.0\" encoding=\"UTF-8\"?><soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><soapenv:Body><ns1:bootstrap soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns1=\"BootService\"><in0 xsi:type=\"soapenc:string\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">192.168.1.12</in0></ns1:bootstrap></"
  "soapenv:Body></soapenv:Envelope>",
  LAST);

converts to:

web_custom_request("AxisServlet", 
  "URL=http://www.jds.net.au:8080/AxisServlet?instance=CRAMS1", 
  "Method=POST", 
  "TargetFrame=", 
  "Resource=0", 
  "RecContentType=text/xml", 
  "Referer=", 
  "Mode=HTML", 
  "EncType=text/xml; charset=utf-8", 
  "Body=
   "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
   "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">"
    "<soapenv:Body>"
     "<ns1:bootstrap soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns1=\"BootService\">"
      "<in0 xsi:type=\"soapenc:string\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">192.168.1.12</in0>"
     "</ns1:bootstrap>"
    "<"soapenv:Body>"
   "</soapenv:Envelope>",
  LAST);

Form Data example

web_custom_request("ProjectInformation.aspx", 
  "URL=http://www.jds.net.au/pwa/Project%20Detail%20Pages/ProjectInformation.aspx?ProjUid=87a41585-2fa7-4f12-a4b9-be7ba58838ec", 
  "Method=POST", 
  "RecContentType=text/html", 
  "Referer=http://www.jds.net.au/pwa/Project%20Detail%20Pages/ProjectInformation.aspx?ProjUid=87a41585-2fa7-4f12-a4b9-be7ba58838ec", 
  "Referer=http://www.jds.net.au/pwa/Project%20Detail%20Pages/ProjectInformation.aspx?ProjUid=87a41585-2fa7-4f12-a4b9-be7ba58838ec", 
  "Mode=HTML", 
  "EncType=application/x-www-form-urlencoded; charset=utf-8", 
  "Body=MSOWebPartPage_PostbackSource=&MSOTlPn_SelectedWpId=&MSOTlPn_View=0&MSOTlPn_ShowSettings=False&MSOGallery_SelectedLibrary=&MSOGallery_FilterString=&MSOTlPn_Button=none&__EVENTTARGET=&__EVENTARGUMENT=&__REQUESTDIGEST=0x272BFAD386F2876944C319C847E6F2FAD35E3368DC3C388BDF194AF85CE5EEBA5CF5A93F07054A0A4386E3BD27DD6D6127A1435560911353DBB6EB275A1D5EA1%2C20%20Jun%202012%2023%3A26%3A11%20-0000", 
  LAST);

converts to:

web_custom_request("AxisServlet", 
  "URL=http://www.jds.net.au/pwa/Project%20Detail%20Pages/ProjectInformation.aspx?ProjUid=87a41585-2fa7-4f12-a4b9-be7ba58838ec", 
  "Method=POST", 
  "RecContentType=text/html", 
  "Referer=http://www.jds.net.au/pwa/Project%20Detail%20Pages/ProjectInformation.aspx?ProjUid=87a41585-2fa7-4f12-a4b9-be7ba58838ec", 
  "Referer=http://www.jds.net.au/pwa/Project%20Detail%20Pages/ProjectInformation.aspx?ProjUid=87a41585-2fa7-4f12-a4b9-be7ba58838ec", 
  "Mode=HTML", 
  "EncType=application/x-www-form-urlencoded; charset=utf-8", 
  "Body= 
   "MSOWebPartPage_PostbackSource=&" 
   "MSOTlPn_SelectedWpId=&" 
   "MSOTlPn_View=0&" 
   "MSOTlPn_ShowSettings=False&" 
   "MSOGallery_SelectedLibrary=&" 
   "MSOGallery_FilterString=&" 
   "MSOTlPn_Button=none&" 
   "__EVENTTARGET=&" 
   "__REQUESTDIGEST=0x272BFAD386F2876944C319C847E6F2FAD35E3368DC3C388BDF194AF85CE5EEBA5CF5A93F07054A0A4386E3BD27DD6D6127A1435560911353DBB6EB275A1D5EA1%2C20%20Jun%202012%2023%3A26%3A11%20-0000&" 
  LAST);