[vbox-dev] php and webservice

Alexis Gingras agingras at torrent-corp.com
Tue Dec 9 22:46:59 GMT 2008


Hi,
I got a little problem with using the web service.

Code :
<?php
$client = new SoapClient("vboxwebService.wsdl");
$log=$client->IWebsessionManager_logon("","");
$log_array=(array) $log;
$log_client="";
$log_client=$log_array['returnval'];
if ($log_client!="") {
    print "Connection To VirtualBox Web Service = Success <br>Connection
id:";
    echo $log_client;
}else {
    print "Connection To VirtualBox Web Service =failure!";
}
print_r($client->IVirtualBox_getVersion($log_client));
?>
Output :
Connection To VirtualBox Web Service = Success
Connection id:fbf18b2ecf194980-000000000000000c

But nothing from IVirtualBox_getVersion

This is what I got in the console:
9: accepted connection from IP=127.0.0.1 socket=9... #### SOAP FAULT:
VirtualBox error: Invalid managed object reference "" [SOAP-ENV:Client]
Request served
 And the apache error log :
[Tue Dec 09 17:16:59 2008] [error] [client 10.205.75.30] PHP Fatal error:
Uncaught SoapFault exception: [SOAP-ENV:Client] VirtualBox error: Invalid
managed object reference "" in /var/www/html/index.php:19\nStack trace:\n#0
[internal function]: SoapClient->__call('IVirtualBox_get...', Array)\n#1
/var/www/html/index.php(19):
SoapClient->IVirtualBox_getVersion('fbf18b2ecf19498...')\n#2 {main}\n
thrown in /var/www/html/index.php on line 19

Any help would be greatly appreciated!
A.G.
-- 
Alexis Gingras
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20081209/1ebb7617/attachment.html>


More information about the vbox-dev mailing list