# Create a new Network "TestNetwork” using Voyence API. # Refer to API Usage section for how to # create an instance of SOAP::Lite # ie $soap_client = new SOAP::Lite .... # create a network RII object for new net $new_net_rii = { resourceName => 'TestNetwork', resourceType => 'NETWORK', resourceKey => undef}; bless $new_net_rii, 'ResourceIdentityInfo'; #create a NetworkInfo object and insert netRII in it $new_net_info = { resourceIdentityInfo => $new_net_rii, description => 'created via API/SOAP::Lite'}; bless $new_net_info, 'NetworkInfo'; # build param 0 $net_param = new SOAP::Data name => 'in0', attr => {'xsi:type' => ref($new_net_info)}, value => $new_net_info; $soap_response = $soap_client->createNetwork($net_param); if ($soap_response->fault) { print "\nSOAP fault: ".$soap_response->faultstring."\n"; } else { $new_net_rii = $soap_response->result; print "\nNew resourceKey is: ".$new_net_rii->{'resourceKey'}."\n"; }