2/14/2024 0 Comments Visual basic script![]() Set qfile1=fso.CreateTextFile("C:\Users\RajkumarJoshua\Desktop\DCIM\SampleReuest.There is very easy way that you can run VB Script code written on notepad without any additional software installed in your PC. Set qfile=fso.CreateTextFile("C:\Users\RajkumarJoshua\Desktop\DCIM\SampleResponse.xml",2) Set fso=createobject("Scripting.FileSystemObject") 'Function to create XML test evidence filesįunction CreateXMLEvidence(ResponseXML,strRequest) ![]() ResponseMessage=split(split(split(ResponseXML,SearchTag)(1),"")(1) 'Function to fetch the required message from a TAG 'msgbox "RESPONSE : " & Ĭall ParseTag(responseText,"AuthorizationResult")Ĭall CreateXMLEvidence(responseText,strRequest) Set http=createObject("Microsoft.XMLHTTP") "/trainingrite_epaysystem/tr_epaysys.asmx" OStream.SaveToFile "c:\somefolder\file.pdf" Set oStream = CreateObject("ADODB.Stream") Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP.3.0") Here is an example of using XmlHttp to fetch a PDF file and store it:- Dim oXMLHTTP Note that in a server-side requirement (e.g., VBScript hosted in ASP) you would use MSXML.ServerXMLHTTP.3.0 or WinHttp.WinHttpRequest.5.1 (which has a near identical interface). The XMLHTTP also has a responseBody property which is a byte array version of the reponse and there is a responseStream which is an IStream wrapper for the response. An answer already contains a very basic usage of MSXML2.XMLHTTP (I recommend the more explicit MSXML2.XMLHTTP.3.0 progID) however you may need to do different things with the response, it may not be text. You haven't at time of writing described what you are going to do with the response or what its content type is. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |