|
在客户端安装LR8.0,TUXDEO8.1客户端,并设置好环境变量:
COBCPY=$TUXDIR\cobinclude
FIELDTBLS32=000000.fml,cpagd.fml
FLDTBLDIR32=C:\bea\tuxedo8.1\etc
LD_LIBRARY_PATH=C:\bea\tuxedo8.1\lib
LIB=C:\bea\tuxedo8.1\lib
Path=C:\bea\tuxedo8.1\bin
TUXDIR=C:\bea\tuxedo8.1
ULOGPFX=c:\log\ULOG
WSNADDR=//192.168.1.242:6689
在LR编写脚本实现从客户端向后台服务器发送请求,如下:
#include "lrt.h"
Action()
{
FBFR32 *data_0, *data_1;
long olen_2;
long in_leng;
int tpresult_int;
lrt_tuxputenv("WSNADDR=//10.245.10.102:6689");
data_0 = (FBFR32 *)lrt_tpalloc("FML32", NULL, 1024);
data_1 = (FBFR32 *)lrt_tpalloc("FML32", NULL, 1024);
lrt_Finitialize32((FBFR32 *)data_0);
lrt_Finitialize32((FBFR32 *)data_1);
lrt_Fadd32_fld((FBFR32 *)data_0,"name=S_INST_ID","value={user}",LRT_END_OF_PARMS);
lrt_Fadd32_fld((FBFR32 *)data_0,"name=S_TRAN_CD","value=842001",LRT_END_OF_PARMS);
tpresult_int = lrt_tpcall("simpserv", (char *)data_0, sizeof((char *)data_0), (char **)&data_1, &olen_2, 0);
lr_output_message("CALL:%d",tpresult_int);
//lrt_tpabort(0);
//lrt_tpcommit(0);
lr_output_message("Call:%d", tpresult_int);
lrt_tpfree((char *)data_0);
lrt_tpterm();
lrt_abort_on_error();
return 0;
}
因为LR8.0只是支持TUXDEO6.0\7.0,没有支持8.1的,所以运行时报错:
错误:Failed to load TUXEDO library
不知道大家对这种问题怎么解决,要不找个支持TUXDEO8.1的LR,要不把这个错误想什么办法解决? |
|