Hi all,
i need a solution for the following task:
in our Progress Application, we create xml-messages which we send to the ESB, where a process uses those messages and stores the XML file on a FTP server using the FTPconnector ESB service. To achieve this, the 4gl Application sets the Message properties ftpFilename and ftpDirectory. This works like a charm.
The problem is, that there are binary files in the filesystem that belong to those xml messages, and we need to transfer those binary files as well.
My solution to this would be to set up a File Pickup service. But so far i have only used the Filepickup service in a polling scenario.
So the question is: How can I tell a filepickup service that I want to pickup a given file? Is there a way to send the service a message and specify the Filename to pickup inside the message or in some kind of Filename-Property...?
Any help greatly appreciated!
Regards,
Mike
This can be done. The File Pickup Service has two modes: Polling and Request (look at the Workbench Help for this in Workbench or at http://communities.progress.com/infocenter/topic/com.sonicsw.doc/ESB/file_services/file_pick_up_service.htm). There are a variety of samples there (e.g. The Binary File transfer sample - http://communities.progress.com/infocenter/topic/com.sonicsw.doc/ESB/file_services/examining_binary_sample.htm) that pickup a file as a step in the itinerary.
The trick here is to use a 'dynamically' generated configuration document. I mean, instead of using an external (fixed) config doc, you configure the File Pickup service
step to get the configuration from within a particular message part.
So, for example, prior to the File Pickup step in the itenaray, you can use a XML transform step ( using message header extentions) to build the configuration file.
If you have the filename and directory in message headers, you can use the stylesheet extension funtions to retrieve these.