Using a file polling listener port, I need to get the filename and directory in my processing service.
I don’t know how to get those informations since the only input parameter of a processing service for a file polling port is ffData or xmlData.
Thanks for your help
You can write a Java service which can read the directory structure and file name.
I have the same problem I’m using a file polling listner Port, but my processing service is a publish service
when the file request.xml arrive in monitoring directory
this service will be invoked
but the problem is when the file arrive it’s clean up automatically before being published
and I have this error in the log file:
Error processing service: [FPL.0002.0004] Server Error: [ISS.0086.9020] C:\Program Files\webMethods6\IntegrationServer\Fichier\request.xml does not exist
any sugestion !
In addition to “ffdata”, the File Poller has two undocumented parameters which can be accessed by the processing service. “originalFileName” is the full name of the file polled - effectively Monitoring Directory + File Name. “fileName” is the full unique name of the renamed file which exists in the Working Directory when the service is invoked. (This can be seen in the server log at V2 logging level.) When the service completes, the File Poller moves the file to either the Completion or Error Directory (depending on the exit status), giving it a different unique name. So, during execution, the service could access the file by “fileName”, although I don’t know what would happen if it moved that file elsewhere - the File Poller might get upset.
You can use pub.flow:getTransportInfo to get filename and other related info depending on how the file is coming to you (ftp, http, smtp).
Thanks all for your help. I’ve got now all informations needed to complete my implementation !