final Nic_Type[] wsNics = new Nic_Type[nics.length];
for (int i = 0; i < nics.length; i++) {
final NIC nic = nics[i];
final Nic_Type wsnic = new Nic_Type();
wsnic.setName(nic.getName());
wsnic.setMAC(nic.getMAC());
wsnic.setAssociation(nic.getNetworkName());
final IPConfig_Type ip = new IPConfig_Type();
ip.setBroadcast(nic.getBroadcast());
ip.setGateway(nic.getGateway());
ip.setHostname(nic.getHostname());
ip.setIpAddress(nic.getIpAddress());
ip.setNetmask(nic.getNetmask());
ip.setNetwork(nic.getNetwork());
final IPConfig_TypeAcquisitionMethod method =
(IPConfig_TypeAcquisitionMethod)
acqMethodMap.get(nic.getAcquisitionMethod());
if (method == null) {
throw new CannotTranslateException(
"do not recognize acquisition method '" +
nic.getAcquisitionMethod() + "'");
}
ip.setAcquisitionMethod(method);
wsnic.setIpConfig(ip);
wsNics[i] = wsnic;
}
return wsNics;
}