// Create an array to store local company objects.
Company[] companies = new Company[5];
for (int i = 0; i < 5; i++) {
Company company = new Company();
company.setName("Advertiser #" + i);
company.setType(CompanyType.ADVERTISER);
companies[i] = company;
}
// Create the companies on the server.
companies = companyService.createCompanies(companies);
if (companies != null) {
for (Company company : companies) {
System.out.println("A company with ID \"" + company.getId()
+ "\", name \"" + company.getName()
+ "\", and type \"" + company.getType() + "\" was created.");
}
} else {
System.out.println("No companies created.");
}
} catch (Exception e) {