Qlik Community

QlikView Publisher

Discussion Board for collaboration on QlikView Publisher.

Not applicable

Supporting tasks

Hello,

As our qlikview documents are really big, we don't want that our customers have to wait a lot of time the first time a document is reached. So, and after noticing that the preloaded option in the QEMC doesn't work as we expected we developed a little VBS script to make a fake request to cause a load of the document by the server.

The code is more or less as follows:

' Create Http object
SET gHttp = CreateObject("Microsoft.XMLHTTP")

url = "http://localhost/QvAJAXZfc/Authenticate.aspx?keep="
gHttp.Open "GET", url, false, "user", "password"
gHttp.Send

' POST Document request
url = "http://localhost/QvAJAXZfc/QvsViewClient.aspx?mark=&host=QVS@test-server&view=1/text-2years.qvw&plat..."
gHttp.Open "POST", url, false
gHttp.Send "<update mark="""" stamp="""" cookie=""true"" scope=""Document"" view=""1/text-2years.qvw"" ident=""null""><add name=""Document.ActiveSheet"" /><set name=""Document"" add=""mode;servercontrol;ie6false"" /></update>"

SET gHttp = NOTHING

It works really well, document is loaded into qv server memory and then the first user to access has not to wait any longer. This code works from  command line and as a window scheduled task, but not from supporting task in QEMC. We would like to know why, as we want to do that after the reloading process of the documents.

Logs from publisher doesn't show anything but all ok.

Our Command Line Statement is just: C:\WINDOWS\system32\wscript.exe E:\loader.vbs

Any ideas or clues?

As information: Qlikview Enterprise 10 SR3 x64 on a Windows Server 2008 R2 x64.

Thanks.

1 Solution

Accepted Solutions
Not applicable

Supporting tasks

I've got it,

You must use the object "MSXML2.ServerXMLHTTP" instead of "Microsoft.XMLHTTP".

I think is a good piece of code for anyone having the same problem.

Best regards.

5 Replies
Not applicable

Supporting tasks

I've got it,

You must use the object "MSXML2.ServerXMLHTTP" instead of "Microsoft.XMLHTTP".

I think is a good piece of code for anyone having the same problem.

Best regards.

Not applicable

Supporting tasks

Hi Ferran,

I'm trying to create an object for MSXML2.ServerXMLHTTP on QV application but I'm getting the below error:

ERROR: 429 - ActiveX component can't create object

Kindly help advice.

I'm using MSXML6 on Windows Server 2003

Thanks,

Arnold

Not applicable

Supporting tasks

Hi Arnold,
the source code I posted some time ago was meant to be executed outside the qlikview environment, as an independent VBS script. What you are trying to do is to create a MSXML2.ServerXMLHTTP object inside the script module of a qlikview document, right? Then what I could say is that not all the objects are available inside the script module and... why are you doing that? What is you purpose?


Cheers.

Ferran.

Employee
Employee

Re: Supporting tasks

You can to this with a .bat file.  Write a .bat file to open to open the document in AJAX and then use the kill command after a pause. Sample:

Start iexplore.exe "http://localhost/QvAJAXZfc/opendoc.htm?document=WI47146/freda2.qvw&host=QVS@qv11"

TIMEOUT /T 5

taskkill /F /IM iexplore.exe

Not applicable

Supporting tasks

Hi Ferran,

I'm doing an integration of a website on QVW document.

This works now. Thanks for the reply.

Regards,

Arnold

Community Browser