Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

QlikView management API and PHP

Okay so I have been scratching my head for a while on this problem and would appreciate any help / guidance I can get.  So this is the problem:  Basically QlikView server management 11 release API in the method of SOAP.  So what I am trying to do is to write a simple php script(to learn!) that uses one of the SOAP operation.  I am trying to get the limited service key by using the GetTimeLimitedServiceKey, but unfortunately, when I run my script I get the following error: "Unauthorized".  Has anyone been able to write a simple script in PHP that uses the management API?

This is my simple code below:

//----------------------------------------------------------------------------------------------------------------

<?php

    try {

            $options = array(

                'soap_version'=>SOAP_1_1,

                'exceptions'=>true,

                'trace'=>1,

                'cache_wsdl'=>WSDL_CACHE_NONE,

                'login'=>"username",

                'password'=> "*******"

            );

            $client = new SoapClient('http://qlikviewserver:4799/QMS/Service?WSDL', $options);

// Note where 'Get' and 'request' tags are in the XML

            $results = $client->GetTimeLimitedServiceKey();

         } catch (Exception $e) {

            echo "<h2>Exception Error!</h2>";

            echo $e->getMessage();

        }

$results = $client->GetTimeLimitedServiceKey();

?>

Thanks.

10 Replies
Not applicable
Author

Figured out my problem was because I was storing my QVS id in my service key variable. Now I have new problems, but my original problem is fixed.