The blog provides the commonly asked Oracle SOA File Adapter / FTP Adapter Interview questions & answers to be helpful for beginners and experienced professionals.
1) what is the major difference between File Adapter and FTP Adapter ?
File Adapter integration is useful when performing file operations from /to the local file system.
FTP Adapter integration is useful when performing file operations from /to the remote file system
2) What are the operations provided by File Adapter ?
File Operation Name | File Operation Description |
Read File | Inbound Operation |
Write File | Outbound Operation |
Synchronous Read File | Outbound Operation |
List File | Outbound Operation |
3) What are the operations provided by FTP Adapter ?
FTP Operation Name | FTP Operation Description |
Get File | Inbound Operation |
Put File | Outbound Operation |
Synchronous Get File | Outbound Operation |
List File | Outbound Operation |
4) What are the file formats supported by File Adapter / FTP Adapter ?
The Oracle File and FTP Adapters can read and write the below given file formats
- XML (both XSD- and DTD-based)
- Delimited
- Fixed positional
- Binary data
- COBOL Copybook data
5) Does File Adapter / FTP Adapter supports Native format ?
Yes, File Adapter / FTP Adapter supports native format as opaque objects (such as Jpgs and GIFs) and pass the contents in their original format without performing transformation.
6) Describe the common File Adapter Inbound parameters in the .jca configuration ?
<adapter-config name="fileInboundReference" adapter="file" wsdlLocation="../WSDLs/fileInboundReference.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
<connection-factory UIincludeWildcard="cust*.txt" location="eis/HAFileAdapter"/>
<endpoint-activation portType="Read_ptt" operation="Read">
<activation-spec className="oracle.tip.adapter.file.inbound.FileActivationSpec">
<property name="PhysicalDirectory" value="C:\tmp"/>
<property name="UseHeaders" value="false"/>
<property name="MinimumAge" value="0"/>
<property name="Recursive" value="true"/>
<property name="PollingFrequency" value="60"/>
<property name="DeleteFile" value="true"/>
<property name="IncludeFiles" value="cust.*\.txt"/>
</activation-spec>
</endpoint-activation>
</adapter-config>
7) How single Threaded Model is supported in File Adapter / FTP Adapter ?
The File /FYP Adapter used the global pool of processor for executing file processing. The single Threaded Model modifies thread execution by not using the default pool processor and allows poller thread to process the file in the single running thread. The below configuration can be updated in the File / FTP Adapter .JCA file.
<activation-spec className="oracle.tip.adapter.file.inbound.FileActivationSpec">
<property../>
<property name="SingleThreadModel" value="true"/>
<property../>
</activation-spec>
8) How Partitioned Threaded Model is supported in File Adapter / FTP Adapter ?
The partitioned thread model is the modified thread model which allows each composite application to use in-memory queue in the partitioned form. The below configuration can be updated in the File / FTP Adapter .JCA file.
<activation-spec
className="oracle.tip.adapter.file.inbound.FileActivationSpec">
<property../>
<property name="ThreadCount" value="4"/>
<property../>
</activation-spec>
9) What are the available File Polling Options ?
The Oracle File / FTP Adapter provides the below polling configurations
- Polling Frequency: Define the time after which File / FTP Adapter check for polling the file.
- Minimum File Age : The Oracle File / FTP Adapter reads the file which are older than the minimum age value (determined by the last modified time stamp) in the directory. This option is useful when large file which take 3-4 mins to be copied are to be polled for processing . In that case, Minimum file Age is to be set as 5 mins so that such files can be read without failure.
- Use Trigger File: The Oracle File / FTP Adapter starts file polling when specified file is available in the local or remote file system.
Consider an example where BPEL Process1 writes the file into the directory and BPEL Process2 read those files for processing. In this case, trigger file option could be useful.
10) what is the difference between Physical Directory and Logical Directory in File / FTP Adapter processing ?
Physical Directory Path:
1. requires the full directory path from where the file is to be picked for polling.
2. requires manual change in the directory path when deployed to different environments.
Logical Directory Path:
- can provide logical name and path value in the composite.xml
- logical path can be change from em console.
- can replace the logical path in case of deployment to different environment using Config plan.
11) What is the difference between Read and Sync Read operation
in File / FTP Adapter processing ?
Read Operation: The File /FTP Adapter uses Read operation for polling the file to read its content.
Sync Read Operation: The File /FTP Adapter uses SyncRead operation to read the file in between the flow when requires to perform Synchronous communication
12) Does File Adapter / FTP Adapter supports polling from multiple directory ?
Yes, polling from multiple directories is supported by File / FTP Adapter in a single activation for both Physical and Logical Directory Path. The multiple directory can be set during design time using JDeveloper.
13) Is File Adapter / FTP Adapter transactional and non-transactional adapters ?
Transactional Adapters: Database Adapter, JMS Adapter, AQ Adapter, MQ Adapter
Non- Transactional Adapters: File Adapter, FTP Adapter
14) what is File Debatching Process in File / FTP Adapter ?
The File / FTP Adapter allows to read multiple messages in a file using Debatching which provides the option to to publish messages in a specific number of batches.
During Debatching, the file reader, on restart, proceeds from where it left off in the previous run, thereby avoiding duplicate messages.
16) Can we append to existing file using File / FTP Adapter ?
Yes.
16) File / FTP Adapter allow to read the file without reading its content?
Yes, File / FTP Adapter provides the option for the Read operation.
Select Operation: Read
Select Check box: Do not read the file content
17) What Inbound Header metadata is published by File Adapter in the Inbound Service ?
The File Adapter publishes the below given inbound metadata as part of Inbound Header
File Adapter Inbound Header | Inbound Header Description |
jca.file.FileName | name of the file |
jca.file.Directory | directory name for the file |
jca.file.Batch | indicates unique batch name in case of debatching |
jca.file.BatchIndex | indicates batch index for each message within the batch for debatching |
jca.file.Size | size of the file |
jca.file.LastModifiedTime | last modified time for the file |
18) Provide the steps to specify the dynamic outbound directory name ?
- Create the File Adapter Read operation using the Adapter Wizard in JDeveloper
- Provide the Physical Directory name as C:\ReadFileDir
- Double-Click Invoke Activity
- Select Browse Variables -> Variable Choose Dialog
- Select Create an Object icon
- Create Variable newOutboundDir, type xsd:string
- Now drop Assign Activity between Receive and Invoke Activity
- Perform Copy Operation, Select Expression and set the value as C:\ReadFileOutDir
- Now Select Invoke Activity -> Properties
- Select jca.file.Directory and set value as newOutboundDir and Type as input
19) Provide the steps to specify the dynamic outbound file name ?
- Create the File Adapter Read operation using the Adapter Wizard in JDeveloper
- Provide the Physical Directory name as C:\ReadFileDir
- Double-Click Invoke Activity
- Select Browse Variables -> Variable Choose Dialog
- Select Create an Object icon
- Create Variable newOutFileName, type xsd:string
- Now drop Assign Activity between Receive and Invoke Activity
- Perform Copy Operation, Select Expression and set the value as customer.txt
- Now Select Invoke Activity -> Properties
- Select jca.file.Directory and set value as newOutFileNameand Type as input
20) Does Debatching support native format and XML ?
Yes , debatching support boith XML and native format for multiple message processing.
21) What is ChunkedRead feature in File / FTP Adapter?
The File / FTP Adapter allows processing of large files using the ChunkedRead feature which uses an invoke activity within a while loop to process the target file. File processing using ChunkedRead does not throw an exception in case of Invalid Payload and the return header contains the translation exception message indicating the line and column where error is encountered in the below given header fields
- jca.file.IsMessageRejected
- jca.file.RejectionReason
- jca.file.NoDataFound
22) Explain UseStaging property in File Adapter / FTP adapter?
The UseStaging property can be set in the File Adapter / FTP Adapter .JCA File.
If UseStaging property set to true, then
- The Oracle outbound File Adapter / FTP Adapter writes data to staging file.
- Streams the Staging File data to the Target File
If UseStaging property set to false, then outbound File Adpater / FTP Adpater does not use staging and transfers the file from source file location to target file location