VMware {code} Community
erniea
Contributor
Contributor

SOAP InvalidPropertyFault on vSphere 5.5

So I've been using the RetrieveProperties method of the PropertyCollector to collect data from my vSphere server. SOAP requests are generated and sent to the server and the responses are parsed and dealt with.

In 5.5, it seems that requesting for the VirtualMachine.runtime.faultToleranceState returns an InvalidPropertyFault. My exact soap request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:vim25">

   <soapenv:Header/>

   <soapenv:Body>

      <urn:RetrieveProperties>

         <urn:_this type="PropertyCollector">propertyCollector</urn:_this>

         <specSet>

            <propSet>

               <type>VirtualMachine</type>

               <all>false</all>

               <pathSet>runtime.faultToleranceState</pathSet>

            </propSet>

            <objectSet>

               <obj type="VirtualMachine">vm-83</obj>

               <skip>false</skip>

            </objectSet>

         </specSet>

      </urn:RetrieveProperties>

   </soapenv:Body>

</soapenv:Envelope>

and error response:

<soapenv:Body>

<soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring></faultstring><detail><InvalidPropertyFault xmlns="urn:vim25" xsi:type="InvalidProperty"><name>runtime.faultToleranceState</name></InvalidPropertyFault></detail></soapenv:Fault>

</soapenv:Body>

</soapenv:Envelope>

The confusing thing is, running the exact same request for a vSphere 5.0, I get a normal RetrievePropertiesResponse.

An identical phenomenon occurs for VirtualMachine.summary.storage.

PS. To debug, I attempted to request all the Properties by sending:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:vim25">

   <soapenv:Header/>

   <soapenv:Body>

      <urn:RetrieveProperties>

         <urn:_this type="PropertyCollector">propertyCollector</urn:_this>

         <specSet>

            <propSet>

               <type>VirtualMachine</type>

               <all>true</all>             

            </propSet>

            <objectSet>

               <obj type="VirtualMachine">vm-68</obj>

               <skip>false</skip>

            </objectSet>

         </specSet>

      </urn:RetrieveProperties>

   </soapenv:Body>

</soapenv:Envelope>

and the response does NOT contain an entry for runtime.faultToleranceState, for both vmware 5.0 and 5.5

Does anyone know what is going on?

Tags (1)
0 Kudos
1 Reply
tough_siberian_
Enthusiast
Enthusiast

Hello.

I have two suggestions for you to try out.

First of all "RetrieveProperties()" method is deprecated since vSphere 4.1. You should use "RetrievePropertiesEx()" instead.

Second - check what headers are you sending in http request containing soap envelope?

One of the headers should be "SOAPAction", containing API namespace and API version like this one: "urn:vim25/5.5".

If this header is missing, then response will contain only data which was present on very early release of vSphere.

Regards.

0 Kudos