At 10:36 PM 3/19/2010, Thomas Cimicato wrote:

The reason I need the SP to do the HTTPS Post via some method is because
the transaction table with the trigger that fires the SP that runs cURL
and parses the result is being inserted by three different separate
systems simultaneously.

1) The IVR via Oterro ODBC to the RBase database by Callmaster running
   my Callmaster Basic scripts
2) The Web Server which is CodeCharge PHP/IIS/Rbase/Oterro ODBC to the
   database
3) Customer Service people running Rbase 7.6ee direct to the Rbase database
   on the local network.

All three systems insert a transaction record to the EFTRequest table that
fires the SP that launches cURL. The response from the POST is parsed in
the SP and updates the EFTRequest record with Auth or Decline.

Either I get this launch to work or we build a UDF, WinUDF, DLL, Plugin or
something to send a HTTPS POST and capture the response.


Thom,

I am assuming that the Triggered Stored Procedure is calling the required
file with "absolute path" defined in your command file (SP).

Here is the code snippet defined as Stored Procedure that prints the online
report on demand, when a request is submitted (ON AFTER INSERT TRIGGER).

Web Server Configuration:

. MS Widows 2008 Server
. Apache (2.2.11) and PHP Version 5.2.8
. R:WEB Suite 4.0
  - R:BASE for Windows 7.6
  - Oterro 4.0

-- Start here
-- SubmitOnlineInvoice.PRC
-- A. Razzak Memon
-- Stored Procedure to be used as AFTER INSERT Trigger
-- Sample Online Database: RRBYW15
-- Associated Table: OnlinePrintInvoice
-- Define Global Variables
   SET VAR vSessionID TEXT = NULL
   SET VAR vReportName TEXT = NULL
   SET VAR vTransID INTEGER = NULL
-- Collect required parameters for last inserted record
   SELECT SessionID,ReportName,ReportFileName,TransID INTO +
   vSessionID INDIC ivSessionID, +
   vReportName INDIC ivReportName, +
   vReportFileName INDIC ivReportFileName, +
   vTransID INDIC ivTransID +
   FROM OnlinePrintInvoice WHERE COUNT = INSERT
-- Define a file name based on unique Session ID
   SET VAR vCommandFile TEXT = (.vSessionID+'.RMD')
-- Define Output File Name with Absolute Path on the Web Server
SET VAR vOutPutFile = ('R:\web\rwebsuite\rrbyw15_part_v\reports\'+.vCommandFile)
-- Define Database CONNECT string
   SET VAR vDBConnect TEXT = ('CONNECT R:\dbshare\RRBYW15\RRBYW15')
-- Define Absolute Path for Report Location
   SET VAR vReportLocation TEXT = ('R:\web\rwebsuite\rrbyw15_part_v\reports\')
-- Now create a file with all necessary commands and parameters
   OUTPUT &vOutPutFile
   WRITE 'CLEAR ALL VAR'
   WRITE 'DISCONNECT'
   WRITE .vDBConnect
SET VAR vWriteLine4 TEXT = ('PRINT'&.vReportName&'WHERE TransID ='&(CTXT(.vTransID))&'+')
   SET VAR vWriteLIne5  TEXT = ('OPTION PDF +')
SET VAR vWriteLine6 TEXT = ('|FILENAME'&.vReportLocation+.vSessionID+'.PDF +')
   SET VAR vWriteLine7  TEXT = ('|TITLE Running R:WEB Your Way! +')
   SET VAR vWriteLine8  TEXT = ('|SUBJECT Invoice +')
   SET VAR vWriteLine9  TEXT = ('|AUTHOR R:WEB Suite 4.0|OPEN OFF +')
   SET VAR vWriteLine10 TEXT = ('|KEYWORDS RRBYW15 Invoice')
   WRITE .vWriteLine4
   WRITE .vWriteLine5
   WRITE .vWriteLine6
   WRITE .vWriteLine7
   WRITE .vWriteLine8
   WRITE .vWriteLine9
   WRITE .vWriteLine10
   WRITE 'DISCONNECT'
   WRITE 'EXIT'
   OUTPUT SCREEN
-- Define string to LAUNCH a SILENT SESSION of R:BASE on the Web Server
   SET VAR vLaunch = ('LAUNCH C:\RBTI\RBG76\RBG76EE.EXE|'+.vOutPutFile+'|W')
-- Execute LAUNCH Command with defined parameters
   &vLaunch
-- Delete the unique file from web server
   DELETE .vOutPutFile
   RETURN
-- End here

This traditional stored procedure is now replaced by R:Web Reports 4.0,
R:Web Reports 8.0, R:Web Reports 9.0 (32) and R:Web Reports 9.0 (64).

I hope this gives you some blue's clues ...

Very Best R:egards,

Razzak.

--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE: Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body, place any text to search for.
================================================


Reply via email to