This sample service invokes the FTP put and get commands. The service reads a file and places it on the specified FTP server. The FTP get command is issued after a short pause and the file contents are written back to the local storage. 
  
 
	 
 
	 Prerequisites
 
		Copy the 
		  ftp_put_file.log file included in this sample to the 
		  c:\tmp directory. If the directory is not available, see the steps listed in the 
		  Understanding the Configuration section. 
		
 
		Ensure that the following FTP server information is available: 
		
 
		 
		  - FTP server name or IP address 
		  
- FTP server port (default is 21) 
		  
- FTP username 
		  
- FTP user password 
		  
Procedure
-  
		  In the 
			 samples directory, select 
			  and double-click 
			 tibco.bw.sample.palette.ftp.PutAndGet. For more information, see 
			 Accessing Samples . 
		   
		
-  
		  In 
			 Project Explorer expand the 
			 tibco.bw.sample.palette.ftp.PutAndGet project. 
		   
		
-  
		  Set the default 
			 ApplicationProfile to match the OS you are running on. For more information, see 
			 Setting the Default Application Profile. 
		   
		
-  
		  Copy the 
			 ftp_put_file.log file to 
			 c:\tmp. 
		   
		
-  
		  Fully expand the 
			 Resources directory and then double-click 
			 FTPConnectionResource.ftpResource. Specify valid values for your FTP connection in the 
			 Host, 
			 Port, 
			 User Name, and 
			 Password fields. Click 
			 Test Connection to verify your FTP connection. 
		   
		   
		
-  
		  Click 
			 . 
		   
		
-  
		  Fully expand the 
			 Processes directory and double-click 
			 FTP_Put_and_Get.bwp. 
		   
		
-  
		  Click 
			 . 
		   
		
-  
		  At left hand tree of 
			 Debug Configuration wizard, expand 
			 BusinessWorks Application and select 
			 BWApplication. 
		   
		
-  
		  Click theApplications tab and then click the 
			 Deselect All button if you have multiple applications. Select the check box next to 
			 tibco.bw.sample.palette.ftp.PutAndGet.application. 
		   
		
-  
		  Click 
			 Debug. 
		   
		  This runs the sample in Debug mode. 
		   
-  
		  Monitor the log/trace and after a minute, verify whether the 
			 PutAndGet.log file has been created at 
			 c:\tmp\PutAndGet. 
		   
		
-  
		  Click the 
			 Terminate 
			  icon to stop the process. icon to stop the process.
Result
 
		 
		  - The file specified by the module property 
			 BW_ftp_put_file is copied to the FTP server. 
		  
- The file specified by the module property 
			 BW_ftp_get_file is written to 
			 c:\tmp\PutAndGet by the FTP server. The default name is 
			 PutAndGet.log. 
		  
Understanding the Configuration
 
		 
		The sample project has default values for the file names. You can change the defaults, if needed for your environment. 
		
 
		 
		  - Under 
			 Module Descriptors, click the configuration file. 
		  
- Modify 
			 BW_ftp_put_file to point to the input file. 
		  
-  Modify 
			 BW_ftp_get_file to point to the output file that is written to on disk. 
		  
Copyright © Cloud Software Group, Inc. All rights reserved.