Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
We are trying to use the QMS to make some of the mundane tasks of updating an installation easier to administer. Things like: changing the order in which applications load etc.
As we are not a .NET development company and thus don't want to maintain a Visual Studio project, we were planning to use Powershell to do this.
We have come this far with our script:
$service = New-WebServiceProxy -Uri http://someHost:4799/QMS/Service -Namespace QlikViewServer -Credential (get-credential)
$serviceKey = $service.GetTimeLimitedServiceKey()
$service.GetServices([QlikViewServer.ServiceTypes]::All, $true)
It seems to work fine until here. When we don't provide the credentials in step one, an authentication error is thrown when trying to get the service key. This way it returns what looks like a real key. Tells us that we are doing something right. But then we don't know what to do with the key afterwards.
We couldn't find the ServiceKeyClientMessageInspector class, mentioned at the QlikBlog.at
QlikView Management API - #2 Export / Add / Delete Document CALs
Any ideas? Either from Powershell-Webservice experience or because you are actually doing something similar?
Regards,
Sandro
Hello Jakub, thank you for the input 🙂
I noticed that you are referencing the Qlik Sense documentation. My question was about QlikView server.
Any idea if it should work the same there?
Hello there,
I've been trying this for a long time now and I haven't really gotten any further than you in this Sandro.
The problem is that you somehow have to put the service key in the header.
with soap ui I get everything I want back successfully. The problem is that the command we're using New-WebServiceProxy doesn't allow a header to be added. Please see the following website: New-WebServiceProxy which explains the whole command.
Now see the REST request: Invoke-RestMethod which does allow you to add a header.
This is a common problem with powershell and soap. A possibility to use the new-webserviceproxy command is to send a soap envelope with it but I am a bad programmer. I don't really understand how I can utilize this in poiwershell.
I hope there is someone here who can help us out with this whole thing because it's driving me crazy.
Thanks,
René
Looks like the issue was solved in this other thread