public IProductSearchWebServiceGateway CreateWebServiceProxy()
        {
            var webServiceProxy = _container.Resolve <ProductSearchWebServiceGateway>();
            var wsConfig        = new OPVWebServiceConfiguration();

            var ah = new AuthHeaderGWO
            {
                Username = wsConfig.Username,
                Password = wsConfig.Password
            };

            webServiceProxy.Url             = WebServiceUrl;
            webServiceProxy.AuthHeaderValue = ah;
            webServiceProxy.Timeout         = 5000;

            return(webServiceProxy);
        }
Exemple #2
0
        public static ProductService CreateProductServiceProxy()
        {
            var wsConfig = new OPVWebServiceConfiguration();

            var        ps = new ProductService();
            AuthHeader ah = new AuthHeader();

            //Todo get config to work...
            ah.username = "******";
            ah.password = "******";
            //ah.username = wsConfig.Username;
            //ah.password = wsConfig.Password;
            ps.AuthHeaderValue = ah;
            ps.Timeout         = 10000; // 10 seconds timeout
            ps.Url             = "http://www.mediabanken.se/WS/Consumentor/ProductService.asmx";

            return(ps);
        }