Beispiel #1
0
        /// <summary>
        /// The application_ start.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="e">
        /// The e.
        /// </param>
        protected void Application_Start(object sender, EventArgs e)
        {
            _log.Debug("Starting application");
            SdmxException.SetMessageResolver(new MessageDecoder());
            UriUtils.FixSystemUriDotBug();

            var wsdlRegistry = WsdlRegistry.Instance;
            var sdmxRestServiceHostFactory = new SdmxRestServiceHostFactory(typeof(IStaticWsdlService));

            var serviceRoute = new ServiceRoute("wsdl", sdmxRestServiceHostFactory, typeof(StaticWsdlService));

            RouteTable.Routes.Add(serviceRoute);
            wsdlRegistry.Add(
                new WsdlInfo {
                Name = "NSIEstatV20Service", OriginalPath = "sdmx_estat/NSI.wsdl"
            },
                new WsdlInfo {
                Name = "NSIStdV20Service", OriginalPath = "sdmx_org/NSI.wsdl"
            },
                new WsdlInfo {
                Name = "SdmxService", OriginalPath = "sdmxv21/SDMX-WS.wsdl"
            });

            RouteTable.Routes.Add(new ServiceRoute("NSIEstatV20Service", new SoapServiceHostFactory(typeof(INSIEstatV20Service), "sdmx_estat/NSI.wsdl"), typeof(NsiEstatV20Service)));
            RouteTable.Routes.Add(new ServiceRoute("NSIStdV20Service", new SoapServiceHostFactory(typeof(INSIStdV20Service), "sdmx_org/NSI.wsdl"), typeof(NsiStdV20Service)));
            RouteTable.Routes.Add(new ServiceRoute("SdmxService", new SoapServiceHostFactory(typeof(INSIStdV21Service), "sdmxv21/SDMX-WS.wsdl"), typeof(NSIStdV21Service)));
            RouteTable.Routes.Add(new ServiceRoute("rest/data", new SdmxRestServiceHostFactory(typeof(IDataResource)), typeof(DataResource)));
            RouteTable.Routes.Add(new ServiceRoute("rest", new SdmxRestServiceHostFactory(typeof(IStructureResource)), typeof(StructureResource)));
        }
Beispiel #2
0
        protected void Application_Start()
        {
            UriUtils.FixSystemUriDotBug();
            //RouteTable.Routes.Add(new ServiceRoute("data", new WebServiceHostFactory(), typeof(DataResource)));

            RouteTable.Routes.Add(new ServiceRoute("data", new SdmxRestServiceHostFactory(typeof(IDataResource)), typeof(DataResource)));
            RouteTable.Routes.Add(new ServiceRoute("", new SdmxRestServiceHostFactory(typeof(IStructureResource)), typeof(StructureResource)));
        }