Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

qmsedx.exe;reload document on server on button click

Hi,

How can I get the qmsedx.exe for qlikview version 9?

Thanks and Regards,

Anju

1 Solution

Accepted Solutions
Not applicable
Author

Hi All,

This issue is fixed!.

Please see this thread!

http://community.qlik.com/message/293671#293671

Regards,

Anju

View solution in original post

9 Replies
Bill_Britt
Former Employee
Former Employee

There really wasn't one for version 9. You could make web calls to trigger task. See if the attach will help.

Bill

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
Not applicable
Author

Hi Bill,

Thanks a lot! I think this will solve my problem.

If I am to execute a vb script, how do I set the job password. This needs to be passed as argument.

Thanks and Regards,

Anju

Bill_Britt
Former Employee
Former Employee

Here is what I used.

http://localhost/controlpanel/job/requestedx.aspx?JobIdOrJobName=Pub8Job&QueueIfRunning=True&Redirec...=

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
Not applicable
Author

Hi Bill.

If I am using the below mentioned vb script, then where should I place it on the server?

Then , I believe I should do this:

add button ->properties->actions->external->open URL :

http://localhost/controlpanel/job/requestedx.aspx?JobIdOrJobName=Pub8Job&QueueIfRunning=True&Redirec...=

and JobIdOrJobName should be the qlikview document I want to reload?

'
'     Start a Publisher EDX Task
'
QDS = "http://localhost:4720/qtxs.asmx"

argc = WScript.Arguments.Count
if argc <> 2 then
Wscript.Echo "Usage: trigger-qds.vbs taskName taskPassword"
Wscript.Quit
end if

EDXTASK = WScript.Arguments.Item(0)
EDXPSWD = WScript.Arguments.Item(1)

'<Global method="RequestEDX">
' <i_TaskIDOrTaskName>Reload_BBCnews</i_TaskIDOrTaskName>
' <i_Password>password</i_Password>
'</Global>

REQUEST = "<Global method=""RequestEDX"">"
REQUEST = REQUEST & "<i_TaskIDOrTaskName>" & EDXTASK & "</i_TaskIDOrTaskName>"
REQUEST = REQUEST & "<i_Password>" & EDXPSWD & "</i_Password>"
REQUEST = REQUEST & "</Global>"

' execute the request
dim xmlHttp
set xmlHttp = createobject("Microsoft.XMLHTTP")
xmlHttp.open "POST", QDS, False
xmlHttp.setRequestHeader "Content-Type", "text/xml"
xmlHttp.Send REQUEST

' show the response
'WScript.Echo xmlHttp.responseText

' Load the Response into an XML object
dim xml
set xml = createobject("Microsoft.XMLDOM")
xml.async = false
xml.loadXML(xmlHttp.responseText)

' Build an XSLT string to extract the TaskStartResult from the XML response
XSLT =        "<xsl:stylesheet version=""1.0"""
XSLT = XSLT & " xmlns:xsl=""http://www.w3.org/1999/XSL/Transform"">"
XSLT = XSLT & "<xsl:template match=""/"">"
XSLT = XSLT & "<xsl:for-each select=""RequestEDX/RequestEDXResult"">"
XSLT = XSLT & "<xsl:value-of select=""TaskStartResult""/>"
XSLT = XSLT & "</xsl:for-each>"
XSLT = XSLT & "</xsl:template>"
XSLT = XSLT & "</xsl:stylesheet>"
'WScript.Echo XSLT
' Load the XSLT into an XML object
dim xsl
set xsl = createobject("Microsoft.XMLDOM")
xsl.async = false
xsl.loadXML(XSLT)

' Transform the XML result to extract the TaskStartResult
' then skip the first 40 bytes of XML Header
RESULT = Mid(xml.transformNode(xsl),40,99)

Select case RESULT
    Case "Success":
RC = 0
    Case "TaskNotFound":
RC = 1
    Case "OtherError":
RC = 2
    Case Other
RC = 90
End Select

WScript.Echo RESULT
WScript.Quit RC

Thanks and Regards,

Anju Gopinath

Bill_Britt
Former Employee
Former Employee

Should be able to run this from any on the server. When I use one like it, I run it from the desktop.

Bill

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
Not applicable
Author

Hi Bill,

This is what I did. I saved the above script as trigger-qds.vbs which I placed on the desktop.

I have two qvw files. One which I want to reload named reloadvictim.qvw and another

one named testreload.qvw with a button.

I gave properties -> actions -> external->open url

http://localhost/controlpanel/job/requestedx.aspx?JobIdOrJobName=reloadvictim&QueueIfRunning=True&Re...

but, it shows web page not found

-Anju

Not applicable
Author

Hi Bill,

I changed the name of the file to requestedx.aspx as the url we are calling is

http://localhost/controlpanel/job/requestedx.aspx?JobIdOrJobName=reloadvictim&QueueIfRunning=True&Re...

but , even with this change , it is not working. I think the script has to be changed to handle

being called via access point instead of command line?

Could you please share the script you used for reload?

Thanks and Regards,

Anju Gopinath

Not applicable
Author

Hi,

I was able to solve it by another method.

First, I created a macro:

     Sub External

     Set WSHShell = CreateObject("Wscript.Shell")

     WSHShell.Run ("D:\testserver.bat")

     End Sub

The contents of testserver.bat is:


"C:\Program Files\QlikView\Publisher\Distribution Service\QlikviewDistributionService.exe" -r="C:\QlikViewMount\RN60-ConsolidatedCostofProgrammingReport.qvw"

On button click, I call the macro External.

Also created another macro that executes ActiveDocument.SetClearState to refresh the document.

Now, I am trying to see if I can merge the contents of the .bat file into the script as well.


But, thanks a lot, Bill!

Regards,

Anju

Not applicable
Author

Hi All,

This issue is fixed!.

Please see this thread!

http://community.qlik.com/message/293671#293671

Regards,

Anju