15 Replies Latest reply: Jul 14, 2014 6:41 AM by Reena Abraham RSS

QlikView 11 and Java Integration via QMS API

Arnold Ayaoan

Hello everyone,

 

I've been trying to utilize the QV web service on Java but I'm getting errors on the WSDL file.

 

WSDL error.png

Even in C#.net, I was not able to succeed using the web service by following the sample implementation mentioned at QMS API documentation.

Is there someone, succeeded utilizing the QV 11 web service ?

Please help.

Any response is highly appreciated.

 

Thanks,

Arnold

  • Re: QlikView 11 and Java Integration via QMS API
    Alex Nerush

    Hello Arnold,

     

    I'm not specialist in Java... But I have successful implementation using C#.NET and QMS API v.11...

    • Re: QlikView 11 and Java Integration via QMS API
      Arnold Ayaoan

      Hi Alex,

       

      Really apreciate the time and response.

      Currently I was able to make the C#+QMS work. Do you know if QMS api can access the sheets and other objects inside the qvw file?

      Basically, what I want to achieve is to get all the TableBox object together with its row and column values inside a specific document.

       

      I read the API documentation, but I couldn't find the right method.

      Please help.

       

      Thanks,

      Arnold

      • Re: QlikView 11 and Java Integration via QMS API
        Alex Nerush

        I think such functionality doesn't available in current release (but you can get field list, field content)... You can look forward 3rd party software - like this http://www.qvsconnector.com/. Or you can try to use QlikOCX component to achive such functionality.

        • Re: QlikView 11 and Java Integration via QMS API
          Arnold Ayaoan

          thanks a lot Alex!

          Do you know if it is possible to integrate the QlikOcx with Java?

          • Re: QlikView 11 and Java Integration via QMS API
            Alex Nerush

            Sorry, i have no idea regarding Java and QlikOcx.. Maybe this link will be useful for you http://javaactivex.com/

            • Re: QlikView 11 and Java Integration via QMS API
              Arnold Ayaoan

              Hi Alex,

               

              Do you have a sample .net program using QlikOcx to retrieve tablebox objects together with its values within a specific qvw document?

               

              Thanks,

              Arnold

              • Re: QlikView 11 and Java Integration via QMS API
                Alex Nerush

                Here are you couple lines of code from my project, maybe this will be helpful for you. Documentation available right here http://community.qlik.com/docs/DOC-2639(see The QlikView  Core COM API)

                 

                axQlikOCX1 - instance of QlikOCX object.

                axQlikOCX1.ActiveDocument.GetSheetObject(objectId) - this method i've used to retrieve reference for appropriate object in the document.

                ....

                public void OpenDocument(string link, string username, string password)

                        {

                            if (axQlikOCX1.HasOpenDocument())

                            {

                                axQlikOCX1.ActiveDocument.CloseDoc();

                            }

                 

                            if(!String.IsNullOrEmpty(username))

                                axQlikOCX1.OpenDocument(link, username, password);

                            else

                                axQlikOCX1.OpenDocument(link);

                        }

                ...

                public void Select(string fieldName, string fieldValue)

                        {

                            if (axQlikOCX1.HasOpenDocument())

                            {

                                axQlikOCX1.ActiveDocument.Fields(fieldName).Select(fieldValue);

                            }

                        }

                ...

                public void SelectValues(string fieldName, IEnumerable<string> values, bool isNumeric)

                        {

                            if (axQlikOCX1.HasOpenDocument())

                            {

                                //axQlikOCX1.ActiveDocument.Clear();

                                QlikView.Field f = axQlikOCX1.ActiveDocument.GetField(fieldName);

                                QlikView.IArrayOfFieldValue fv = f.GetNoValues();

                 

                 

                                int i = 0;

                                foreach (string value in values)

                                {

                                    double result;

                                    if (isNumeric && Double.TryParse(value, out result))

                                    {

                                        fv.Add();

                                        fv[i].Number = result;

                                        fv[i].IsNumeric = true;

                                        ++i;

                                    }

                                    else

                                    {

                                        fv.Add();

                                        fv[i].Text = value;

                                        fv[i].IsNumeric = false;

                                        ++i;

                                    }                   

                                }

                                // f.Clear();

                                f.SelectValues(fv);

                            }

                        }

                 

                ...

                public IEnumerable<string> GetPossibleValues(string fieldName)

                        {

                            List<string> values = new List<string>();

                            QlikView.Field f = axQlikOCX1.ActiveDocument.GetField(fieldName);

                 

                 

                            if (f != null)

                            {

                                QlikView.IArrayOfFieldValue fv = f.GetPossibleValues();

                 

                 

                                for (int i = 0; i < fv.Count; ++i)

                                {

                                    if (fv[i].IsNumeric)

                                        values.Add(fv[i].Number.ToString());

                                    else

                                        values.Add(fv[i].Text);

                                }

                            }

                 

                 

                            return values;

                        }

                 

                ...

                public void CopyObjectToClipboard(string objectId)

                        {

                            if (axQlikOCX1.HasOpenDocument())

                            {

                                QlikView.SheetObject o = axQlikOCX1.ActiveDocument.GetSheetObject(objectId);

                                if (o != null)

                                    o.CopyTableToClipboard(true);

                                    //o.CopyBitmapToClipboard();

                            }

                        }

  • QlikView 11 and Java Integration via QMS API
    Lars Bayer

    The WSDL- and Schema-Files are not usable for Java (I used JAX-WS/METRO to generate the stubs - AXIS2 does'nt worked at all), you need to modify them a little bit. Sadly I cannot attach the files here. Is there a area where I can post attachments (if someone is interested)?

     

    BR, Lars

  • Re: QlikView 11 and Java Integration via QMS API
    Lars Bayer

    Done! Have fun with it ;-)

  • Re: QlikView 11 and Java Integration via QMS API
    dabaipang

    Could you please send your example to my email dabaipang@hotmail.com

    Very appreciate your help!