Forum Discussion

jwilnerzon_4845's avatar
jwilnerzon_4845
Icon for Nimbostratus rankNimbostratus
Jun 03, 2010

Error using ManagementZoneBindingStub.add_zone_file() in iControl (Java)

When I try to use the add_zone_file() method in the ZoneBindingStub I get some errors ("The requested result () was not found", "Error parsing file"). I've tried some different parameters, but how does it work? Is there an example?

 

 

The code I'm running:

 

 

ManagementZoneLocator lo = new ManagementZoneLocator();

 

ManagementZoneBindingStub stub = (ManagementZoneBindingStub)lo.getManagementZonePort(new URL(url));

 

ManagementZoneInfo zoneInfo = new ManagementZoneInfo();

 

zoneInfo.setZone_type(ManagementZoneType.MASTER);

 

zoneInfo.setOption_seq(new String[]{});

 

zoneInfo.setZone_name(zoneName);

 

zoneInfo.setView_name(viewName);

 

zoneInfo.setZone_file(zoneFileContent);

 

stub.add_zone_file(new ManagementZoneInfo[]{zoneInfo}, new String[]{fileSrcPath}, new boolean[]{false});

 

 

In the setZone_file() method; should the file content be the parameter (it says max 255 characters)?

 

 

Thanks in advance, Jonas