/// <summary> /// /// Builds a finder to find the portType tModels for a portType. /// /// </summary> /// <param name="portTypeName"></param> /// <param name="ns">Namespace</param> /// <returns></returns> public static find_tModel createFindPortTypeTModelForPortType(String portTypeName, String ns) { find_tModel findTModel = new find_tModel(); categoryBag categoryBag = new categoryBag(); List<keyedReference> cbitems = new List<keyedReference>(); if (ns != null && ns.Length != 0) { keyedReference namespaceReference = newKeyedReference( "uddi:uddi.org:xml:namespace", "uddi-org:xml:namespace", ns); cbitems.Add(namespaceReference); } keyedReference bindingReference = newKeyedReference( "uddi:uddi.org:wsdl:types", "uddi-org:wsdl:types", "binding"); cbitems.Add(bindingReference); keyedReference portTypeReference = newKeyedReference( "uddi:uddi.org:wsdl:porttypereference", "uddi-org:wsdl:portTypeReference", portTypeName); cbitems.Add(portTypeReference); categoryBag.Items = cbitems.ToArray(); findTModel.categoryBag = categoryBag; if (log.isDebugEnabled()) { log.debug(new PrintUDDI<find_tModel>().print(findTModel)); } return findTModel; }
/** * finds a tmodel. This is a convenience wrapper * * @param findTModel * @return null if not found or error * @throws RemoteException * @throws ConfigurationException * @throws TransportException */ public tModelList findTModel(find_tModel findTModel) { return this.findTModel(findTModel, this.uddinode.getApiNode()); }
/** * finds a tModel * * @param findTModel * @param node * @return null if not found or error * @throws RemoteException * @throws TransportException * @throws ConfigurationException */ public tModelList findTModel(find_tModel findTModel, org.apache.juddi.apiv3.node node) { findTModel.authInfo = (getAuthToken(node.securityUrl)); try { tModelList tModelList = getUDDINode().getTransport().getUDDIInquiryService(node.inquiryUrl).find_tModel(findTModel); return tModelList; } catch (Exception dr) { log.error("", dr); // DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr); //checkForErrorInDispositionReport(report, null, null); } return null; }
/// <remarks/> public void find_tModelAsync(find_tModel find_tModel1, object userState) { if ((this.find_tModelOperationCompleted == null)) { this.find_tModelOperationCompleted = new System.Threading.SendOrPostCallback(this.Onfind_tModelOperationCompleted); } this.InvokeAsync("find_tModel", new object[] { find_tModel1}, this.find_tModelOperationCompleted, userState); }
/// <remarks/> public void find_tModelAsync(find_tModel find_tModel1) { this.find_tModelAsync(find_tModel1, null); }
/// <remarks/> public System.IAsyncResult Beginfind_tModel(find_tModel find_tModel1, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("find_tModel", new object[] { find_tModel1}, callback, asyncState); }
internal static void Run(string[] args) { UDDIClient clerkManager = null; Transport transport = null; UDDIClerk clerk = null; try { clerkManager = new UDDIClient("uddi.xml"); transport = clerkManager.getTransport("uddiv2"); UDDI_Security_SoapBinding security = transport.getUDDISecurityService(); UDDI_Inquiry_SoapBinding inquiry = transport.getUDDIInquiryService(); UDDI_Publication_SoapBinding publish = transport.getUDDIPublishService(); clerk = clerkManager.getClerk("uddiv2"); find_business fb = new find_business(); //fb.authInfo = clerk.getAuthToken(security.Url); fb.findQualifiers = new string[] { UDDIConstants.APPROXIMATE_MATCH }; fb.name = new name[1]; fb.name[0] = new name(UDDIConstants.WILDCARD, "en"); businessList bl = inquiry.find_business(fb); for (int i = 0; i < bl.businessInfos.Length; i++) { Console.WriteLine(bl.businessInfos[i].name[0].Value); } find_service fs = new find_service(); fs.findQualifiers = new string[] { UDDIConstants.APPROXIMATE_MATCH }; fs.name = new name[1]; fs.name[0] = new name("%", null); serviceList sl=inquiry.find_service(fs); for (int i = 0; i < sl.serviceInfos.Length; i++) { Console.WriteLine(sl.serviceInfos[i].name[0].Value); } find_tModel ft = new find_tModel(); ft.findQualifiers = new string[] { UDDIConstants.APPROXIMATE_MATCH }; ft.name = new name("%", null); tModelList tl = inquiry.find_tModel(ft); for (int i = 0; i < tl.tModelInfos.Length; i++) { Console.WriteLine(tl.tModelInfos[i].name.Value); } // serviceDetail s= clerk.getServiceDetail("uddi:mydomain.com:zerocoolsvc"); // Console.Out.WriteLine(new PrintUDDI<serviceDetail>().print(s)); } catch (Exception ex) { while (ex != null) { System.Console.WriteLine("Error! " + ex.Message); ex = ex.InnerException; } } finally { if (transport != null && transport is IDisposable) { ((IDisposable)transport).Dispose(); } if (clerk != null) clerk.Dispose(); } }
public void findTmodels() { Console.Out.Write("find_tModel"); Assert.True(online); find_tModel fb = new find_tModel(); fb.name = new name(UDDIConstants.WILDCARD, null); fb.findQualifiers = new string[] { UDDIConstants.APPROXIMATE_MATCH }; tModelList bl = inquiry.find_tModel(fb); Assert.NotNull(bl); Assert.NotNull(bl.tModelInfos); Assert.True(bl.tModelInfos.Length > 0); for (int i = 0; i < bl.tModelInfos.Length; i++) { Assert.IsNotNullOrEmpty(bl.tModelInfos[i].tModelKey); Assert.NotNull(bl.tModelInfos[i].name); } PrintUDDI<tModelList> p = new PrintUDDI<tModelList>(); if (serialize) Console.Out.WriteLine(p.print(bl)); }