For some reason a folder I ...
VMware Webservices
VMware deploys with a broken webservice (the definitions are incomplete)
This can be easily fixed by following these steps.
Download the SDK from VMware and manually install the definitions
I hope this posts saves you some headache.
- Download the VMware SDK
- Extract all files
- Copy the files from SDK/vsphere-ws/wsdl/vim and SDK/vsphere-ws/wsdl/vim25 to your server e.g. C:\ProgramData\VMware\VMware VirtualCenter\docRoot\sdk
(may be located elsewhere on your server)
Thats it. You may restart your “VMware vCenter Server Web Services HTTP” (via services) and everything should work perfectly.
Another headache case is connecting via the standard PHP-SoapClient since VMware accepts ONLY correctly namespaced XML packets
To solve this you’ll have to override your SoapClient here below I’ll demonstrate how to override
//Overridden SoapClient (basically it injects the default XML-Schema instance)
class VMware_SoapClient extends SoapClient
{
public function __doRequest($request,$location,$action,$version,$one_way = 0)
{
$inject = 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"';
if (strpos($request, $inject) === false) {
$pos = strpos($request, 'xmlns:');
if ($pos !== false) {
$pos = strpos($request, '>', $pos);
if ($pos !== false) {
$request = substr($request, 0, $pos) . ' ' . $inject . substr($request, $pos);
}
}
}
return parent::__doRequest($request, $location, $action, $version, $one_way);
}
}







do we need to do this for vcenter 4.0 also ? I am running vcenter server 4.0 to manage esx4.0. I have unzipped the sdk under tomcat\webapps\ROOT folder. https://vcenter:8443/sdk return page not found. Do I need to copy the wsdl files found under SDK\wsdl\vim and SDK\wsdl\vim25 to someother place also ?
Make sure you run the “VMware webservices” service.
Don’t Work for me, i test but i’m not sure