What is driving the desire to put all files into a single folder?
Here are reasons to not do that:
- Mingling of different types of files from different partners/applications can lead to mishandling of data/files.
- The code to determine the type of file is more complex.
- Cannot suspend processing for just one type of file/integration. It is all or nothing.
That said, you can potentially do document recognition by examining the first 100 to 1000 bytes of the file. Open the file as stream and read however many bytes to get to data that you can use to determine the document type. Then you can close and reopen the file and process it with the right document type in the node to doc call.
#Integration-Server-and-ESB#webMethods#Flow-and-Java-services