7 Replies Latest reply: Jan 15, 2015 9:18 AM by James Peel RSS

    Monitoring QlikView in C# application



      I'm looking at the possibility of building a C# application that will allow for QlikView monitoring on items such as task reload status, license numbers etc. I've been looking around and come across the QlikView OCX and documentation about the SDK, but i'm struggling to find how I actually get started with this. I was expecting to find something along the lines of some dlls that I could use as references in my application, but not found anything like that yet.


      Can someone point me in the right direction?


          • Re: Re: Monitoring QlikView in C# application

            Does it make any difference if what i'm creating is an MVC application? I've got to step 2, where it mentions the changes to the web.config file, but I can't find the sections it says to edit. I've added the whole section in from the example solution it has attached to the post but i'm getting the error:


            Custom tool error: Failed to generate code for the service reference 'QMSAPIService'.  Please check other error and warning messages for details.


            There are a number of warnings including:


            The 'contract' attribute is invalid - The value 'QMSAPIService.IQMS' is invalid according to its datatype 'clientContractType' - The Enumeration constraint failed.


            Custom tool warning: Cannot import wsdl:portType

            Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter

            Error: Could not load file or assembly 'EntityFramework, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.


            Any idea what I need to change?

              • Re: Monitoring QlikView in C# application
                Jerry Svensson


                You might have missed some steps.

                More info here.

                QlikView Management API - Getting Started and Examples

                  • Re: Monitoring QlikView in C# application

                    I've gone through the page again and i'm getting stuck at the same point in step 2.


                    I've added the service reference (named QMSAPIService), added the 3 files into a folder called ServiceSupport and changed their namespace accordingly. I have reference that namespace in my code with no problem.


                    However it's when I need to make the changes to the web.config file that I hit problems. The settings that the guide says I need to alter didn't exist at all, so had to copy them in from the QMSAPIStarter solution that was on the guide. I'm not getting all the same errors that I have before, though I have closed and re-opened visual studio since I added these bits in so that might have done it. The warning message i'm getting is:


                    The 'contract' attribute is invalid - The value 'QMSAPIService.IQMS' is invalid according to its datatype 'clientContractType' - The Enumeration constraint failed.

                    I have also tried to call the service reference from my code but can't seem to find it under the namespace I expected. My application is called SystemMonitoringTool, so I tried SystemMonitoringTool.QMSAPIService, but no luck.

                      • Re: Monitoring QlikView in C# application
                        Jerry Svensson


                        It's been a while since I looked at this. I will give it another try in january, but until then hopefully someone else in the forum can help you?

                          • Re: Monitoring QlikView in C# application

                            I've managed to at least add the service reference to my code now (by unticking "Reuse types in referenced assemblies") and it is also now showing in the object browser, which it wasn't before. I'm still getting a number of warnings similar to the ones already posted, as well as a new one (and a couple more with similar message) that says:


                            There was an error importing a wsdl:binding that the wsdl:port is dependent on.

                            XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='h.t.t.p[://]tempuri.o.r.g/']/wsdl:binding[@name='BasicHttpBinding_IQMS']

                            XPath to Error Source: //wsdl:definitions[@targetNamespace='h.t.t.p[://]tempuri.o.r.g/']/wsdl:service[@name='QMSBackendService']/wsdl:port[@name='BasicHttpBinding_IQMS']

                            **I've added some extra characters to the above to stop it automatically attempting to hyperlink the text


                            The service reference however seems to be missing a lot of functions. So for example I can set up a new "QTServiceClient" but not a "QMSClient", which seems to be key to using most of the features.