Ejemplo n.º 1
0
        public SOAPServerEx(SOAPServerExConfig cfg, string cfgFolderPath, ILogging log)
        {
            _log             = log;
            _cfg             = cfg;
            _cfgFolderPath   = cfgFolderPath;
            _reqXsltFilePath = Path.Combine(_cfgFolderPath, XMLConfigHelper.RequestXSLTFileNameForSOAPServer);
            _rspXsltFilePath = Path.Combine(_cfgFolderPath, XMLConfigHelper.ResponseXSLTFileNameForSOAPServer);
            string wcfFilePath = Path.Combine(_cfgFolderPath, SOAPConfigHelper.SOAPServerWCFConfigFileName);
            string errFilePath = Path.Combine(_cfgFolderPath, SOAPConfigHelper.SOAPErrorMessageFileName);

            _server = new SOAPServer(wcfFilePath, errFilePath, log);
            _server.OnMessageReceived += new ReceiveSOAPMessageHandler(_server_OnMessageReceived);
        }
Ejemplo n.º 2
0
        public AbstractService()
        {
            ConfigurableServiceHost host = OperationContext.Current.Host as ConfigurableServiceHost;

            if (host == null)
            {
                throw new ArithmeticException("Cannot find ConfigurableServiceHost in current operation context.");
            }

            _server = host.Tag as SOAPServer;
            if (_server == null)
            {
                throw new ArithmeticException("Cannot find SOAPReceiver in current operation context.");
            }
        }