public static ShippingInfoResult RequestShippingInformation(ShippingInfoRequest infoRequest)
        {
            var channel = new ChannelFactory<IOrderProcessing>("*").CreateChannel();

            var result = channel.GetShippingRequest(infoRequest);
            return result;
        }
        public static ShippingInfoResult RequestShippingInformation(ShippingInfoRequest infoRequest)
        {
            //var binding = new WSHttpBinding();
            //var address = new EndpointAddress(@"http://*****:*****@"net.tcp://localhost:8080/OrderProcessingService");

            var factory = new ChannelFactory<IOrderProcessing>(binding, address);
            var channel = factory.CreateChannel();

            var result = channel.GetShippingRequest(infoRequest);
            return result;
        }
Exemple #3
0
        private void buttonRequestShippingInfo_Click(object sender, EventArgs e)
        {
            var startDate = dateTimeStartDate.Value;
            var endDate = dateTimeEndDate.Value;

            var shipInfoRequest = new ShippingInfoRequest {StartDate = startDate, EndDate = endDate};

            var result = ServiceCommuincation.RequestShippingInformation(shipInfoRequest);
            if (!result.HasException)
            {
                DisplayShippingInfoResults(result);
            }
        }
 public ShippingInfoResult GetShippingRequest(ShippingInfoRequest request)
 {
     var requestor = new GetShippingRequestHandler(connectString);
     return requestor.GetShippingInfo(request);
 }