当前位置: 首页>>代码示例>>C#>>正文


C# org.getAllServices方法代码示例

本文整理汇总了C#中org.getAllServices方法的典型用法代码示例。如果您正苦于以下问题:C# org.getAllServices方法的具体用法?C# org.getAllServices怎么用?C# org.getAllServices使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org的用法示例。


在下文中一共展示了org.getAllServices方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: registerBusinessServices

        public businessService[] registerBusinessServices(org.xmlsoap.schemas.easyWsdl.tDefinitions wsdlDefinition)
        {
            List<businessService> businessServices = new List<businessService>();
            Dictionary<apache.juddi.v3.client.mapping.QName, org.xmlsoap.schemas.easyWsdl.tService>.Enumerator it = wsdlDefinition.getAllServices().GetEnumerator();
            while (it.MoveNext())
            {
                QName serviceQName = (QName)it.Current.Key;
                org.xmlsoap.schemas.easyWsdl.tService service = wsdlDefinition.getService(serviceQName);
                businessService businessService = null;
                //add service
                Uri serviceUrl = null;
                if (service.port != null && service.port.Count > 0)
                {
                    HashSet<org.xmlsoap.schemas.easyWsdl.tPort>.Enumerator it2 = service.port.GetEnumerator();
                    while (it2.MoveNext())
                    {
                        //for (Object portName : service.getPorts().keySet()) {
                        businessService = registerBusinessService(serviceQName, (String)it2.Current.name, serviceUrl, wsdlDefinition).getBusinessService();
                    }
                }
                if (businessService != null)
                {
                    businessServices.Add(businessService);
                }
            }

            return businessServices.ToArray();
        }
开发者ID:lazycrazyowl,项目名称:juddi,代码行数:28,代码来源:WSDL2UDDI.cs

示例2: unRegisterBusinessServices

        public String[] unRegisterBusinessServices(org.xmlsoap.schemas.easyWsdl.tDefinitions wsdlDefinition)
        {
            String[] businessServices = new String[wsdlDefinition.getAllServices().Count];
            int i = 0;
            Dictionary<apache.juddi.v3.client.mapping.QName, org.xmlsoap.schemas.easyWsdl.tService>.Enumerator it = wsdlDefinition.getAllServices().GetEnumerator();
            while (it.MoveNext())
            {

                QName serviceQName = it.Current.Key;
                org.xmlsoap.schemas.easyWsdl.tService service = it.Current.Value;
                //unregister service
                Uri serviceUrl = null;
                if (service.port != null && service.port.Count > 0)
                {
                    HashSet<org.xmlsoap.schemas.easyWsdl.tPort>.Enumerator it2 = service.port.GetEnumerator();
                    while (it2.MoveNext())
                    {
                        //construct the accessURL
                        serviceUrl = new Uri(getBindingURL((org.xmlsoap.schemas.easyWsdl.tPort)service.getPort(it2.Current.name)));
                        businessServices[i++] = unRegisterBusinessService(serviceQName, (String)it2.Current.name, serviceUrl);
                    }
                }
            }
            return businessServices;
        }
开发者ID:lazycrazyowl,项目名称:juddi,代码行数:25,代码来源:WSDL2UDDI.cs

示例3: createBusinessServices

        /// <summary>
        /// 
        /// Creates a business service based off of a WSDL definition&lt;Br&gt;No changes are made to the UDDI
        /// endpoints using this method
        /// &lt;br&gt;
        /// Example Code:
        /// &lt;pre&gt;
        /// URL url = new URL(&quot;http://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php?wsdl&quot;);
        /// String domain = url.getHost();
        /// ReadWSDL rw = new ReadWSDL();
        /// Definition wsdlDefinition = rw.readWSDL(url);
        /// properties.put(&quot;keyDomain&quot;, domain);
        /// properties.put(&quot;businessName&quot;, domain);
        /// properties.put(&quot;serverName&quot;, url.getHost());
        /// properties.put(&quot;serverPort&quot;, url.getPort());
        /// wsdlURL = wsdlDefinition.getDocumentBaseURI();
        /// WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(null, new URLLocalizerDefaultImpl(), properties);
        /// BusinessServices businessServices = wsdl2UDDI.createBusinessServices(wsdlDefinition);
        /// &lt;/pre&gt;
        /// </summary>
        /// <param name="wsdlDefinition">must not be null</param>
        /// <returns>a business service</returns>
        /// <exception cref="ArgumentNullException"> if the wsdlDefinition is null</exception>
        public businessService[] createBusinessServices(org.xmlsoap.schemas.easyWsdl.tDefinitions wsdlDefinition)
        {
            if (wsdlDefinition == null)
            {
                throw new ArgumentNullException();
            }
            List<businessService> businessServices = new List<businessService>();

            Dictionary<apache.juddi.v3.client.mapping.QName, org.xmlsoap.schemas.easyWsdl.tService>.Enumerator it = wsdlDefinition.getAllServices().GetEnumerator();
            while (it.MoveNext())
            {
                QName serviceQName = it.Current.Key;
                org.xmlsoap.schemas.easyWsdl.tService service = it.Current.Value;
                businessService businessService = createBusinessService(serviceQName, wsdlDefinition);
                //service.getExtensibilityElements().
                //add the bindingTemplates
                Uri serviceUrl = null;
                if (service.port != null && service.port.Count > 0)
                {
                    List<bindingTemplate> bts = new List<bindingTemplate>();
                    HashSet<org.xmlsoap.schemas.easyWsdl.tPort>.Enumerator it2 = service.port.GetEnumerator();
                    while (it2.MoveNext())
                    {
                        bindingTemplate bindingTemplate = createWSDLBinding(serviceQName, (String)it2.Current.name, serviceUrl, wsdlDefinition);
                        bts.Add(bindingTemplate);
                    }
                    businessService.bindingTemplates = bts.ToArray();
                }
                businessServices.Add(businessService);
            }

            return businessServices.ToArray();
        }
开发者ID:lazycrazyowl,项目名称:juddi,代码行数:56,代码来源:WSDL2UDDI.cs


注:本文中的org.getAllServices方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。