/** * Gets the details of a specific service binding key * * @param bindingKey * @param node * @return null if not found, or error, or the details of the binding * @throws DispositionReportFaultMessage * @throws RemoteException * @throws TransportException * @throws ConfigurationException */ public bindingTemplate getServiceBindingDetail(String bindingKey, org.apache.juddi.apiv3.node node) { get_bindingDetail getBindingDetail = new get_bindingDetail(); getBindingDetail.bindingKey = new string[] { bindingKey }; getBindingDetail.authInfo = (getAuthToken(node.securityUrl)); try { bindingDetail bd = getUDDINode().getTransport().getUDDIInquiryService(node.inquiryUrl).get_bindingDetail(getBindingDetail); bindingTemplate[] bindingTemplateList = bd.bindingTemplate; if (bindingTemplateList.Length == 0) { throw new ConfigurationErrorsException("Could not find ServiceBinding with key=" + bindingKey); } return bindingTemplateList[0]; } catch (Exception dr) { log.error("", dr); //DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr); //checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, bindingKey); } return null; }
private List<String> GetBindingInfo(String value) { List<String> items = new List<String>(); if (value == null) { return items; } get_bindingDetail b = new get_bindingDetail(); b.authInfo = (getAuthToken(this.getApiClerk().getNode().getSecurityUrl())); b.bindingKey = new string[] { (value) }; bindingDetail bindingDetail = getUDDINode().getTransport().getUDDIInquiryService(this.getApiClerk().getNode().getInquiryUrl()).get_bindingDetail(b); if (bindingDetail.bindingTemplate != null) for (int i = 0; i < bindingDetail.bindingTemplate.Length; i++) { items.AddRange(ParseBinding(bindingDetail.bindingTemplate[i])); } return items; }
/// <remarks/> public void get_bindingDetailAsync(get_bindingDetail get_bindingDetail1, object userState) { if ((this.get_bindingDetailOperationCompleted == null)) { this.get_bindingDetailOperationCompleted = new System.Threading.SendOrPostCallback(this.Onget_bindingDetailOperationCompleted); } this.InvokeAsync("get_bindingDetail", new object[] { get_bindingDetail1}, this.get_bindingDetailOperationCompleted, userState); }
/// <remarks/> public void get_bindingDetailAsync(get_bindingDetail get_bindingDetail1) { this.get_bindingDetailAsync(get_bindingDetail1, null); }
/// <remarks/> public System.IAsyncResult Beginget_bindingDetail(get_bindingDetail get_bindingDetail1, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("get_bindingDetail", new object[] { get_bindingDetail1}, callback, asyncState); }
/** * return true if and only if the binding exists and is signed * * @param bindingKey * @param uddiInquiryService * @param token * @param behavior * @return */ private static bool CheckExistingBindingForSignature(String bindingKey, UDDI_Inquiry_SoapBinding uddiInquiryService, String token, SignatureBehavior behavior) { get_bindingDetail gbd = new get_bindingDetail(); gbd.authInfo = (token); gbd.bindingKey = new string[] { bindingKey }; try { bindingDetail bindingDetail = uddiInquiryService.get_bindingDetail(gbd); if (bindingDetail != null && bindingDetail.bindingTemplate != null && bindingDetail.bindingTemplate.Length > 0 && bindingDetail.bindingTemplate[0].Signature != null && bindingDetail.bindingTemplate[0].Signature.Length > 0) { 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; }