title: process WSDL request using SOAP in VB.NET
body: <p>I am trying to process WSDL request using SOAP in VB.NET :</p>
  
  <pre><code>    &lt;AvailabilitySearch&gt; 
  &lt;Authority&gt; 
  &lt;RegionId&gt;or&lt;HotelId&gt;
   &lt;HotelStayDetails&gt;
   &lt;HotelSearchCriteria&gt;(optional) 
  &lt;DetailLevel&gt;(optional) 
  &lt;CustomDetailLevel&gt;(optional) 
  &lt;MaxResultsPerHotel&gt;(optional, ignored) 
  &lt;MaxHotels&gt;(optional)
   &lt;SortOrder&gt;(optional, ignored)
   &lt;MaxSearchTime&gt;(optional, ignored) 
  &lt;/AvailabilitySearch&gt;
  </code></pre>
  
  <p>and my coding is :</p>
  
  <pre><code> 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
  </code></pre>
  
  <p>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.</p>
  
  <p>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. </p>
  
  <p>Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.</p>
  
  <p>Source Error: </p>
  
  <pre><code>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
  </code></pre>