Ejemplo n.º 1
0
        /// <summary>
        /// Service lookup
        /// </summary>
        /// <param name="parameters"></param>
        /// <returns></returns>
        public List <UddiLookupResponse> Lookup(LookupParameters parameters)
        {
            List <UddiLookupResponse> response = null;

            foreach (Registry registry in _configuration.PrioritizedRegistryList)
            {
                if (registry.Endpoints.Count > 0)
                {
                    IUddiLookupClient uddiLookupClient = new UddiFallbackClient(registry.GetAsUris());
                    response = uddiLookupClient.Lookup(parameters);

                    // Continue only as long as no result was found in the current registry
                    if (response != null && response.Count != 0)
                    {
                        break;
                    }
                }
                else
                {
                    // no endpoint is defined in the EndpointCollection
                    // so the Registry element can not be used
                }
            }
            return(response);
        }
Ejemplo n.º 2
0
        public List <ProcessDefinition> GetProcessDefinitions(List <UddiId> processDefinitionIds)
        {
            List <ProcessDefinition> processDefinitions = null;

            foreach (Registry registry in _configuration.PrioritizedRegistryList)
            {
                IUddiLookupClient uddiLookupClient = new UddiFallbackClient(registry.GetAsUris());
                processDefinitions = uddiLookupClient.GetProcessDefinitions(processDefinitionIds);

                // Continue until some was found
                if (processDefinitions != null && processDefinitions.Count != 0)
                {
                    break;
                }
            }

            return(processDefinitions);
        }