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.espenl...@sun.com>/* wrote:


    From: Klaus Espenlaub <klaus.espenl...@sun.com>
    Subject: Re: [vbox-dev] IMachine::mediumAttachments and incorrect
    behavior using vboxwebsrv API
    To: "Joseph Smith" <joseph1962sm...@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.espenl...@sun.com
    </mc/compose?to=klaus.espenl...@sun.com>>/* wrote:
    >
    >
    >     From: Klaus Espenlaub <klaus.espenl...@sun.com
    </mc/compose?to=klaus.espenl...@sun.com>>
    >     Subject: Re: [vbox-dev] IMachine::mediumAttachments and
    incorrect
    >     behavior using vboxwebsrv API
    >     To: "Joseph Smith" <joseph1962sm...@yahoo.com
    </mc/compose?to=joseph1962sm...@yahoo.com>>
    >     Cc: vbox-dev@virtualbox.org
    </mc/compose?to=vbox-...@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@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@virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-dev

Reply via email to