Hi James, On 04.10.2012 08:33, James Lucas wrote: > Hi Virtualbox Devs, > > Could this patch please be applied before the next maintenance release?
It is applied (among quite many beautifications of the generated output) in https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Main/webservice/websrv-php.xsl Since I changed so much I'm asking for a favor: could you double check using this XSLT file if the right wrappers are generated for VirtualBox 4.2? If I get positive feedback then the change will be backported to 4.2 and become part of 4.2.2. James/Ian (and anyone else who wrote significant amount of code interfacing with the VirtualBox webservice): this reminds me of something unrelated... does any of your code retrieve more detailed error information than what Exception::getMessage() returns? It has been a very recent discovery that the VirtualBox webservice returns incomplete error information, which is not equivalent to what the native API would return. So we're trying to figure out if anyone truly depends on the current error reporting semantics. The pending change would include more information in getMessage(), and additionally provide the (potentially empty) list of error informations. To illustrate: say some Medium API method returns two or more errors (e.g. one high level and one lower level containing more details about file access failure details), then the native API has the following information: - API result code - (last error code, last error text, component, interfaceid) - ... - (first error code, first error text, component, interfaceid) Currently the webservice takes this information, and sets the overall message to "VirtualBox Error: <last error text> (<last error code>)". So quite a bit of information loss (the extra SOAP fault details contain no additional information). The new message would be "VirtualBox Error: rc=<API result code> <last error text> (<last error code>) ... <first error text> (<first error code>)" - actually the order of messages isn't fixed yet, first to last might make more sense. Additionally we'd pass all error information across as separate information items. For 4.2 we would probably keep backwards compatibility at the SOAP fault details level, even though that'd mean to have more redundant information. What are your opinions? Bad idea to change what's returned by getMessage in 4.2 at all, even at the price of sticking to incomplete information? Oh, and there's a typo in screen.php: exteionsion Thanks for helping us to improve VirtualBox! Klaus > > - James > > On 24/09/2012, at 11:10 AM, James Lucas<[email protected]> wrote: > >> Hi All, >> >> Attached is a patch for the websrv-php xml stylesheet. Ian, do you mind >> verifying and then could the vbox developers please apply? >> >> This patch takes into account the safearray definition when emitting a set >> function for attributes in the php libs. The two affected attributes are >> "groups" in IMachine and "environment" in IGuestSession. If you want to >> generate your own modified library you can either change the >> vboxServiceWrappers.php file with the following diff or run `xsltproc >> websrv-php.xsl VirtualBox.xidl` (VirtualBox.xidl from the SDK) >> >> @@ -2173,7 +2173,7 @@ >> public function setGroups($value) { >> $request = new stdClass(); >> $request->_this = $this->handle; >> - if (is_null($value) || is_scalar($value)) { >> + if (is_array($value) || is_null($value) || is_scalar($value)) { >> $request->groups = $value; >> } >> else >> @@ -4991,7 +4991,7 @@ >> public function setEnvironment($value) { >> $request = new stdClass(); >> $request->_this = $this->handle; >> - if (is_null($value) || is_scalar($value)) { >> + if (is_array($value) || is_null($value) || is_scalar($value)) { >> $request->environment = $value; >> } >> else >> >> As always this is licensed under MIT (and I have signed a contributor >> agreement with Oracle) >> >> - James >> >> On 23/09/2012, at 8:13 AM, Ian Moore<[email protected]> wrote: >> >>> Hello, >>> >>> Line 2176 in vboxServiceWrappers.php needs to be changed to: >>> >>> if (is_null($value) || is_scalar($value) || is_array($value)) { >>> >>> In order to be able to correctly set VM groups. It does not currently >>> account for an array type argument - which is what the setGroups function >>> should be passed. >>> >>> On a completely unrelated note, it appears that the disabled version of the >>> exit_16px.png icon is not anywhere in SVN. It can be seen in the VirtualBox >>> frontend in the VM context menu of the chooser when a VM is not running. >>> Would it be possible to obtain a copy of this icon please? >>> >>> Regards, >>> Ian >>> _______________________________________________ >>> vbox-dev mailing list >>> [email protected] >>> https://www.virtualbox.org/mailman/listinfo/vbox-dev >> >> >> >> >> >> -- >> UTS CRICOS Provider Code: 00099F >> DISCLAIMER: This email message and an >> y accompanying attachments may contain >> confidential information. If you are >> not the intended recipient, do not >> read, use, disseminate, distribute or co >> py this message or attachments. If >> you have received this message in error, >> please notify the sender >> immediately and delete this message. Any views exp >> ressed in this message >> are those of the individual sender, except where the >> sender expressly, and >> with authority, states them to be the views the Univer >> sity of Technology, >> Sydney. Before opening any attachments, please check the >> m for viruses and >> defects. _______________________________________________ vbox-dev mailing list [email protected] https://www.virtualbox.org/mailman/listinfo/vbox-dev
