on 05-19-2010 9:54 AM
Hello,
We have to collect the actual exchange rates from the European Central Bank every day. The link for the file is http://www.ecb.int/stats/eurofxref/eurofxref.zip?
Is there a possibility to download the file automatically to the PI system? The next steps (unzip, map to SAP IDoc) are already working fine but the download of the file is still manual work.
Thanks in advance!
Chris
1) You can write OS script to download the file as suggested in /people/michal.krawczyk2/blog/2010/01/22/pixi-how-to-get-an-xml-file-from-a-web-page-without-own-development if it helps.
2) or create a dummy ineterface with java mapping inside to download the file and use ATP for scheduling the channel for this interface on daily basis.
Regards,
Sunil Chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi try this UDF code in message mapping, this code will work for you to read data from Web Site.
i have used same code one year back to read data from my partner website as a xml file.
AbstractTrace trace = container.getTrace();
String var1 = null;
try{
URL url = new URL("http://www.ecb.int/stats/eurofxref/eurofxref.zip?");
URLConnection uc = url.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(uc.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null) {
if (inputLine.indexOf(" <cb:value") != -1) {
var1= (inputLine.substring(inputLine.indexOf('>')+1,inputLine.indexOf('<',2)));
}
}
in.close();
}
catch(Exception e) {
trace.addInfo(e.getMessage());
}
result.addValue(var1);
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raj,
Could you please help me how to use this code given by you in the mapping and how would be the directory steps... I have been struggling with the same scenario but i am unable to do it. I am working with the basis to get the AXIS adapter installation (some components are missing). . it would be great if you can guide me on this issue asap....
thank you....
Yash
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.