Changeset 17681 in vbox for trunk/src/VBox/Main/webservice/samples/perl
- Timestamp:
- Mar 11, 2009 11:45:18 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/webservice/samples/perl/clienttest.pl
r16122 r17681 3 3 # 4 4 # This little perl program attempts to connect to a running VirtualBox 5 # webservice and calls various methods on it. 6 # 7 # To get this to run: 8 # 9 # 0) If not yet among perl's modules, install SOAP::Lite. Users of debian 10 # based systems might try 'sudo apt-get install libsoap-lite-perl'. 11 # 12 # 1) In this directory, run 13 # stubmaker file:///path/to/sdk/bindings/webservice/vboxwebService.wsdl 14 # Note: the command is named stubmaker.pl on some systems. 15 # stubmaker should be installed on your system if you have SOAP::Lite and 16 # will, after a little while of thinking, create a vboxService.pm 17 # file in the current directory, which the "use" statement below 18 # then includes. 19 # 20 # (SOAP::Lite supports parsing the WSDL file on every run of 21 # the script, but it takes up to a minute to do so, hence the external 22 # variant via stubmaker.pl here.) 23 # 24 # 2) Start vboxwebsrv. 25 # 26 # 3) Run this script. 27 # 5 # webservice and calls various methods on it. Please refer to the SDK 6 # programming reference (SDKRef.pdf) for how to use this sample. 28 7 # 29 8 # Copyright (C) 2006-2009 Sun Microsystems, Inc. … … 44 23 use strict; 45 24 use SOAP::Lite; 46 use vboxService; 25 use vboxService; # generated by stubmaker, see SDKRef.pdf 47 26 use Data::Dumper; 48 27 … … 103 82 { 104 83 print "[$cmd] Listing machines:\n"; 105 my $result = vboxService->IVirtualBox_getMachines($vbox);106 foreach my $idMachine (@ {$result->{'array'}})84 my @result = vboxService->IVirtualBox_getMachines2($vbox); 85 foreach my $idMachine (@result) 107 86 { 108 87 my $if = vboxService->IManagedObjectRef_getInterfaceName($idMachine);
Note:
See TracChangeset
for help on using the changeset viewer.