Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have an API with parameter.
URI: "https://mysite.com/payment/query?"
There is parameter "load" which contain request. Currently i am loading the parameter value from txt file as below screenshot. But my problem is i have "<Period from='2019-02-15 00:00:00' to='2019-02-15 23:59:59'/>" in my request file, and this will everyday.
my param file contain:
load=<?xml version='1.0' encoding='UTF-8'?><Request version='1.0'><Header><Security sender='xxxxxxxxxxxxxxxxxxxx' type='PSP'/></Header><Query mode='CONNECTOR_TEST' level='CHANNEL' entity='xxxxxxxxxxxxxxx' type='STANDARD'><User login='xxxxxxxx' pwd='xxxxxxx' /><Period from='2019-02-04 00:00:00' to='2019-02-04 23:59:59'/><Types><Type code='DB'/><Type code='RF'/></Types><ProcessingResult>ACK</ProcessingResult></Query></Request>
Please advise.
Thanks
Hi,
Thank you, i added tJava, added code and finally the whole request is formatted with date, and then write to a file in specific location. So now i will read same file with tHttpRequest.
The issue is file write take a small amount of time, and then it finishes, tHttpRequest give error C:\Users\myuser\Desktop\param.txt (The system cannot find the file specified).
using below code to write a file in tJava
mainText= String.format(mainText,frmDate,toDate);
File newTextFile = new File("C:/Users/myuser/Desktop/param.txt");
FileWriter fw = new FileWriter(newTextFile);
fw.write(mainText);
fw.close();
I even tried the Thread.sleep but not helpful, also tried Trigger for OnSubJobOK.
Any advise?
Finally it is like below. in tJava i am making a file with date. and then passing that to tHttpRequest.
Thank You @uganesh