Well, I’m going to take a guess here that this channel has a “From File” source, and the files it’s configured to pick up are the ones you’re attempting to check for with os.fs.glob().
If that’s the case, the reason you’re having issues is that the channel’s “From File” process picks the files up, reads them into the queue, then deletes or moves them (depending on what you’ve configured for the channel) before the filter (or “To Translator” endpoint) logic executes and os.fs.glob() therefore can’t find the file at runtime. Everything seems to work OK when you’re working in the translator editor because the “From File” functionality isn’t active … the Data variable is populated from the Sample Message facility.
If you need to have access to the name of the file when processing it, you’ll need to use a “From Translator” source for your channel and write the code to locate, read, parse, translate, enqueue (or, as in your case, invoke a web service), and dispose of (or archive) the files yourself rather than rely on the “From File” configuration.
Jeff Drumm ◊ VP and COO ◊ HICG, LLC. ◊ http://www.hicgrp.com