Request for information - WeOnlyDo Discussion board

Request for information (wodWebServer / wodWebServer.NET)

by ludo, Wednesday, October 08, 2008, 08:46 (5889 days ago)

Hello,

I would like to know if this tool could answer my expectations :
- Connection to websites ( http or https protocols) for which i know the login and password

- File download (permanent url or simulation of user action click on a webpage)

- File upload (same as previously)


Thanks.

Best regards.

Re: Request for information

by woddrazen, Wednesday, October 08, 2008, 10:53 (5889 days ago) @ ludo

Hi Ludovic,


Yes you can do that all using wodHttpDLX. Did you maybe check wodHttpDLX samples that in included in installation?

You can find it in component Samples folder when you install wodHttpDLX. Maybe they can help you to start developing with wodHttpDLX.

Let us know how it goes.


Regards,
Drazen

Re: Request for information

by Ludo, Thursday, October 09, 2008, 08:30 (5888 days ago) @ woddrazen

Hi and thank you to your answer.

I have downloaded the tool but the VB script sample is too basic, it doesn't help me to develop my application.

Have you a small exemple for my request ? a script that connects to an HTTPS site and download a file and send an other file.

Best regards.

Re: Request for information

by wodDamir, Thursday, October 09, 2008, 09:23 (5888 days ago) @ Ludo

Ludo,

For downloading, all you need to do is set Filenane property of response object to point to some file on hard-drive:

[code]wodHttp1.Response.Filename = C:weonlydo.jpg
wodHttp1.Get http://www.weonlydo.com/Images/weonlydo.gif [/code]

The above code will download the image to C: .

As for upload, I assume you mean form-based upload. For that, you can use something like this:

[code]wodHttp1.URL = http://www.weonlydo.com/HttpDLX/Demo/TestFormUpload.asp

wodHttp1.Request.FormUpload.Add Name , Text2.Text
wodHttp1.Request.FormUpload.AddFile TheFile , Text1.Text
wodHttp1.Post[/code]

In this code snippet, first parameter of .Add methods are Names of intpu fields, while second parameter is value that is sent (just as if you would type them in browser.

You can even see this form on the following URL: http://www.weonlydo.com/HttpDLX/Demo/TestFormUpload.htm

Hope this helps.

Regards,
Damba

Re: Request for information

by Ludo, Friday, October 10, 2008, 08:52 (5887 days ago) @ wodDamir

I have written this code but i have an error The current connection has been aborted by the network or intermediate services.

[image]


[code]
Option Explicit
Dim http1, path
Set http1 = WScript.CreateObject( WeOnlyDo.wodHttpDLXCom.1 , wod_ )
path = Left(WScript.ScriptFullName,(Len(WScript.ScriptFullName) - (Len(WScript.ScriptName) + 1)))

'http1.ProxyType = ProxyWEBStandard
http1.ProxyType = 3
http1.ProxyHostname = 0.0.0.0
http1.ProxyPort = 80

http1.URL = http://edw.morningstar.com/login.aspx
http1.Request.FormPost.Add email , email@email.com
http1.Request.FormPost.Add password , password

'http1.Request.FormPost.Add Submit= ,


'Envoi de la requette POST avec ses parametres
http1.Post


'RECUP FICHIER
'http1.Blocking = 1
http1.Response.Filename = C:Program FilesWeOnlyDo.ComHttpDLXSamplesVBSPerformance_BAS.zip

http1.Get http://edw.morningstar.com/download.aspx?action=media&currency=BAS
'WScript.Echo http1.Response.Body

If http1.LastError <> 0 Then
MsgBox Unsuccessful Error: & http1.LastError
End If

[/code]

Re: Request for information

by woddrazen, Friday, October 10, 2008, 10:50 (5887 days ago) @ Ludo

Ludo,


Are you using proxy server? I'm not sure that 0.0.0.0 host exist.

Maybe there is some secret field that should be send also to connect to your server. Like __VIEWSTATE. You can parse current __VIEWSTATE from Response object Body Property.

Maybe IEWatch will help you to find out which data you need to send. IEWatch is HTTP and HTTPS analyzing tool.


Drazen

Re: Request for information

by Ludo, Friday, October 10, 2008, 13:38 (5887 days ago) @ woddrazen

it's not a proxy's problem because with the tool's sample, I don't have any problems.I did not put the good proxy because I did not want to give.

I have utilized tools and I have seen my problem may be.

But, my problem would be that I can url for downloading opens a popup asking me if I want to save open the following link. What do you think ?

Moreover, given that I utilize the demo version which is blocked,I can not test everything, it may be that the problem?
What I can not test with the demo version?

Thank you very much

Re: Request for information

by woddrazen, Friday, October 10, 2008, 15:35 (5886 days ago) @ Ludo

Ludo,


I forgot to mention please use blocking mode in scripting environment like VBS. To do that please set Blocking Property to 1 before calling any wodHttpDLX Method.

DEMO version don't have any such limitation. You will receive DEMO nag screen but when you close it sample will continue and work as expected.

I suggest you to use IEWatch and determine what should be send to server to receive proper response. Is there any chance that we could connect there and duplicate your problem?

You can send your private information to: techsupport@weonlydo.com


Drazen

Re: Request for information

by Ludo, Monday, October 13, 2008, 09:31 (5884 days ago) @ woddrazen

Hello,

It's good, my script is running at the moment.
I added [code]http1.Blocking = 1 [/code] Thanks very much.

However, is it possible to know the end of a download or an upload files with the progress method or done method ?

(see NOTE: This method is called only if you implemented IwodHttpNotify interface in your application, and property has received wodHttp.Notification reference to implementation of your body.) How to implement this interface ?

Thanks very much too.

Re: Request for information

by wodDamir, Monday, October 13, 2008, 09:39 (5884 days ago) @ Ludo

Ludo,

Did you perhaps check vbs sample that comes with the component? It has Done event already implemented. The same process goes for Progress and all the other events.

However, please note that you won't be able to change parameters provided in events, since vbs only supports out parameters.

Regards,
Damba

Re: Request for information

by Ludo, Monday, October 13, 2008, 17:42 (5883 days ago) @ wodDamir

I have an other questions : how to allow cookies to the site and to store

regards
Ludo

Re: Request for information

by woddrazen, Monday, October 13, 2008, 18:02 (5883 days ago) @ Ludo

Ludo,


Here is example how to receive cookies:
[code]For i = 0 To http1.Response.Cookies.Count - 1
Debug.Print http1.Response.Cookies(i).Name
Next i[/code]

Here is example how to send cookies to server:
[code]For j = 0 To http1.Response.Cookies.Count - 1
http1.Request.Cookies.Add http1.Response.Cookies(j).Name, http1.Response.Cookies(j).Value
Next j[/code]

Drazen