XWBP62 ;OIFO-Oakland/RD - Test routine for patch 62 ;05/17/2002 17:41
;;1.1;RPC BROKER;**62**;Mar 21, 2002;Build 13
;Per VHA Directive 6402, this routine should not be modified
Q
EN ;send XML message to test M2M Broker
N ADD,PARMS,PORT,MESS,TST,X
;get address and port of listener
W !!,"This routine will attempt to send an XML message to the M2M Broker."
W !,"You will need to IP Address and Port number for the M2M Broker."
R !,"IP Address: ",ADD:300 Q:ADD="^"!(ADD="")
R !,"Port Number: ",PORT:300 Q:PORT="^"!(PORT="")
;Set up arrays for connection and message
S PARMS("ADDRESS")=ADD,PARMS("PORT")=PORT,PARMS("RETRIES")=3
S PARMS("RESULTS")="MESS",PARMS("REQUEST")="TST"
S TST(1)="<?xml version=""1.0"" encoding=""utf-8"" ?>"
S TST(2)="<vistalink type=""Gov.VA.Med.RPC.Request"" mode=""RPCBroker"" >"
S TST(3)="<rpc uri=""XUS DIVISION GET"" >"
S TST(4)="<session>"
S TST(5)="<duz value=""1"" />"
S TST(6)="<security>"
S TST(7)="<token value=""AAA"" />"
S TST(8)="</security>"
S TST(9)="</session>"
S TST(10)="</rpc>"
S TST(11)="</vistalink>"
;connect to server
I '$$OPEN^XWBRL(.PARMS) U IO W !!,"Couldn't open port",! Q
S X=$$EXECUTE^XWBVLC(.PARMS)
DO CLOSE^%ZISTCP
U IO W !!
ZW MESS
Q
XWBP62 ;OIFO-Oakland/RD - Test routine for patch 62 ;05/17/2002 17:41
+1 ;;1.1;RPC BROKER;**62**;Mar 21, 2002;Build 13
+2 ;Per VHA Directive 6402, this routine should not be modified
+3 QUIT
EN ;send XML message to test M2M Broker
+1 NEW ADD,PARMS,PORT,MESS,TST,X
+2 ;get address and port of listener
+3 WRITE !!,"This routine will attempt to send an XML message to the M2M Broker."
+4 WRITE !,"You will need to IP Address and Port number for the M2M Broker."
+5 READ !,"IP Address: ",ADD:300
IF ADD="^"!(ADD="")
QUIT
+6 READ !,"Port Number: ",PORT:300
IF PORT="^"!(PORT="")
QUIT
+7 ;Set up arrays for connection and message
+8 SET PARMS("ADDRESS")=ADD
SET PARMS("PORT")=PORT
SET PARMS("RETRIES")=3
+9 SET PARMS("RESULTS")="MESS"
SET PARMS("REQUEST")="TST"
+10 SET TST(1)="<?xml version=""1.0"" encoding=""utf-8"" ?>"
+11 SET TST(2)="<vistalink type=""Gov.VA.Med.RPC.Request"" mode=""RPCBroker"" >"
+12 SET TST(3)="<rpc uri=""XUS DIVISION GET"" >"
+13 SET TST(4)="<session>"
+14 SET TST(5)="<duz value=""1"" />"
+15 SET TST(6)="<security>"
+16 SET TST(7)="<token value=""AAA"" />"
+17 SET TST(8)="</security>"
+18 SET TST(9)="</session>"
+19 SET TST(10)="</rpc>"
+20 SET TST(11)="</vistalink>"
+21 ;connect to server
+22 IF '$$OPEN^XWBRL(.PARMS)
USE IO
WRITE !!,"Couldn't open port",!
QUIT
+23 SET X=$$EXECUTE^XWBVLC(.PARMS)
+24 DO CLOSE^%ZISTCP
+25 USE IO
WRITE !!
+26
*** ERROR ***
+27 QUIT