Alcances 2012 Web Services

Example Code.
Demonstrating the RQBookingSupport.rqGetSupportInfo Web Method Call.

This Method Can Be Used To Return Support Data including..,
-List Of Hotels And Their Codes
-List Of BoardTypes And Their Codes
-List Of HotelRatings And Their Codes

The Method can be used to populate drop down lists/lookups in support of search queries.

Returns the following XML Structure....

XML Output:
<AlcancesData>
  <SupportData>
    <Hotels>
      <Hotel hotelid="-1" >Choose All Hotels</Hotel>
      <Hotel hotelid="951" >Acorn Almirante Farragut</Hotel>
    </Hotels>
    <BoardDescriptions>
      <BoardType BoardID="-1" >Choose All Board Types</BoardType>
      <BoardType BoardID="3" >All Inclusive</BoardType>
    </BoardDescriptions>
    <HotelRatings>
      <Rating RatingID="-1" >Choose All Ratings</Rating>
      <Rating RatingID="4" >4 Star</Rating>
    </HotelRatings>
  </SupportData>
</AlcancesData>


Function fnGetSupportData

' get SupportData

Const METHOD_NAME As String = "fnGetSupportData"

Try

Dim oProxy As New RQBookingSupport.RQBookingSupport

Dim oAuthHeader As New rqBookingSupport.clsAuthenticationHeader

'// System Credential And UserID taken from prevous call to rqGetCredentials

oAuthHeader.SystemCredential = Session("SystemCredential")

oAuthHeader.UserID = Session("ValidatedUserID")

oProxy.clsAuthenticationHeaderValue = oAuthHeader

Dim sXML As String = oProxy.rqGetSupportInfo()

'// XML Returned In sXML

Catch ex As Exception

'Exception occurred within this method, log it

Log.WriteLogEntry(ex, Me.CLASS_NAME, METHOD_NAME)

End Try

End Function