If someone can regenerate vboxServiceWrappers.php, I will be happy to test it.<br><br>Klaus,<br><br>I would very much welcome more info in the error text produced by vboxwebsrv. I sometimes find myself having to run VBoxManage or VBoxHeadless directly to obtain useful error messages. My code does not programatically rely on the exact text returned from getMessage(), so changing this in 4.2 would not negatively affect anything for me.<br>
<br><div class="gmail_quote">On Fri, Oct 5, 2012 at 3:29 PM, Klaus Espenlaub <span dir="ltr"><<a href="mailto:klaus.espenlaub@oracle.com" target="_blank">klaus.espenlaub@oracle.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi James,<br>
<div class="im"><br>
On 04.10.2012 08:33, James Lucas wrote:<br>
> Hi Virtualbox Devs,<br>
><br>
> Could this patch please be applied before the next maintenance release?<br>
<br>
</div>It is applied (among quite many beautifications of the generated output)<br>
in<br>
<a href="https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Main/webservice/websrv-php.xsl" target="_blank">https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Main/webservice/websrv-php.xsl</a><br>
<br>
Since I changed so much I'm asking for a favor: could you double check<br>
using this XSLT file if the right wrappers are generated for VirtualBox 4.2?<br>
<br>
If I get positive feedback then the change will be backported to 4.2 and<br>
become part of 4.2.2.<br>
<br>
James/Ian (and anyone else who wrote significant amount of code<br>
interfacing with the VirtualBox webservice): this reminds me of<br>
something unrelated... does any of your code retrieve more detailed<br>
error information than what Exception::getMessage() returns? It has been<br>
a very recent discovery that the VirtualBox webservice returns<br>
incomplete error information, which is not equivalent to what the native<br>
API would return. So we're trying to figure out if anyone truly depends<br>
on the current error reporting semantics. The pending change would<br>
include more information in getMessage(), and additionally provide the<br>
(potentially empty) list of error informations.<br>
<br>
To illustrate: say some Medium API method returns two or more errors<br>
(e.g. one high level and one lower level containing more details about<br>
file access failure details), then the native API has the following<br>
information:<br>
- API result code<br>
- (last error code, last error text, component, interfaceid)<br>
- ...<br>
- (first error code, first error text, component, interfaceid)<br>
<br>
Currently the webservice takes this information, and sets the overall<br>
message to "VirtualBox Error: <last error text> (<last error code>)". So<br>
quite a bit of information loss (the extra SOAP fault details contain no<br>
additional information).<br>
<br>
The new message would be "VirtualBox Error: rc=<API result code> <last<br>
error text> (<last error code>) ... <first error text> (<first error<br>
code>)" - actually the order of messages isn't fixed yet, first to last<br>
might make more sense. Additionally we'd pass all error information<br>
across as separate information items. For 4.2 we would probably keep<br>
backwards compatibility at the SOAP fault details level, even though<br>
that'd mean to have more redundant information.<br>
<br>
What are your opinions? Bad idea to change what's returned by getMessage<br>
in 4.2 at all, even at the price of sticking to incomplete information?<br>
<br>
Oh, and there's a typo in screen.php: exteionsion<br>
<br>
Thanks for helping us to improve VirtualBox!<br>
<span class="HOEnZb"><font color="#888888"><br>
Klaus<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
> - James<br>
><br>
> On 24/09/2012, at 11:10 AM, James Lucas<<a href="mailto:jimmy@secsme.org.au">jimmy@secsme.org.au</a>>  wrote:<br>
><br>
>> Hi All,<br>
>><br>
>> Attached is a patch for the websrv-php xml stylesheet. Ian, do you mind verifying and then could the vbox developers please apply?<br>
>><br>
>> 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)<br>

>><br>
>> @@ -2173,7 +2173,7 @@<br>
>> public function setGroups($value) {<br>
>>      $request = new stdClass();<br>
>>      $request->_this = $this->handle;<br>
>> -       if (is_null($value) || is_scalar($value)) {<br>
>> +       if (is_array($value) || is_null($value) || is_scalar($value)) {<br>
>>           $request->groups = $value;<br>
>>      }<br>
>>      else<br>
>> @@ -4991,7 +4991,7 @@<br>
>> public function setEnvironment($value) {<br>
>>      $request = new stdClass();<br>
>>      $request->_this = $this->handle;<br>
>> -       if (is_null($value) || is_scalar($value)) {<br>
>> +       if (is_array($value) || is_null($value) || is_scalar($value)) {<br>
>>           $request->environment = $value;<br>
>>      }<br>
>>      else<br>
>><br>
>> As always this is licensed under MIT (and I have signed a contributor agreement with Oracle)<br>
>><br>
>> - James<br>
>><br>
>> On 23/09/2012, at 8:13 AM, Ian Moore<<a href="mailto:imooreyahoo@gmail.com">imooreyahoo@gmail.com</a>>  wrote:<br>
>><br>
>>> Hello,<br>
>>><br>
>>> Line 2176  in vboxServiceWrappers.php needs to be changed to:<br>
>>><br>
>>> if (is_null($value) || is_scalar($value) || is_array($value)) {<br>
>>><br>
>>> 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.<br>
>>><br>
>>> 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?<br>

>>><br>
>>> Regards,<br>
>>> Ian<br>
>>> _______________________________________________<br>
>>> vbox-dev mailing list<br>
>>> <a href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a><br>
>>> <a href="https://www.virtualbox.org/mailman/listinfo/vbox-dev" target="_blank">https://www.virtualbox.org/mailman/listinfo/vbox-dev</a><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> --<br>
>> UTS CRICOS Provider Code:  00099F<br>
>> DISCLAIMER: This email message and an<br>
>> y accompanying attachments may contain<br>
>> confidential information.  If you are<br>
>> not the intended recipient, do not<br>
>> read, use, disseminate, distribute or co<br>
>> py this message or attachments.  If<br>
>> you have received this message in error,<br>
>> please notify the sender<br>
>> immediately and delete this message. Any views exp<br>
>> ressed in this message<br>
>> are those of the individual sender, except where the<br>
>> sender expressly, and<br>
>> with authority, states them to be the views the Univer<br>
>> sity of Technology,<br>
>> Sydney. Before opening any attachments, please check the<br>
>> m for viruses and<br>
>> defects.<br>
<br>
_______________________________________________<br>
vbox-dev mailing list<br>
<a href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a><br>
<a href="https://www.virtualbox.org/mailman/listinfo/vbox-dev" target="_blank">https://www.virtualbox.org/mailman/listinfo/vbox-dev</a><br>
</div></div></blockquote></div><br>