Saturday, 14 December 2013

Implementing FTP Put in Oracle Soa 11g




Hi Guys

 lets discuss How to write a file through FTP read Using FTP in my previous Post.
Continues  to the FTP Read post


How to create a BPEL process using an FTP Adapter service

1. Navigate to the “Component Palette” and select “Services” option. Services palette enlists all the services options available which can be used to invoke another service or system using either partner links or Adapters.

2. Now drag the “FTP Adapter” and drop it in the Reference swim-lane of the BPEL process, an Adapter Configuration Wizard appears. Click next to go the next window. In step 1, specify a desired name to the adapter and then click next to go the next window



3.In Step 2, specify the JNDI name of the FTP Server.
The JNDI name of a resource and the name of the resource reference are not the same. This approach to naming requires mapping of the two names before deployment, but it also decouples components from resources. Because of this decoupling, if at a later time the component needs to access a different resource, you don't have to change the name in the code.
(Read “How to configure the JNDI in Application server console” at the end of
the section)
After specifying all the required information, click next to go to the next window

4 .In the next step, select the operation as per requirement to create FTP adapter for. Select the radio button “Put” to create an adapter to read a file and click next to go to the next window. In FTP Adapter, an additional operation is also supported where the user can select if the file is of ascii type or binary type. The user can select the radio button”Ascii” if the file is of ascii type, else select the radio button “Binary” as per the requirement.




  5. In the next step, specify the path of the incoming file.
Location of the path can be specified in two ways 1) Physical path and 2) Logical path.
Physical path is the absolute location of the file where it is located. This specified directory should be accessible to the server.
Logical path is the location of the file relative to the current location of the file adapter on server.
Default option is “Physical path”





File Naming Convention (PO_%SEQ%.txt) specifies pattern for writing  file
for example :Sample_%SEQ%.xml

files will be written 
Sample_1.xml
Sample_2.xml
Sample_3.xml
Sample_4.xml  ...............



6.  In the next Step, specify the name of the file from where the data need to be retrieved.
File names can be specified using two options, 1) File Wildcards and 2) Regular Expressions.
“File Wildcards” allows user to specify file having a similar naming pattern like po*.txt where * can be replaced by any character or digit or symbol.; whereas “Regular Expressions” can be used for normal search where in it searches for the file having similar string pattern.

User can also specify the naming pattern of the files which needs to be excluded (if any) from the reading operation.

“Files contain multiple Messages” can be checked if the incoming file is expected to have more than one message. Number of messages needs to be retrieved in batches if the incoming file having multiple messages can also be specified. Default number is “1”





6.The next window prompts to select a schema format for the data to be retrieved.
Select a schema which already exists in the project (if any) or create a new schema format using a sample data file. Click next to go to the next window. 



Click “Finish”. Click “Apply” and “OK” on the “Create partner link” window to end the process of creating an adapter





We are Ready to Write File  to FTP ,Deploy and test your service


HappyLearning



                                                                                                                                                 By DeepthiReddy

No comments:

Post a Comment