Does the web server from which you are downloading require a login? If so, you'll need to authenticate first before fetching the file. This can be complicated to set up.
In the one such job I've managed to get working, I had to point a tFileFetch at the website's login URL, select POST method, supply user_id and password as Parameters, save the resulting cookie, and specify the full path and filename for the cookie file (not just the directory, as the field name implies). Then I used additional tFileFetch components to retrieve files, making sure to check Read Cookie, and specifying the cookie file generated by the first component.
Working out the exact sequence required the use of Fiddler to read the underlying http calls for the POST parameters. (
http://www.telerik.com/fiddler)
Hi, After following the method inscribed in the web link, my CSV comes out in HTML format. I don't know the reason being. Please provide assistance. Thanks,
I tried tfilefetch component for a file which doesn't needs authentication, but still its giving error while executing. Please find below the error I'm getting.
Exception in component tFileFetch_1
java.net.SocketTimeoutException: connect timed out
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)
at nikhil.download_file_0_1.Download_file$1SocketFactory_tFileFetch_1.createSocket(Download_file.java:396)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:386)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
[statistics] disconnected
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
at nikhil.download_file_0_1.Download_file.tFileFetch_1Process(Download_file.java:452)
at nikhil.download_file_0_1.Download_file.runJobInTOS(Download_file.java:812)
at nikhil.download_file_0_1.Download_file.main(Download_file.java:669)
I tried increasing timeout limit in advanced settings but error remains the same.
Please suggest something or a working example would be a great help.