Siebel Unleashed
March 11, 2010, 10:32:40 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Forum Rules ; Using Notify Flag
 
   Home   Help Members Login Register  
Pages: [1]
  Print  
Author Topic: How to read multiple xmls files in a directory  (Read 349 times)
jothiprasads
Newbie
*

Reputation 3
Offline Offline

Siebel Area: Siebel CRM
Siebel Version: 7.8.2
Posts: 2


View Profile Email
« on: December 04, 2009, 09:32:42 AM »

Hi All,

I have a requirement in my Interface, an external system which creates XML files in a specific directory. But the names of the XML files are not standard saying the file names will be like ExternalSystemName+"_"+TimestampoffileCreated.xml, for example ABC_120420091000.xml,ABC_120420090800.xml..

Is there any way in siebel to search the directory for *.xml files and then process each xml files one by one.. I know we can use EAI XML Read From file or some other business service to read a file... but all these Business service needs file names as input.

Appreciate your inputs and direction on this issue.

Thanks
Prasad
Logged
jothiprasads
Newbie
*

Reputation 3
Offline Offline

Siebel Area: Siebel CRM
Siebel Version: 7.8.2
Posts: 2


View Profile Email
« Reply #1 on: December 04, 2009, 10:30:55 AM »

Hi Friends,

I got an input from oracle support on this issue. we can use Clib.System to write the names of directory in a text file and the read te file to get the names one by one and process the xmls. Here is a code to write txt file.

On the first part of the resolution the engineer recommends the usage of Clib.system to create a file. The example there refer to a DOS command, but I would suggest you try “ls –t” and send it to the mentioned file.

function WebApplet_PreInvokeMethod (MethodName)
{
if (MethodName == "Clib")
{
Clib.system("ls -t > order.txt");
return (CancelOperation);
}
else
{
return (ContinueOperation);
}
}

Thanks
Prasad
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Theme by m3talc0re.com  |  Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!