.Net code for hotel search request to Travelport
public void SearchHotelAvailability(Uri uri, string userName, string password, string targetBranch) {
HotelSearchAvailabilityReq request = new HotelSearchAvailabilityReq();
request.BillingPointOfSaleInfo = new BillingPointOfSaleInfo();
request.BillingPointOfSaleInfo.OriginApplication = “UAPI”;
HotelLocation location = new HotelLocation();
location.Location = “PDX”; //”YVR”, BOB, LOX, DEN
location.LocationType = typeHotelLocation.City;
request.HotelLocation = location;
HotelSearchModifiers searchModifiers = new HotelSearchModifiers();
searchModifiers.NumberOfAdults = 2;
searchModifiers.NumberOfRooms = 1;
searchModifiers.MaxProperties = 20;
request.HotelSearchModifiers = searchModifiers;
HotelStay stay = new HotelStay();
DateTime checkinDate = DateTime.Parse(“2012-09-17”);
stay.CheckinDate = checkinDate;
stay.CheckoutDate = DateTime.Parse(“2012-09-18”);
request.HotelStay = stay;
HotelSearchServiceBinding binding = new HotelSearchServiceBinding();
//https://emea.copy-webservices.travelport.com/B2BGateway/connect/uAPI/HotelService
binding.Url = uri.ToString();
binding.Credentials = new NetworkCredential(userName, password);
request.TargetBranch = targetBranch;
try
{
HotelSearchAvailabilityRsp response = binding.service(request);
}
catch (Exception ex)
{
}
}
Some useful ref materials: https://github.com/Travelport/travelport-uapi-tutorial/blob/master/src/com/travelport/uapi/unit2/HotelTest.java