Opened 5 years ago
#19293 new defect
IMedium::getEncryptionSettings() variables are backwards when called via web service
Reported by: | SmithersTheOracle | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 6.1.0 |
Keywords: | getEncryptionSettings | Cc: | |
Guest type: | all | Host type: | all |
Description
To start: this is a very minor issue and is really just for your awareness. SDKRef for API v6.1.0 page 268 shows IMedium::getEncryptionSettings() taking a variable reference for the cipher and returning the disk ID. When calling this method using the web service, however, it takes a variable reference for the disk ID and returns the cipher. I've confirmed the documentation matches the method when using the VirtualBox.VirtualBox COM object. I would imagine this needs to be changed in the WSDL and VBoxWebSrv. For now, I've simply reversed my variables and it works. My VirtualBox version is 6.1.0 and I'm using the 6.1.0 SDK via PowerShell on a Windows 7 host.
I'm creating the web service proxy in PowerShell using "$global:vbox = New-WebServiceProxy -Uri "$($env:VBOX_MSI_INSTALL_PATH)sdk\bindings\webservice\vboxwebService.wsdl" -Namespace "VirtualBox" -Class "VirtualBoxWebSrv"". My call to getEncryptionSettings() as it works right now is "$cipher = $global:vbox.IMedium_getEncryptionSettings($disk.Id, [ref]$diskid)". $disk.Id is the web service reference ID string to that specific IMedium so is unimportant to this.
I'm creating the vbox COM object using "$global:vbox = New-Object -ComObject VirtualBox.VirtualBox". When calling getEncryptionSettings() from the COM, my call can be correct to the SDKRef like this: "$diskid = $global:vbox.HardDisks[$disk.Id].getEncryptionSettings([string]@([ref]$cipher))". $disk.Id here is the array index to that specific IMedium so is unimportant to this.