[vbox-dev] IMachine::mediumAttachments and incorrect behavior using vboxwebsrv API

Klaus Espenlaub Klaus.Espenlaub at Sun.COM
Tue Mar 9 09:10:10 GMT 2010


Joseph Smith wrote:
> Hi Klaus/James,
> 
> I have also observed this same problem when returning a list of shared 
> folders.
> 
> When more than one shared folder is configured, the response correctly 
> contains a list of ISharedFolder objects.  When there is only a single 
> shared folder in the list, rather than return a list with one entry, a 
> ISharedFolder object itself (no list) is returned.
> 
> I have not investigated other scenarios yet where a list of objects can 
> be returned to see if possibly this problem (one vs many items in the 
> response list) might be across the board.
> 
> Environment/Version information is still the same ... re-adding here for 
> your convenience:
> 
> Language: PHP (using the generated PHP wrappers)
> Version: PUEL 3.1.0
> Downloaded: ~ Dec 2009
> 
> I am targeting to upgrade to 3.1.4 this weekend and will re-test with 
> that version to see if there is any difference.

Very well possible - I just wonder why this goes unnoticed with all 
other language bindings. I don't have time to investigate this right 
now, there are higher priority issues on my plate.

Klaus

> 
> 
> Thanks,
> Joe
> 
> --- On *Mon, 3/8/10, James Lucas /<jimmy at secsme.org.au>/* wrote:
> 
> 
>     From: James Lucas <jimmy at secsme.org.au>
>     Subject: Re: [vbox-dev] IMachine::mediumAttachments and incorrect
>     behavior using vboxwebsrv API
>     To: vbox-dev at virtualbox.org
>     Date: Monday, March 8, 2010, 12:29 AM
> 
>     Hi Klaus,
> 
>     Maybe I am reading this wrong but the error does appear to me to be
>     coming from the webserver side not the PHP wrappers. Raw SOAP output
>     below shows that when there is only one IMedium attachment the
>     IMachine::mediumAttachments is returning a IMediumAttachment object
>     instead of a array of handles like what occurs when there are >1
>     attachments.
> 
>     <attribute name="mediumAttachments" type="IMediumAttachment"
>     readonly="yes" safearray="yes">
>     <desc>Array of media attached to this machine.</desc>
>     </attribute>
> 
>     [__last_request] =>  <?xml version="1.0" encoding="UTF-8"?>
>         <SOAP-ENV:Envelope
>     xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
>     xmlns:ns1="http://www.virtualbox.org/">
>             <SOAP-ENV:Body>
>                 <ns1:IMachine_getMediumAttachments>
>                     <_this>60a7bea78c2c71d4-0000000000016993</_this>
>                 </ns1:IMachine_getMediumAttachments>
>             </SOAP-ENV:Body>
>         </SOAP-ENV:Envelope>
> 
>                     [__last_response] =>  <?xml version="1.0"
>     encoding="UTF-8"?>
>         <SOAP-ENV:Envelope
>     xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
>     xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
>     xmlns:vbox="http://www.virtualbox.org/">
>             <SOAP-ENV:Body>
>                 <vbox:IMachine_getMediumAttachmentsResponse>
>                     <returnval>
>                         <medium>60a7bea78c2c71d4-00000000000169a4</medium>
>                         <controller>IDE Controller</controller>
>                         <port>0</port>
>                         <device>0</device>
>                         <type>HardDisk</type>
>                         <passthrough>false</passthrough>
>                     </returnval>
>                 </vbox:IMachine_getMediumAttachmentsResponse>
> 
> 
> 
>     On 6/03/10 1:09 PM, Joseph Smith wrote:
>      > Hi Klaus,
>      >
>      > Sorry about that ... my mistake ... I had intended to do a
>     reply-all ... but I must have accidentally done only a reply ....
>      >
>      > Joe
>      >
>      >
>      > --- On *Fri, 3/5/10, Klaus Espenlaub /<Klaus.Espenlaub at Sun.COM
>     </mc/compose?to=Klaus.Espenlaub at Sun.COM>>/* wrote:
>      >
>      >
>      >     From: Klaus Espenlaub <Klaus.Espenlaub at Sun.COM
>     </mc/compose?to=Klaus.Espenlaub at Sun.COM>>
>      >     Subject: Re: [vbox-dev] IMachine::mediumAttachments and incorrect
>      >     behavior using vboxwebsrv API
>      >     To: "Joseph Smith" <joseph1962smith at yahoo.com
>     </mc/compose?to=joseph1962smith at yahoo.com>>
>      >     Date: Friday, March 5, 2010, 12:34 PM
>      >
>      >     Joseph Smith wrote:
>      >     > Hi Klaus,
>      >     >
>      >     > My apologies for not including such obviously important
>      >     information.  :(
>      >     >
>      >     > Language: PHP (using the generated PHP wrappers)
>      >     > Version: PUEL 3.1.0
>      >     > Downloaded: ~ Dec 2009
>      >     >
>      >     > I tried searching bugtracker before e-mailing this group to see
>      >     if there was an issue opened for this but maybe did not use the
>      >     right search criteria as nothing came up that seemed like the
>      >     problem I've described.
>      >
>      >     *Please* stay on the list, as what you're doing prevents
>      >     information getting found. Next time I will ignore any mail
>      >     directly sent to me. Feel free to CC back to the list.
>      >
>      >     I just saw a few minor changes about 3 months ago, and they don't
>      >     affect arrays. This was shortly before 3.1.0 was released. No
>      >     other significant changes afterwards.
>      >
>      >     So to me it seems like this is either a bug in the PHP soap code
>      >     in general, or in the PHP wrappers about which you should know
>      >     orders of magnitude more than I do. Other webservice language
>      >     bindings certainly have no problems (well, Python had a similar
>      >     issue ages ago, which is what I remembered correctly).
>      >
>      >     Klaus
>      >
>      >     >
>      >     > Thanks,
>      >     > Joe
>      >     >
>      >     > --- On *Fri, 3/5/10, Klaus Espenlaub
>     /<Klaus.Espenlaub at Sun.COM </mc/compose?to=Klaus.Espenlaub at Sun.COM>
>      >     </mc/compose?to=Klaus.Espenlaub at Sun.COM
>     </mc/compose?to=Klaus.Espenlaub at Sun.COM>>>/* wrote:
>      >     >
>      >     >
>      >     >     From: Klaus Espenlaub <Klaus.Espenlaub at Sun.COM
>     </mc/compose?to=Klaus.Espenlaub at Sun.COM>
>      >     </mc/compose?to=Klaus.Espenlaub at Sun.COM
>     </mc/compose?to=Klaus.Espenlaub at Sun.COM>>>
>      >     >     Subject: Re: [vbox-dev] IMachine::mediumAttachments and
>      >     incorrect
>      >     >     behavior using vboxwebsrv API
>      >     >     To: "Joseph Smith" <joseph1962smith at yahoo.com
>     </mc/compose?to=joseph1962smith at yahoo.com>
>      >     </mc/compose?to=joseph1962smith at yahoo.com
>     </mc/compose?to=joseph1962smith at yahoo.com>>>
>      >     >     Cc: vbox-dev at virtualbox.org
>     </mc/compose?to=vbox-dev at virtualbox.org>
>      >     </mc/compose?to=vbox-dev at virtualbox.org
>     </mc/compose?to=vbox-dev at virtualbox.org>>
>      >     >     Date: Friday, March 5, 2010, 9:32 AM
>      >     >
>      >     >     Joseph Smith wrote:
>      >     > > Hi,
>      >     > >
>      >     > > After quite a bit of testing, I believe there is definitely a
>      >     >     problem with the IMachine::mediumAttachments webservice
>      >     API.  Per
>      >     >     the documentation, this API should return a collection
>     of medium
>      >     >     attachment objects (actually a handle for each attachment
>      >     object).     Essentially a list (collection) with zero to many
>      >     handles.
>      >     > >
>      >     > > This works well when there is more than one medium
>     attachment in
>      >     >     the list.  Whenever there is only one attachment in the
>      >     list, the
>      >     >     IMachine::mediumAttachments API actually returns a medium
>      >     attachment
>      >     >     object rather than a list with a single object (handle).
>      >     > >
>      >     > > It seems this is a problem with vboxwebsrv.  Has anyone
>      >     >     encountered this problem using other API approaches (e.g:
>      >     XPCOM) ?
>      >     >
>      >     >     I seem to remember that a bug in this area was found
>     and fixed a
>      >     >     while ago. Which language do you use, which VirtualBox
>      >     version and
>      >     >     when did you download the SDK?
>      >     >
>      >     >     Klaus
>      >
>      >
>      >
>      > _______________________________________________
>      > vbox-dev mailing list
>      > vbox-dev at virtualbox.org </mc/compose?to=vbox-dev at virtualbox.org>
>      > http://vbox.innotek.de/mailman/listinfo/vbox-dev
>      >   
> 
>     --
>     UTS CRICOS Provider Code:  00099F
>     DISCLAIMER: This email message and any accompanying attachments may
>     contain
>     confidential information.  If you are not the intended recipient, do not
>     read, use, disseminate, distribute or copy this message or
>     attachments.  If
>     you have received this message in error, please notify the sender
>     immediately and delete this message. Any views expressed in this message
>     are those of the individual sender, except where the sender
>     expressly, and
>     with authority, states them to be the views the University of
>     Technology,
>     Sydney. Before opening any attachments, please check them for
>     viruses and
>     defects.
> 
>     _______________________________________________
>     vbox-dev mailing list
>     vbox-dev at virtualbox.org </mc/compose?to=vbox-dev at virtualbox.org>
>     http://vbox.innotek.de/mailman/listinfo/vbox-dev
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> http://vbox.innotek.de/mailman/listinfo/vbox-dev




More information about the vbox-dev mailing list