clerkManager.stop();
}
private void ExportBusiness() throws Exception {
FileOutputStream fos = new FileOutputStream(businessfile);
FindBusiness req = new FindBusiness();
req.setAuthInfo(token);
req.getName().add(new Name(UDDIConstants.WILDCARD, null));
req.setFindQualifiers(new FindQualifiers());
req.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
int offset = 0;
int maxrows = 100;
req.setMaxRows(maxrows);
req.setListHead(offset);
BusinessList findTModel = null;
SaveBusiness sb = new SaveBusiness();
do {
findTModel = inquiry.findBusiness(req);
if (findTModel.getBusinessInfos() != null) {
for (int i = 0; i < findTModel.getBusinessInfos().getBusinessInfo().size(); i++) {
boolean go = true;
String owner = Common.GetOwner(findTModel.getBusinessInfos().getBusinessInfo().get(i).getBusinessKey(), token, inquiry);
if (owner!=null && !usernames.contains(owner)) {
usernames.add(owner);
}
if (myitemsonly) {
if (owner == null || !owner.equalsIgnoreCase(username)) {
go = false;
System.out.println("skipping " + findTModel.getBusinessInfos().getBusinessInfo().get(i).getBusinessKey() + " owned by " + owner);
}
}
if (go) {
if (owner!=null)
mapping.setProperty(findTModel.getBusinessInfos().getBusinessInfo().get(i).getBusinessKey(), owner);
System.out.println("Exporting " + findTModel.getBusinessInfos().getBusinessInfo().get(i).getBusinessKey() + " owner " + owner);
sb.getBusinessEntity().add(GetBusiness(findTModel.getBusinessInfos().getBusinessInfo().get(i).getBusinessKey(), token));
}
}
}
//do stuff
offset = offset + maxrows;
req.setListHead(offset);
} while (false);//findTModel.getListDescription().getIncludeCount() > 0 );
if (stripSig) {
int x=0;