OK, but you could reduce this to a JScript that is hosted by Windows Scripting Host without any GUI.

First we have to dust off a trusty old RBase function called WINUDF (look it up in Help)

On the local machine the Script file is executed by calling it like:



SET VAR vResultsFromPHP = (WINUDF('wscript.exe someScriptFile.js', .vFullPathNameOfFileWithArgumentsInIt'))

What happens in the script is you use the FileSystemObject to open the file you have named in the WINUDF, retrieve the arguments you have written to it from RBase, send the stuff off to the remote server via the XMLHTTPRequest Object as mentioned before and after getting the results, write them back to the same file, overwriting the contents. Upon completion of the closing of the file, the file contents are passed to the variable vResultsFromPHP by the WINUDF.



----- Original Message ----- From: "Thomas Cimicato" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Sunday, March 14, 2010 4:49 PM
Subject: [RBASE-L] - Re: Capturing URL Response


Hi Mike, I figured you might reply to this. Thank you!

To further complicate the requirement, this function will run in a stored procedure that is being executed by Oterro 3.5 based on a trigger. That said, there cannot be any user interface, window, or browser so it has to be "Oterro stored procedure" friendly. Maybe a SSL socket UDF or DLL or something creative like that. I can't write compiled stuff like that so I would be looking to fund that development.
MikeB wrote:
You need to know how the response is being returned. If I were using the XMLHttpRequest Object (in client side JScript), the return would come back from the server via Response.Write and then after the request is sent, a callback function keeps poling the XMLHttpRequest object for the return value.

How to get this into RBase? I would write a client side HTA to give you a GUI interface. Since HTA's can use the FileSystemObject to access the local file system, you could write the response to a file. You would include code in your HTA, that upon the response being returned and written to a file, the HTA would close and you would be back to your calling form in RBase, ready to get the results from the file written by the HTA.

That's all I can come up with just now.





Reply via email to