Hi,
I am getting VersionMismatchFaultCode while accessing PbmRetrieveServiceContent() API of PBM Service.
From Documentation, I have read that we need to pass vcSessionCookie with sessionid of vCenter Server [returned by vim login API].
I have added custom header to execute this API using SoapUI tool.
Following is the request in SoapUI:
POST https://198.18.3.217/sdk/pbmService HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "urn:pbm/2.0"
Cookie: vcSessionCookie="7d864e17de7a3fbc56301b882abe538226bdced3",Path=/;HttpOnly;Secure;
Content-Length: 332
Host: 198.18.3.217
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:pbm">
<soapenv:Header/>
<soapenv:Body>
<urn:PbmRetrieveServiceContent>
<urn:_this type="PbmServiceInstance">ServiceInstance</urn:_this>
</urn:PbmRetrieveServiceContent>
</soapenv:Body>
</soapenv:Envelope
Following is the response of this API execution:
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>VersionMismatchFaultCode</faultcode>
<faultstring>Unsupported version URI "urn:pbm/2.0"
while parsing SOAP body
at line 3, column 3
while parsing SOAP envelope
at line 1, column 0
while parsing HTTP request before method was determined
at line 1, column 0</faultstring>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
================================================================================
By using gsoap generated code (C++) , I am facing the same issue.
I am stuck at this point. Any help will be appreciated.
Thanks,