Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…

Topic-icon Question Download a document from a website automatically

More
25 Apr 2016 11:45 - 25 Apr 2016 11:46 #1 by Afaf ABOUTABIT
Download a document from a website automatically was created by Afaf ABOUTABIT
Hello everyone,

I need to integrate some data based on a document that I have to download every month from a website.
I'd like to develop a process that would do the work for me automaticaly, a process that goes to the website page and download the document and put it is a specified path. is that even possible with stambia ?

Thank you !
Last edit: 25 Apr 2016 11:46 by Afaf ABOUTABIT.
More
26 Apr 2016 13:51 #2 by Thomas BLETON
Replied by Thomas BLETON on topic Download a document from a website automatically
Hi,
Maybe you can use this sample process to achieve this.

This message has an attachment file.
Please log in or register to see it.

More
31 Oct 2018 16:43 #3 by NORAUTO_LESQUIN
Replied by NORAUTO_LESQUIN on topic Download a document from a website automatically
This process does not work.
I have error "Connection timeout".
Does it need a configuration of delivery ?
More
31 Oct 2018 16:49 #4 by Thomas BLETON
Replied by Thomas BLETON on topic Download a document from a website automatically
Hi,
This process *works* :-) I just tested it again successfully.
My parameters :
- url: www.insee.fr/en/statistiques/serie/telec...eFin=3&anneeFin=2018
- localPath: d:/temp/result.zip

I suppose the download you are trying to achieve may have something particular. For example : proxy connection required ? authentication required ?
Please provide more details so that we can help you ;-)
More
31 Oct 2018 17:13 #5 by NORAUTO_LESQUIN
Replied by NORAUTO_LESQUIN on topic Download a document from a website automatically
Hi,
I can see file's content when i use my browser, without identification.
It is a XML file.

I try the process with your parameters, but i have this error:
"
javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped java.net.ConnectException: Connection timed out: connect (<Unknown source>#40) in <Unknown source> at line number 40
at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:224)
at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:240)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
at com.indy.engine.actionCodes.ScriptingActionCodeI.executeCodewithRSet(SourceFile:159)
at com.indy.engine.actionCodes.ScriptingActionCodeI.executeSimpleCode(SourceFile:331)
at com.indy.engine.action.common.ActionCodeTypeI.executeCode(SourceFile:1693)
at com.indy.engine.action.common.ActionCodeTypeI.run(SourceFile:1852)
at java.lang.Thread.run(Thread.java:745)
"

Is it a problem with my runtime or our network ?

Thanks
More
31 Oct 2018 17:31 - 31 Oct 2018 17:33 #6 by Thomas BLETON
Replied by Thomas BLETON on topic Download a document from a website automatically
Probably something related to your network configuration.
Note : the Runtime does not inherit from your browser proxy settings, so maybe you need to provide proxy settings in the process.
Note2 : this sample process was quickly developed for a single use case, and does not cover all network possibilities. Feel free to tweak the process to fit your needs.
Last edit: 31 Oct 2018 17:33 by Thomas BLETON.
More
31 Oct 2018 17:50 - 31 Oct 2018 17:50 #7 by NORAUTO_LESQUIN
Replied by NORAUTO_LESQUIN on topic Download a document from a website automatically
Thanks, i will check it with ours network administrators.

To solve this problem quickly, i use Windows commands bitsadmin for downloading the file:
bitsadmin /transfer wcb /priority high http://sitexxxx-/products.xml D:\monxml.test
Last edit: 31 Oct 2018 17:50 by NORAUTO_LESQUIN.