Has anyone had any success in accessing the SOAP APIs from PHP ? I'm using the built-in SOAP library of PHP 5, but I keep getting an exception thrown - with no real information on where it failed
PHP Fatal error: Uncaught SoapFault exception: \[ServerFaultCode] type in /home/.....
I've found a reference on run-virtual.com, but not had any luck in getting that to work.
I've obviously got an incorrect parameter value (the "_this" parameter) - but I can't seem to work out what it should be.
<?php
$esx = new SoapClient(null,
array('location' => "http://192.168.1.10/sdk",
'uri' => "urn:vim2",
'exceptions' => TRUE,
'user_agent' =>"SOAP/php-version"));
echo $esx->__soapCall("RetrieveServiceContent",
array( new SoapParam("ServiceInstance", "_this")
),
array( "uri" => "urn:vim2"));
?>