I am trying to process WSDL request using SOAP in VB.NET :
<AvailabilitySearch>
<Authority>
<RegionId>or<HotelId>
<HotelStayDetails>
<HotelSearchCriteria>(optional)
<DetailLevel>(optional)
<CustomDetailLevel>(optional)
<MaxResultsPerHotel>(optional, ignored)
<MaxHotels>(optional)
<SortOrder>(optional, ignored)
<MaxSearchTime>(optional, ignored)
</AvailabilitySearch>
and my coding is :
Protected Sub btnhotelsearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnhotelsearch.Click
'----------------------Authority---------------------------
Dim systemauthority As New com.roomsxmldemo.AuthorityElement
systemauthority.Currency = "USD"
systemauthority.Org = "xx"
systemauthority.User = "xx"
systemauthority.Password = "xx"
systemauthority.Version = "1.18"
'----------------------Authority End---------------------------
Dim hotelsearch As com.roomsxmldemo.AvailabilitySearch
hotelsearch.Authority = systemauthority
hotelsearch.RegionId = 18169
hotelsearch.HotelId = 0
hotelsearch.HotelStayDetails.Nights = 1
hotelsearch.HotelStayDetails.Nationality = "IQ"
hotelsearch.HotelStayDetails.ArrivalDate = "2014-01-14"
Dim result As com.roomsxmldemo.AvailabilitySearchResult
txtresult.Text = result.HotelAvailability.Length
End Sub
am getting error in Authority syntex where I passed all login details but got the following error : Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 84:
Line 85: Dim hotelsearch As com.roomsxmldemo.AvailabilitySearch
**Line 86: hotelsearch.Authority = systemauthority**
Line 87: hotelsearch.RegionId = 18169
Line 88: hotelsearch.HotelId = 0