hello guys i am calling a webservice like this
AuthorityElement objElement = new AuthorityElement();
objElement.Org = "mitl";
objElement.User = "xml";
objElement.Password = "xmltest";
objElement.Currency = "USD";
objElement.TestDebug = true;
objElement.Version = "1.17";
AdultElement adult = new AdultElement();
//adult[0].Id = 0;
adult.Id = 0;
//adult[0].Surname = "test";
adult.Surname = "test";
//adult[0].Title = "Mr.";
adult.Title = "Mr.";
//adult[0].Forename = "test";
adult.Forename = "test";
HotelStayDetailsRoomElement obj_room_details = new HotelStayDetailsRoomElement();
GuestElement[] obj_guest = new GuestElement[1];
obj_guest[0] = adult;
obj_room_details.Guests = obj_guest;
obj_room_details.BasicRoomType = "";
obj_room_details.MealType = "";
HotelStayDetailsElement obj_hotalstay = new HotelStayDetailsElement();
obj_hotalstay.ArrivalDate = Convert.ToDateTime("2013-07-29");
obj_hotalstay.Nights = 2;
obj_hotalstay.Nationality = "AE";
obj_hotalstay.Room[0] = obj_room_details;
//HotelSearchCriteriaElement obj_search_criteria = new HotelSearchCriteriaElement();
//obj_search_criteria.MinStars = 0;
//obj_search_criteria.MinPrice = 0;
//obj_search_criteria.MaxPrice = 0;
//obj_search_criteria.AvailabilityStatus = EnumAvailabilityStatus.any;
AvailabilitySearch objSearch = new AvailabilitySearch();
objSearch.Authority = objElement;
objSearch.RegionId = 19793;
objSearch.HotelId = 0;
objSearch.DetailLevel = EnumDetailLevel.basic;
objSearch.CustomDetailLevel = "basic,canxfees";
objSearch.MaxResultsPerHotel = 0;
objSearch.MaxHotels = 0;
objSearch.MaxSearchTime = 0;
objSearch.HotelStayDetails = obj_hotalstay;
//objSearch.HotelSearchCriteria = obj_search_criteria;
ServiceSoapClient objClient = new ServiceSoapClient();
AvailabilitySearchResult arryAvSeach = objClient.AvailabilitySearch(objSearch);
I am getting a error on this webservice
http://roomsxmldemo.com/RXLStagingServicesV212/ASMX/XmlService.asmx
when you run this code you getting a error
"Object reference not set to an instance of an object."
so guys plz help me i have spend two days to find how to set code and call webservice
thanks
I am getting a error on this webservice
http://roomsxmldemo.com/RXLStagingServicesV212/ASMX/XmlService.asmx
when you run this code you getting a error
"Object reference not set to an instance of an object."
so guys plz help me i have spend two days to find how to set code and call webservice
thanks