How to confirm the transmission will depend on the communication protocol you use.
If you are using the FTP services, one approach is this:
- Login to the FTP server.
- Put the file to the server, using a unique name to avoid filename conflicts. Also, use a file extension that the FTP server side treats as “in progress” such as .tmp.
- Once you finish sending the file contents (use streams to avoid loading the entire file into memory) rename the file to change or remove the .tmp extension. This indicates that the file is complete and ready to be picked up. This works because renames, even in FTP sessions, are atomic operations. They either succeed or fail and if they succeed, the file is good to go.
- Check for errors at each step (login, put, rename, etc.). If all steps work, then you’ve successfully and completely sent the file.
As an alternative to using a file extension, the FTP server can provide a “work” directory. You put the file to that directory and when finished, rename the file to move it to the desired directory for pickup. Renames can move a file too, without trouble (as long as the directories are on the same drive).
Hope this helps.
#Integration-Server-and-ESB#webMethods#webmethods-Protocol-and-Transport