public void deleteSamSyndicatorServices(String authInfoSam, int businessInt, int numberOfCopies) {
deleteServices(authInfoSam, businessInt, SAM_SERVICE_KEY, numberOfCopies);
}
public void saveServices(String authInfo, int businessInt, String serviceXML, String serviceKey, int numberOfCopies, String parentBusinessKey) {
SaveService ss = null;
try {
org.uddi.api_v3.BusinessService bsIn = (org.uddi.api_v3.BusinessService)EntityCreator.buildFromDoc(serviceXML, "org.uddi.api_v3");
String serviceName = bsIn.getName().get(0).getValue();
String bindingKey = bsIn.getBindingTemplates().getBindingTemplate().get(0).getBindingKey();
for (int i=0; i<numberOfCopies; i++) {
// save the entity
ss = new SaveService();
ss.setAuthInfo(authInfo);
bsIn.getName().get(0).setValue(serviceName + "-" + i);
bsIn.setBusinessKey(parentBusinessKey);
bsIn.setServiceKey(serviceKey + "-" + businessInt + "-" + i);
bsIn.getBindingTemplates().getBindingTemplate().get(0).setBindingKey(bindingKey + "-" + businessInt + "-" + i);
bsIn.getBindingTemplates().getBindingTemplate().get(0).setServiceKey(serviceKey + "-" + businessInt + "-" + i);
ss.getBusinessService().add(bsIn);
BindingTemplate bt = bsIn.getBindingTemplates().getBindingTemplate().get(0);
if (! bt.getServiceKey().equals(serviceKey + "-" + businessInt + "-" + i)) {
System.out.println("not the same");
}