Ticket #7147 (closed defect: fixed)
IVFSExplorer 'cd' method not implemented -> Fixed in SVN
|Reported by:||joseph1962smith||Owned by:|
The IVFSExplorer::cd method via the vboxwebsrv SOAP APIs does not work on openSuSE and Windows XP hosts. It is likely this problem also exists on other operatings system hosts but I am unable to confirm.
I am using the PHP SOAP interface via the published vboxServiceWrappers.php module. I am able to reliably recreate this problem.
Assuming a file directory listing hierarchy as follows:
The steps are:
1) Log-on to vboxwebsrv ... a IVirtualBox reference will be returned.
2) Using the IVirtualBox reference, get a new IAppliance object (IVirtualBox::createAppliance)
3) Using the IAppliance reference, get a IVFSExplorer object (IAppliance::createVFSExplorer) by passing a valid URI reference (e.g: file://)
4) Using the IVFSExplorer reference:
a) Update the listing (IVFSExplorer::update)
b) Retrieve the dir/file list (IVFSExplorer:entryList)
5) Using the IVFSExplorer reference, attempt to change to a valid directory (e.g: MyDir2 from above): IVFSExplorer::cd
When attempting to execute step 5, a SOAP exception is thrown and the error message returned is: VirtualBox Error (0x0).
The vboxwebsrv log output shows the following:
-- entering vboxIVFSExplorer_USCOREcd
[ 1] ManagedObjectRef::findRefFromId(): looking up objref ddbedd1d9da6cb00-00000000000000f1
[ 1] ManagedObjectRef::findRefFromId(): sessid DDBEDD1D9DA6CB00, objid F1
[ 1] calling COM method Cd
[ 1] error, raising SOAP exception
API return code: 0x80004001 (E_NOTIMPL)
COM error info result code: 0x0
COM error info text:
[ 1] -- leaving vboxIVFSExplorer_USCOREcd, rc: 0x80004001 (-2147467263)
The full vboxwebsrv log messages starting from log-in to the attempt to change directories is in the attachment. In the attached log, I have replaced the raw IP address in the logs with xxx.xxx.x.xx.
I have found a usable work-around and have therefore set the priority to major rather than critical.
The work-around is as follows: The IAppliance::createVFSExplorer method accepts a URI parameter. By passing the URI as the path you need to go to (must use URI format: file://MyDir2/SubDir1), the returned IVFSExplorer reference will work as expected. Follow step 3 above (parts a and b) and the directory listing will be returned.
When using this work-around, it is important that the IVFSExplorer and IAppliance objects be released (use IVFSExplorer::release and IAppliance::release) otherwise repeated calls will leave stranded objects in vboxwebsrv. From what I can see ... it appears vboxwebsrv will auto-release objects that have not been accessed after some timeout but is better if the owner (your code) clean-up behind itself.
- Summary changed from IVFSExplorer 'cd' method not implemented to IVFSExplorer 'cd' method not implemented -> Fixed in SVN