clienttest.java revision 3081cf472b2203dc98508778f2a390ba07a99e1a
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Sample client for the VirtualBox web service, written in Java
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Hunt * (object-oriented bindings).
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Run the VirtualBox web service server first; see the VirtualBox
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * SDK reference for details.
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Hunt * Copyright (C) 2008-2009 Sun Microsystems, Inc.
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Hunt * The following license applies to this file only:
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Hunt * Permission is hereby granted, free of charge, to any person
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Hunt * obtaining a copy of this software and associated documentation
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Hunt * files (the "Software"), to deal in the Software without
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Hunt * restriction, including without limitation the rights to use,
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Hunt * copy, modify, merge, publish, distribute, sublicense, and/or
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Hunt * sell copies of the Software, and to permit persons to whom the
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Hunt * Software is furnished to do so, subject to the following conditions:
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Hunt * The above copyright notice and this permission notice shall be
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Hunt * included in all copies or substantial portions of the Software.
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Hunt * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Hunt * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Hunt * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Hunt * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Hunt * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Hunt * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Hunt * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Hunt * OTHER DEALINGS IN THE SOFTWARE.
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Hunt/* Somewhat ugly way to support versioning */
75b8de87879ad017c9cd2ffc328e5d2391d16e99Evan Huntimport com.sun.xml.ws.commons.virtualbox{VBOX_API_SUFFIX}.*;
public class clienttest
public clienttest()
public void disconnect()
class Desktop
Desktop(int n)
return name;
return uuid;
public void test()
public void test2()
public void test3()
public void showVMs()
catch (Exception e)
e.printStackTrace();
public void listHostInfo()
catch (Exception e)
e.printStackTrace();
catch (Exception e)
uuid,
env);
catch (Exception e)
e.printStackTrace();
public void cleanup()
disconnect();
catch (Exception e)
e.printStackTrace();
public static void printArgs()
printArgs();
c.showVMs();
c.listHostInfo();
c.test3();
c.cleanup();