Look in the VANFTP folder (I may have the folder name wrong) in WmEDIforTN for code that retrieves EDI files from an FTP server and submits each to TN for processing. You can either use the services there directly, or copy them to your own package and modify them as needed.
If you don’t want to go this route, make sure you’re dropping all the appropriate work variables in your loop.
#B2B-Integration#Integration-Server-and-ESB#webMethods