Integration Server 10.3 | Built-In Services Reference Guide | Client Folder | Summary of Elements in this Folder | pub.client.ftp:put
 
pub.client.ftp:put
WmPublic. Transfers a file to a remote FTP server. (This service corresponds to the standard FTP command put.)
Input Parameters
sessionkey
String Unique key for the current FTP session. The sessionkey is returned by the pub.client.ftp:login service.
transfermode
String FTP file transfer mode (ascii or binary). The default is ascii.
content
java.io.InputStream, byte[ ], or String Data to be transferred to the remote file.
localfile
String Optional. Name of the local file to be appended to the remote file. Used only if content is not specified.
remotefile
String The name of the remote file.
putunique
String Optional. Indicates whether to send a STOR or a STOU (Store as Unique File) command to the remote FTP server. Set to:
*true to send a STOU (Store as Unique File) command.
*false to send a STOR command. This is the default.
Output Parameters
returncode
String Standard FTP protocol return code.
returnmsg
String Standard FTP protocol return message.
logmsg
String FTP log messages for the entire user session.
Usage Notes
*Some FTP servers, such as the Integration Server FTP Listener, do not support "putting" a unique file. When using the pub.client.ftp:put or pub.client.ftp:mput service to put a unique file to an FTP server that does not support putting a unique file, you will encounter an error like this one:
com.wm.app.b2b.server.ServiceException: 500 'STOU': command not understood.
*When a client invokes this service to transport a file, the FTP listener determines the content handler to use based on the file's extension. The content handler converts the file content to the input values for the service to invoke. The Integration Server_directory \instances\instance_name\lib\mime.types file contains the mappings of file extension to content type.
By default, if this service encounters a file that has no file extension, the default content handler is used. To override this, you can configure any content handler to handle files that have no file extension. To do this, add a line in the Integration Server_directory \instances\instance_name\lib\mime.types file that specifies the content type of the files with no extension, and the ftp_no_extension key. For example, to allow a content handler to accept text/xml files that have no extension, add this line to your mime.types file:
text/xml ftp_no_extension