Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
pkeertipati
Contributor
Contributor

Unable to use or find GetRemoteQmsSettings and SetRemoteQmsSettings in QMS API in PowerShell Script

I'm trying to use a PowerShell script to get and set the Remote QMS Settings. I'm getting an error. Below is my PowerShell code and error. Please help. 

Method I'm trying to use GetRemoteQmsSettings Method | QlikView for developers Help

 

## PowerShell Code
$url = "http://xxxxxxxxxx:4799/QMS/Service"

$service = New-WebServiceProxy -Uri $url -Namespace QlikViewServer -UseDefaultCredential
$serviceKey = $service.GetTimeLimitedServiceKey()

$qmsid = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

$hdrs = @{}
$hdrs.Add("SOAPACTION","http://ws.qliktech.com/QMS/12/2/IQMS2/GetRemoteQmsSettings")
$hdrs.Add("Content-Type", "text/xml;charset=utf-8")
$hdrs.Add('X-Service-Key',$serviceKey)

$body = @{}
$body = '<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<GetRemoteQmsSettings xmlns="http://ws.qliktech.com/QMS/12/2/">
<qmsId>' + $qmsid + '</qmsId>
</GetRemoteQmsSettings>
</s:Body>
</s:Envelope>'

$res = Invoke-WebRequest -Uri $url -Method Post -Body $body -UseDefaultCredential -Headers $hdrs -UseBasicParsing

 

Error:

Invoke-WebRequest : a:ActionNotSupportedThe message with Action 'http://ws.qliktech.com/QMS/12/2/IQMS2/GetRemoteQmsSettings' cannot be processed at the receiver, due to a ContractFilter
mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and
the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).

 

Labels (2)
1 Reply
PaulaFitz
Contributor
Contributor

Hy there i can see your post and i must say

  1. Check API Documentation: Make sure you are referencing the correct function names and their parameters as specified in the QMS API documentation. Double-check the syntax, spelling, and parameter requirements.

  2. API Endpoint and Authentication: Ensure that you're connecting to the correct API endpoint and using the appropriate authentication method (e.g., API key, token, username/password) to access the API functions.

  3. Import API Module: If the QMS API provides a PowerShell module, ensure that you have imported the module correctly using the Import-Module command. This will make the API functions available in your PowerShell script.

Thanks and regards

PaulaFitz