This utility will reformat the body section of a web_custom_request() into a more readable form.
e.g. it will convert a hard to read SOAP body like this…
1 2 3 4 5 6 7 8 9 10 11 12 13 | web_custom_request("AxisServlet", "URL=http://www.jds.net.au:8080/AxisServlet?instance=CRAMS1", "Method=POST", "TargetFrame=", "Resource=0", "RecContentType=text/xml", "Referer=", "Snapshot=t1.inf", "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\">\n <soapenv:Body>\n <ns1:bootstrap soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns1=\"BootService\">\n <in0 xsi:type=\"soapenc:string\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">192.168.1.12</in0>\n </ns1:bootstrap>\n </" "soapenv:Body>\n</soapenv:Envelope>", LAST); |
…into a nicely formatted one like this…
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | web_custom_request("AxisServlet", "URL=http://www.jds.net.au:8080/AxisServlet?instance=CRAMS1", "Method=POST", "TargetFrame=", "Resource=0", "RecContentType=text/xml", "Referer=", "Snapshot=t1.inf", "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\">\n" " <soapenv:Body>\n" " <ns1:bootstrap soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:ns1=\"BootService\">\n" " <in0 xsi:type=\"soapenc:string\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\">192.168.1.12</in0>\n" " </ns1:bootstrap>\n" " </soapenv:Body>\n" "</soapenv:Envelope>", LAST); |
Try it for yourself…