Forum Stats

  • 3,872,061 Users
  • 2,266,374 Discussions


How to add fault handling for file adapter??

krishnagopi614 Member Posts: 63

Hi guys I am new to SOA technology ,I have one scenario  in file adapter  ,when file adapter reads a file from directory .If file is there   then read the file  data else it can give user defined exception that  the file is not there .How can i write user defined exception in SOA?? Give me any ideas please.............

Thanks in advance..



  • Use of "SyncRead" in file adapter.. if the file is present, the file would be read.. if the file is not present, then a fault would be thrown.. Catch and handle this fault, the way you want.

  • Hi PuneetRekhade I have to read the records in the file and store in a data base. but When I am taking "Sync-Read" operation in file adapter it is not in "Exposed Service" it is in "External Reference". In "Exposed service" I can get the receive variable where as "External Reference" I can't get the receive variable. what is reason?Can u explain please?...........

  • If you want the file adapter to appear under "Exposed Service", then, edit the file adapter and choose "Read File" as the operation - this would make your file adapter, a polling file adapter and then, the service can receive requests.

    You must read more about "Read File", "SyncRead" operations of file adapter and also, what is meant by "Exposed" and "External" services...

  • Thanks for reply PuneetRekhade                                         Then How can I add Exception Handling to the File Adapter for read operation,because instance is not create when the file adapter doesn't read the  file..

  • Under what circumstances will the adapter not the read file ?

  • If the file in not there in the incoming folder,Then it does not read the file...

  • When do you want to check the file presence ? Understand that it is a POLLING file adapter and most of the times, the adapter will NOT find a file to process.

    You need to tell me the exact scenario.

  • actually in these project 1.I have to read three different types of files (Employee info,Purchase Order Info,Salaes Order Info) through file adapter these records are to be store in  data base transaction table.In these transaction table contains WHO columns and payload  with clob data type which contains each  record  in xml form. 2. Now I have to  take these payload data  which is in xml form and store  in the respective table(employee or PO or SO) .I have to call these in dynamically. can you give me any ideas for these

  • So, you want to (1) Fetch the data from these 3 type of files and (2) Also, store the payload data of the file, which is in XML format, into the same database tables ?

    If this is the requirement.. then, I would say, you could :

    (1) Read files using file adapter, but not as opaque.. Define schemas conforming to the file structures. In that way, you'll always have the file data read in the form of XML.

    (2) Fetch relevant data from such XML payloads of files and insert into database tables. Then, insert the XML payload into WHO column. You might have to convert the xml data into blob/clob before inserting.

    Job done !

This discussion has been closed.