VMware {code} Community
roosnic1
Contributor
Contributor
Jump to solution

PHP SOAP PropertyCollector Error

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

0 Kudos
1 Solution

Accepted Solutions
BenN
Enthusiast
Enthusiast
Jump to solution

Check what SOAPAction value your SOAP client is using:

   http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=103344...

"retrievePropertiesEx" was added in vSphere 4.1, so won't be recognized if the SOAPAction header is wrong.

View solution in original post

0 Kudos
3 Replies
BenN
Enthusiast
Enthusiast
Jump to solution

Check what SOAPAction value your SOAP client is using:

   http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=103344...

"retrievePropertiesEx" was added in vSphere 4.1, so won't be recognized if the SOAPAction header is wrong.

0 Kudos
roosnic1
Contributor
Contributor
Jump to solution

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

0 Kudos
BenN
Enthusiast
Enthusiast
Jump to solution

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.

0 Kudos