You can use the FTP transport of a proxyservice to poll a certain directory for files. Lets make a simple service which polls for a catalog.txt file on a SFTP server.
First create a proxyservice, PS_PollCatalogFileService for example. Select Messaging Service as Service Type on the general tab.
Check the Text option for the Message Request Type on the Messaging tab.
Leave the Message Response Type on None.
On the Transport Tab, set the Protocol to SFTP and the Endpoint URI to the ftp server on which you want to poll. Make sure the URI looks like ‘sftp://127.0.0.1/poll/catalog’. If your going to use FTP, use the FTP protocol and port 21 (default). We assume you have a running FTP server on the same machine as where the OSB is running.
On the SFTP Transport tab you can select the Authentication method to use for the SFTP server. In our case, we just use the Username Password option. Select here a Service Account which you can create where you select a simple static Username/Password combination. For the Post Read Action we want archive as we want to able to see which files where transfered.
Now it is time to deploy. Make sure your FTP server is running and is reachable from your OSB server…firewalls etc… Now drop a file in the polling directory ftp-root/poll/catalog. If you check the log, there is a good chance you will get an authentication error. This is because you will need to place a known_hosts file on the OSB server in the following directory: /OSB_DOMAIN/osb/transports/sftp/. The transports and sftp directory might not exist yet. If so, create them. The known_hosts file will contain the name, ip, algorithm and public key of the server which you want to make the SFTP connection with. It will have to look like this:
getafix,172.22.52.130 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAtR+M3Z9HFxnKZTx66fZdnQqAHQcF1vQe1+EjJ/HWYtgAnqsn0hMJzqWMatb/u9yFwUpZBirjm3g2I9Qd8VocmeHwoGPhDGfQ5LQ/PPo3esE+CGwdnCOyRCktNHeuKxo4kiCCJ/bph5dRpghCQIvsQvRE3sks+XwQ7Wuswz8pv58=
See here for more details about the known_hosts file and SFTP transport. Once you have the known_hosts file in place, the proxyservice should do it’s thing and grab the file.
Gina
November 25, 2013 at 11:53
I do believe all of the ideas you’ve offered to your post. They’re very
convincing and will definitely work. Nonetheless, the posts are too brief for starters.
Could you please extend them a bit from subsequent time?
Thanks for the post.
Pavan
March 19, 2015 at 08:53
Hi,
Are these the same steps for OSB 12c as well ? Can you please let me know ?
Regards
Pavan
Hugo Hendriks
March 19, 2015 at 09:37
Hi Pavan, I dont know to be honest as I havent made use of it in 12c yet. You can also have a look at MFT in 12c if that could work for you.
Pavan
March 19, 2015 at 09:58
Thanks for immediate reply Hugo. We dont have MFT license, so have to stick with OSB. Trying for workarounds as of now.
Regards
Pavan
Ben Heideveld
October 6, 2015 at 16:06
Dankjewel!
Miguel
October 20, 2016 at 23:31
Hi
How can I specify the from the request? so I’d only need to put the host name on the Transport Configuration tab.
Regards
Miguel
Hugo Hendriks
October 21, 2016 at 10:34
Hi Miguel, in the second picture it shows the MessageType Configuration. There you can specify what comes in….text, xml, binary etc…
Miguel
October 21, 2016 at 20:46
Hi Hugo,
I see that my previous question has a missing part, what I wanted to ask is how to specify the path and filename in the request (I’ll need different files located on different folders).
In the Request of the Message Type Configuration tab, I have XML selected with an xsd file containing the path element. In the Endpoint URI I only have the host name.
Do you have any idea?
Regards,
Miguel