Example #1
0
        /// <summary>
        /// Obtiene info del proveedor de metadata
        /// </summary>
        /// <param name="providerName">Nombre del proveedor de metadata de servicios.-</param>
        /// <returns></returns>
        public Fwk.ConfigSection.MetadataProvider GetProviderInfo(string providerName)
        {
            using (ASPNetSecurity.ASPNet wService = new ASPNetSecurity.ASPNet())
            {
                if (_Proxy != null)
                {
                    wService.Proxy = _Proxy;
                }
                if (_Credentials != null)
                {
                    wService.Credentials = _Credentials;
                }
                wService.Url = _URL;
                Fwk.Bases.Connector.ASPNetSecurity.MetadataProvider wMetadataProviderRemoto = wService.GetProviderInfo(providerName);

                string xml = Fwk.HelperFunctions.SerializationFunctions.SerializeToXml(wMetadataProviderRemoto);

                Fwk.ConfigSection.MetadataProvider wMetadata = Fwk.ConfigSection.MetadataProvider.GetFromXml <Fwk.ConfigSection.MetadataProvider>(xml);
                wMetadata.Name               = wMetadataProviderRemoto.Name;
                wMetadata.ApplicationId      = wMetadataProviderRemoto.ApplicationId;
                wMetadata.SourceInfo         = wMetadataProviderRemoto.SourceInfo;
                wMetadata.ConfigProviderType = wMetadataProviderRemoto.ConfigProviderType;

                return(wMetadata);
            }
        }
Example #2
0
        /// <summary>
        /// Recupera la configuración de todos los servicios de negocio.
        /// </summary>
        /// <returns>Lista de configuraciones de servicios de negocio.</returns>
        /// <date>2010-09-16T00:00:00</date>
        /// <author>moviedo</author>
        public ServiceConfigurationCollection GetAllServices()
        {
            string xmlServices = null;

            using (ASPNetSecurity.ASPNet wService = new ASPNetSecurity.ASPNet())
            {
                if (_Proxy != null)
                {
                    wService.Proxy = _Proxy;
                }
                if (_Credentials != null && wService.Credentials == null)
                {
                    wService.Credentials = _Credentials;
                }


                wService.Url = _URL;
                xmlServices  = wService.GetServicesList(_ServiceMetadataProviderName, true);
            }

            ServiceConfigurationCollection wServiceConfigurationCollection = (ServiceConfigurationCollection)
                                                                             Fwk.HelperFunctions.SerializationFunctions.DeserializeFromXml(typeof(ServiceConfigurationCollection), xmlServices);

            return(wServiceConfigurationCollection);
        }
Example #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pServiceName"></param>
        /// <param name="pData"></param>
        /// <param name="callback"></param>
        public void ExecuteServiceAsynk(string pServiceName, string pData, Delegate callback)
        {
            using (ASPNetSecurity.ASPNet wService = new ASPNetSecurity.ASPNet())
            {
                if (_Proxy != null)
                {
                    wService.Proxy = _Proxy;
                }
                if (_Credentials != null)
                {
                    wService.Credentials = _Credentials;
                }

                wService.Url = _URL;
                wService.ExecuteServiceCompleted += new Fwk.Bases.Connector.ASPNetSecurity.ExecuteServiceCompletedEventHandler(wService_ExecuteServiceCompleted);
            }
        }
Example #4
0
        /// <summary>
        /// Recupera la configuración de un servicio de negocio.
        /// </summary>
        /// <param name="pServiceName">Nombre del servicio.</param>
        /// <returns>configuración del servicio de negocio.</returns>
        /// <date>2011-04-07T00:00:00</date>
        /// <author>moviedo</author>
        public ServiceConfiguration GetServiceConfiguration(string pServiceName)
        {
            string xmlServices = null;

            using (ASPNetSecurity.ASPNet wService = new ASPNetSecurity.ASPNet())
            {
                if (_Proxy != null)
                {
                    wService.Proxy = _Proxy;
                }
                if (_Credentials != null)
                {
                    wService.Credentials = _Credentials;
                }
                wService.Url = _URL;
                xmlServices  = wService.GetServiceConfiguration(_ServiceMetadataProviderName, pServiceName);
            }

            return(ServiceConfiguration.GetServiceConfigurationFromXml(xmlServices));;
        }
Example #5
0
        /// <summary>
        /// Ejecuta un servicio de negocio.
        /// Si se produce el error:
        /// The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
        /// Se debe a un error que lanza una llamada asincrona en modo debug
        /// </summary>
        /// <param name="pServiceName">Nombre del servicio.</param>
        /// <param name="pData">XML con datos de entrada para la  ejecución del servicio.</param>
        /// <returns>XML con datos de salida del servicio.</returns>
        /// <date>2011-08-23T00:00:00</date>
        /// <author>moviedo</author>
        public string ExecuteService(string pServiceName, string pData)
        {
            string wResult = null;

            using (ASPNetSecurity.ASPNet wService = new ASPNetSecurity.ASPNet())
            {
                if (_Proxy != null)
                {
                    wService.Proxy = _Proxy;
                }
                if (_Credentials != null)
                {
                    wService.Credentials = _Credentials;
                }

                wService.Url = _URL;
                wResult      = wService.ExecuteService(_ServiceMetadataProviderName, pServiceName, pData);
            }

            return(wResult);
        }