void validateNotSigned(org.uddi.api_v3.BindingTemplate item) throws ValueNotAllowedException { if (item == null) { return; } if (item.getBindingKey() == null && !item.getSignature().isEmpty()) { throw new ValueNotAllowedException(new ErrorMessage("errors.entity.SignedButNoKey", "bindingKey")); } if (item.getServiceKey() == null && !item.getSignature().isEmpty()) { throw new ValueNotAllowedException(new ErrorMessage("errors.entity.SignedButNoKey", "serviceKey")); } }
public void findBinding(String findQualifier) { try { FindBinding body = (FindBinding)EntityCreator.buildFromDoc(FIND_BINDING_XML, "org.uddi.api_v3"); if (findQualifier!=null) body.getFindQualifiers().getFindQualifier().add(findQualifier); BindingDetail result = inquiry.findBinding(body); if (result == null) Assert.fail("Null result from find binding operation"); List<BindingTemplate> btList = result.getBindingTemplate(); if (btList == null || btList.size() == 0) Assert.fail("No result from find binding operation"); BindingTemplate btOut = btList.get(0); BindingTemplate btIn = (BindingTemplate)EntityCreator.buildFromDoc(TckBindingTemplate.JOE_BINDING_XML, "org.uddi.api_v3"); assertEquals(btIn.getServiceKey(), btOut.getServiceKey()); assertEquals(btIn.getBindingKey(), btOut.getBindingKey()); TckValidator.checkDescriptions(btIn.getDescription(), btOut.getDescription()); TckValidator.checkCategories(btIn.getCategoryBag(), btOut.getCategoryBag()); } catch(Exception e) { logger.error(e.getMessage(), e); Assert.fail("No exception should be thrown: " + e.getMessage()); } }
public static void checkBindingTemplates(BindingTemplates bts1, BindingTemplates bts2) { if (bts1 == null || bts2 == null) { assertEquals(bts1, bts2); return; } assertEquals(bts1.getBindingTemplate().size(), bts2.getBindingTemplate().size()); Iterator<BindingTemplate> bt1Iter = bts1.getBindingTemplate().iterator(); Iterator<BindingTemplate> bt2Iter = bts2.getBindingTemplate().iterator(); while (bt1Iter.hasNext()) { BindingTemplate bt1 = bt1Iter.next(); BindingTemplate bt2 = bt2Iter.next(); assertEquals(bt1.getAccessPoint().getValue(),bt2.getAccessPoint().getValue()); assertEquals(bt1.getAccessPoint().getUseType(),bt2.getAccessPoint().getUseType()); assertEquals(bt1.getBindingKey().toLowerCase(),bt2.getBindingKey()); checkCategories(bt1.getCategoryBag(), bt2.getCategoryBag()); checkDescriptions(bt1.getDescription(),bt2.getDescription()); checkHostingRedirector(bt1.getHostingRedirector(),bt2.getHostingRedirector()); //the inbound apiBindingTemplate can have a null serviceKey if (bt1.getServiceKey()!=null) { assertEquals(bt1.getServiceKey(),bt2.getServiceKey()); } checkTModelInstanceDetails(bt1.getTModelInstanceDetails(),bt2.getTModelInstanceDetails()); } }
void validateNotSigned(org.uddi.api_v3.BindingTemplate item) throws ValueNotAllowedException { if (item == null) { return; } if (item.getBindingKey() == null && !item.getSignature().isEmpty()) { throw new ValueNotAllowedException(new ErrorMessage("errors.entity.SignedButNoKey", "bindingKey")); } if (item.getServiceKey() == null && !item.getSignature().isEmpty()) { throw new ValueNotAllowedException(new ErrorMessage("errors.entity.SignedButNoKey", "serviceKey")); } }
public void saveBinding(String authInfo, String bindingXML, String bindingKey) { try { // First save the entity SaveBinding sb = new SaveBinding(); sb.setAuthInfo(authInfo); BindingTemplate btIn = (BindingTemplate)EntityCreator.buildFromDoc(bindingXML, "org.uddi.api_v3"); sb.getBindingTemplate().add(btIn); publication.saveBinding(sb); // Now get the entity and check the values GetBindingDetail gb = new GetBindingDetail(); gb.getBindingKey().add(bindingKey); BindingDetail bd = inquiry.getBindingDetail(gb); List<BindingTemplate> btOutList = bd.getBindingTemplate(); BindingTemplate btOut = btOutList.get(0); assertEquals(btIn.getServiceKey(), btOut.getServiceKey()); assertEquals(btIn.getBindingKey(), btOut.getBindingKey()); TckValidator.checkDescriptions(btIn.getDescription(), btOut.getDescription()); TckValidator.checkCategories(btIn.getCategoryBag(), btOut.getCategoryBag()); } catch(Exception e) { logger.error(e.getMessage(), e); Assert.fail("No exception should be thrown: " + e.getMessage()); } }
if (! bt.getServiceKey().equals(serviceKey + "-" + businessInt + "-" + i)) { System.out.println("not the same");
String parentKey = bindingTemplate.getServiceKey(); if (parentKey != null && parentKey.length() > 0) { if (!parentKey.equalsIgnoreCase(parent.getServiceKey())) {
String parentKey = bindingTemplate.getServiceKey(); if (parentKey != null && parentKey.length() > 0) { if (!parentKey.equalsIgnoreCase(parent.getServiceKey())) {
modelBusinessService.setEntityKey(apiBindingTemplate.getServiceKey());
modelBusinessService.setEntityKey(apiBindingTemplate.getServiceKey());
public static org.uddi.api_v2.BindingTemplate MapBinding(org.uddi.api_v3.BindingTemplate be) { if (be == null) { return null; } BindingTemplate item = new org.uddi.api_v2.BindingTemplate(); item.getDescription().addAll(MapDescription(be.getDescription())); item.setBindingKey(be.getBindingKey()); item.setServiceKey(be.getServiceKey()); item.setAccessPoint(MapAccessPoint(be.getAccessPoint())); item.setHostingRedirector(MapHostingRedir(be.getHostingRedirector())); item.setTModelInstanceDetails(MapTModelInstanceDetails(be.getTModelInstanceDetails())); return item; }
throw new RegistrationAbortedException("Aborting, Either the item exists and is signed"); if (CheckServiceAndParentForSignature(bt.getServiceKey(), uddiInquiryService, token)) { throw new RegistrationAbortedException("Aborting, Either the service or busness is signed"); if (!CheckServiceAndParentForSignature(bt.getServiceKey(), uddiInquiryService, token)) { try { DigSigUtil ds = new DigSigUtil(client.getClientConfig().getDigitalSignatureConfiguration());
try { BusinessService existingToService = uddiToClerk.findService(bindingTemplate.getServiceKey(), toClerk.getNode()); if (existingToService!=null) { log.debug("Found service with key " + existingToService.getServiceKey() + ". No need to add it again"); } else { BusinessService fromService = uddiFromClerk.findService(bindingTemplate.getServiceKey(), fromClerk.getNode());
try { BusinessService existingToService = uddiToClerk.findService(bindingTemplate.getServiceKey(), toClerk.getNode()); if (existingToService!=null) { log.debug("Found service with key " + existingToService.getServiceKey() + ". No need to add it again"); } else { BusinessService fromService = uddiFromClerk.findService(bindingTemplate.getServiceKey(), fromClerk.getNode());
BusinessService model = em.find(org.apache.juddi.model.BusinessService.class, rec.getChangeRecordNewData().getBindingTemplate().getServiceKey()); if (model == null) { logger.error("Replication error, attempting to insert a binding where the service doesn't exist yet"); BusinessService model = em.find(org.apache.juddi.model.BusinessService.class, rec.getChangeRecordNewDataConditional().getChangeRecordNewData().getBindingTemplate().getServiceKey()); if (model == null) { logger.error("Replication error, attempting to insert a binding where the service doesn't exist yet");
BusinessService model = em.find(org.apache.juddi.model.BusinessService.class, rec.getChangeRecordNewData().getBindingTemplate().getServiceKey()); if (model == null) { logger.error("Replication error, attempting to insert a binding where the service doesn't exist yet"); BusinessService model = em.find(org.apache.juddi.model.BusinessService.class, rec.getChangeRecordNewDataConditional().getChangeRecordNewData().getBindingTemplate().getServiceKey()); if (model == null) { logger.error("Replication error, attempting to insert a binding where the service doesn't exist yet");
String parentKey = bindingTemplate.getServiceKey(); if (parentKey != null && parentKey.length() > 0) {
String parentKey = bindingTemplate.getServiceKey(); if (parentKey != null && parentKey.length() > 0) {
String keystr = businessTemplate.getServiceKey(); if (keystr != null)