/** * return true if and only if the binding exists and is signed * * @param bindingKey * @param uddiInquiryService * @param token * @param behavior * @return true/false */ private static boolean CheckExistingBindingForSignature(String bindingKey, UDDIInquiryPortType uddiInquiryService, String token, SignatureBehavior behavior) { GetBindingDetail gbd = new GetBindingDetail(); gbd.setAuthInfo(token); gbd.getBindingKey().add(bindingKey); try { BindingDetail bindingDetail = uddiInquiryService.getBindingDetail(gbd); if (bindingDetail != null && !bindingDetail.getBindingTemplate().isEmpty() && !bindingDetail.getBindingTemplate().get(0).getSignature().isEmpty()) { log.info("the binding template with key=" + bindingKey + " exists and is digitally signed"); } return true; } catch (Exception ex) { log.debug("Error caught checking for the existence of and if a signature is present for binding key " + bindingKey + " this may be ignorable", ex); } return false; }
private List<String> GetBindingInfo(String value) throws Exception { List<String> items = new ArrayList<String>(); if (value == null) { return items; } GetBindingDetail b = new GetBindingDetail(); b.setAuthInfo(getAuthToken(this.getApiClerk().getNode().getSecurityUrl())); b.getBindingKey().add(value); BindingDetail bindingDetail = getUDDINode().getTransport().getUDDIInquiryService(this.getApiClerk().getNode().getInquiryUrl()).getBindingDetail(b); for (int i = 0; i < bindingDetail.getBindingTemplate().size(); i++) { items.addAll(ParseBinding(bindingDetail.getBindingTemplate().get(i))); } return items; }
req = new GetBindingDetail(); req.getBindingKey().add(bindingKey); serviceDetail = config.inquiry.getBindingDetail(req);
BindingDetail response = null; try { response = inquiry.getBindingDetail(req); } catch (Exception ex) { log.log(Level.ERROR, "error caught uddi agent endpoints", ex);
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()); } }
getBindingDetail.setAuthInfo(getAuthToken(node.getSecurityUrl())); try { BindingDetail bd = getUDDINode(node).getTransport().getUDDIInquiryService(node.getInquiryUrl()).getBindingDetail(getBindingDetail); List<BindingTemplate> bindingTemplateList = bd.getBindingTemplate(); if (bindingTemplateList.size() == 0) {
BindingDetail irr = null; try { irr = inquiry.getBindingDetail(ir); } catch (DispositionReportFaultMessage ex) { log.log(Level.ERROR, "Could not publish data for service " + sp.getURL() + " to UDDI binding key " + policy.getBindingKey() + dispositionReportFaultMessageToString(ex), ex);