Hi Guys
I have a strange error when i work with the SOAP client on our vcenter server. API version and vcenter version is 5.0.
I connect with the soapclient and login with a user that is local on the vcenter server. That works just fine. As answer i get the following:
Array
(
[key] => 52266167-49c5-590a-a55f-313ca260060b
[userName] => vmtest
[fullName] => vmtest
[loginTime] => 2012-04-26T14:28:23.594602Z
[lastActiveTime] => 2012-04-26T14:28:23.594602Z
[locale] => en
[messageLocale] => en
)
after that i want to call the method "RetrievePropertiesEx" but i get the follwoing error message:
Array
(
[faultcode] => ServerFaultCode
[faultstring] => Unable to resolve WSDL method name RetrievePropertiesEx for namespace name urn:vim25
while parsing SOAP body
at line 1, column 346
while parsing SOAP envelope
at line 1, column 43
while parsing HTTP request before method was determined
at line 1, column 0
[detail] => Array
(
[InvalidRequestFault] =>
)
)
But when i do the same call with the method "RetrieveProperties" i get no error and also no results.
I check the WSDL file and both methods are defined.
Does anyone know what that problem is?
Thanks
Nico
Check what SOAPAction value your SOAP client is using:
"retrievePropertiesEx" was added in vSphere 4.1, so won't be recognized if the SOAPAction header is wrong.
Check what SOAPAction value your SOAP client is using:
"retrievePropertiesEx" was added in vSphere 4.1, so won't be recognized if the SOAPAction header is wrong.
Thanks alot BenN. I set the soapaction to "urn:vim25/4.1" and the method "RetrievePropertiesEx" is now recognized. But i still don't get any results. It doesnt show an error it just returns with nothing. I send the follwoing information in the soap message:
$soapmsg[this] = new soapval('_this', 'PropertyCollector', 'propertyCollector');
$soapmsg[specSet][propSet][type] = 'VirtualMachine';
$soapmsg[specSet][propSet][all] = false;
$soapmsg[specSet][propSet][pathSet] = 'name';
$soapmsg[specSet][objectSet][obj] = 'group-d1';
$soapmsg[specSet][objectSet][skip] = false;
$soapmsg[options][maxObjects] = 10 ;
Does anyone see an error?
Cheers
Nico
I haven't used PHP, but here's a thread with someone using it with the PropertyCollector:
http://communities.vmware.com/message/1509777#1509777
His 'objectSet' differs from yours.