# Assigning a Device Server to a Network
# Refer to API Usage section for how to
# create an instance of SOAP::Lite
# ie  $soap_client = new SOAP::Lite ....
  # create a network and capture its RII
  # see previous example for details
  # $soap_response = $soap_client->createNetwork($new_network_info);
  # $new_net_rii = $soap_response->result;
  # Find the device server you want this network to be associated with.
  # psuedocode example:
  # $dev_srvr_rii_array = getAllDeviceServers()->result;
  # $dev_srvr_rii = $dev_srvr_rii_array->[?];
  # build param 0
  $net_param = new SOAP::Data
    name => 'in0',
    attr => {'xsi:type' => ref($new_net_rii)},
    value => $new_net_rii;
  # build param 1
  $dev_param = new SOAP::Data
    name => 'in1',
    attr => {'xsi:type' =>  ref($dev_srvr_rii)},
    value => $dev_srvr_rii;
  # Assign this device server to that network.
  $soap_response = 
    $soap_client->assignDeviceServerToNetwork($net_param, $dev_param);
  if ($soap_response->fault) {
    print "\nSOAP fault: ".$soap_response->faultstring."\n";
   }
  else {
    $dev_srvr_array = $soap_response->result;
    print "\nNetwork ".$new_net_rii->{resourceName}.
              " is assigned to the following DevServers:\n";
    for ($i=0 ; $i < scalar(@{$dev_srvr_array}) ; $i++) {
      $this_ref = $dev_srvr_array->[$i];
      print " ".$this_ref->{resourceName}."\n";
    }
  }