Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Remote triggering of QlikView 11 tasks from Java

 Folks, I have been trying to identify if we can remotely trigger tasks in QlikView Publisher using Java. EDX initially appeared to be the way to go, but as per this article: [http://community.qlik.com/docs/DOC-2650], it can only be used with a client written in .NET. I am surprised that a web service cannot be accessible using simple HTTP! According to Rakesh Mehta in http://community.qlik.com/message/186385#186385, the web service should be accessible using any technology, but this appears to be contrary to posts made by Arthur Lee. Could someone please resolve this doubt?                                                       Our system is an automated one where we will need to trigger: 1. Document reloads.  2. File operations such as move/rename/copy, etc.  If EDX cannot be triggered using a non-.NET system, could someone please suggest an approach that will help our requirements?  Thanks!

16 Replies
Not applicable
Author

BTW, I'm not sure why the forum software is not letting me add newlines. Sorry for the humongous paragraph!

Not applicable
Author

.Net is not required; it's just that most examples use .Net. The EDX trigger is part of the QMS API and the api is a webservice. Therefore you can trigger an reload with an http request (although you should probably use a soap library). The only requirement is that the API uses NTLM authentication (take a look at jcifs project for an open source solution).

Not applicable
Author

Sorry for the delayed response, but thanks vhuynh! Is there any way we can get documentation on the webservices? Docs that I have seen say the the QMS API doc is available in the management console. I don't have access to a QlikView server yet, and am trying to design these API calls before I get access. How can I get the API documentation?

Not applicable
Author

Unfortunately I have not found any good documentation for the apis. You can get wsdl from http://hostname:4799/QMS/Service?wsdl or download PowerTools but without a qlikview server available you will not know exactly what each api does. The api will make more sense if you have qlikview server (even one without a license installed since setting the license is something the api can do).

Here are somethings to keep in mind:

  • The authentication is NTLM and the user must be part of the "QlikView Management API" group.
  • Even though most parameters are listed as optional, most are required.
  • Use the GetTimeLimitedServiceKey api and set the result in the X-Service-Key http header to call an api.
Not applicable
Author

Anyone that could provide an example? we utilize this feature a lot, and now facing it's made very complicated in version 11.

Not applicable
Author

Thanks for the info vhuynh, I managed to get my hands on a doc called "Using EDX in QV11", and in their own doc, they have mentioned: "This combination of security means the client application must be written in .NET".

This doesn't make sense to me because there is no apparent reason why a web service cannot be accessible by a non-NET application, and vhyuynh also mentioned that you will not need .NET, but this text being placed in a QlikView design doc is making me a bit nervous.

Any thoughts on this?

Not applicable
Author

Hi Vhuynh,

Kindly post a sample code in implementing the web service in Java.

I've trying to use the web service in Java but I'm getting the below error:

Exception in thread "main" AxisFault

faultCode: {http://xml.apache.org/axis/}HTTP

faultSubcode:

faultString: (401)Unauthorized

faultActor:

faultNode:

faultDetail:

    {}:return code:  401

    {http://xml.apache.org/axis/}HttpErrorCode:401

(401)Unauthorized

    at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)

    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)

    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)

    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)

    at org.apache.axis.client.Call.invoke(Call.java:2767)

    at org.apache.axis.client.Call.invoke(Call.java:2443)

    at org.apache.axis.client.Call.invoke(Call.java:2366)

    at org.apache.axis.client.Call.invoke(Call.java:1812)

    at org.tempuri.BasicHttpBinding_IQMSStub.getTimeLimitedServiceKey(BasicHttpBinding_IQMSStub.java:7533)

    at javaapplication5.JavaApplication5.main(JavaApplication5.java:52)

CODE:

public static void main(String[] args) throws Exception {

BasicHttpBinding_IQMSStub service = (BasicHttpBinding_IQMSStub) new QMSBackendServiceLocator().getBasicHttpBinding_IQMS(new URL("http://192.168.235.128:4799/QMS/Service"));

System.out.println(service.getTimeLimitedServiceKey());

}


Please help. Any response is appreciated.

Thanks,

Arnold

Not applicable
Author

The 401 error occurs because of the NTLM authentication. You will need to implement NTLMv2 authentication. You can use the jcifs library to do most of the work. The library will need to be integrated with axis and the implemenation is specific to the version of axis that you're using.

Not applicable
Author

Hi Vhuynh,

I just learned that QMS API will not allow me to retrieve the rows and columns of TableBox objects within a qvw documents.

Are you aware of a plugin/API that will allow me to do the following:

  1. Connect to QlikView server and retrieve the list of qvwdocuments
  2. Browse to the sheets of the qvw documents
  3. Retrieve the Objects within those sheets together with its values. Let say a TableBox together with its rows and columns.

And I need to do this in Java with QlikView 11.

We've done this before in older QlikView version using QvsComRemote.dll but this dll was retired already.

Kindly help give some ideas regarding this.

Thanks,

Arnold