public static TransfersResponseV3 Search(TransfersRequestV3 request, AggregatorSetting aggregatorSetting) { var authSoapHd = new AuthSoapHd { strUserName = aggregatorSetting.PtsUserName, strNetwork = aggregatorSetting.PtsNetwork, strPassword = aggregatorSetting.PtsPassword, strUserRef = "", strCustomerIP = "" //HttpContext.Current == null ? String.Empty : (HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"] ?? HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]).Split(',')[0].Trim() }; var service = new AccommodationService { Url = aggregatorSetting.PtsUrl, AuthSoapHdValue = authSoapHd, Timeout = aggregatorSetting.PtsTimeOut }; var stopwatch = new Stopwatch(); stopwatch.Start(); TransfersResponseV3 response = service.GetTransfersV3(request); stopwatch.Stop(); return response; }
public static SuperAvailabilityResponse Search(AccommodationSearchRequest request, Settings settings, AggregatorSetting aggregatorSetting, out int searchTime) { var availabilityRequest = GetRequest(request, aggregatorSetting, settings); var authSoapHd = new AuthSoapHd { strUserName = aggregatorSetting.PtsUserName, strNetwork = aggregatorSetting.PtsNetwork, strPassword = aggregatorSetting.PtsPassword, strUserRef = "", strCustomerIP = "" //HttpContext.Current == null ? String.Empty : (HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"] ?? HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]).Split(',')[0].Trim() }; //"http://172.16.200.174/Tritonroomswsdev/AccommodationServicev2.svc"; var service = new AccommodationService { Url = aggregatorSetting.PtsUrl, AuthSoapHdValue = authSoapHd, Timeout = aggregatorSetting.PtsTimeOut }; var stopwatch = new Stopwatch(); stopwatch.Start(); SuperAvailabilityResponse response = service.GetSuperAvailability(availabilityRequest); stopwatch.Stop(); searchTime = (int)stopwatch.ElapsedMilliseconds; return response; }