GUIClientApproachusingSGI

From HTNG Connectivity Wiki

Jump to: navigation, search

Setting up a simple GUI to Post some charges

The Single Guest Itinerary (SGI) project has detailed documentation that can be used to determine the sequence of messages needed to post a charge.

In our Client GUI example we'll look at the SGI Schema's using a tool (XML Spy) to determine the information required by the various Request/Response pairs.

In the example we will setup our GUI to

    • Perform a lookup using the Guest's name
    • Obtain the Reservation Number from the response
    • Setup a posting routine to be able to apply charges via Unit/Room No or Reservation No
    • Apply the charges and receive a response

Finally, once we have all of that working we will implement some security on top of the overall application.


Understanding the SGI Schema

Following our success in consuming the WSDL and Schema's from the HTNG documentation location (see earlier exercises), we can either edit the Schema's manually or alternatively use a populer XML WSDL and Schema creation tool called XMLSpy. An evaluation copy can be downloaded from http://www.altova.com.

Remember that XSD's (XML Schema Definition's) provide the definition of the different elements of data required to perform a partcular function. The following diagram helps to explain the overall relationship.

File:WSDLXSDRelationship.jpg

Remember that in our previous chapters we went through the process of building and publishing our web service and can now simply access it using a browser with the corect URL.

Since we want to post charges against a Guest folio we'll start by opening up the pmtpostingupdate service. You can see from it's structure that it represents a fairly complex message with many inputs and outputs available.

File:ActivityGUIClientXMLSpyPmtpostingupdate1.jpg

Based on the specification and reviewing the schema more clearly we can see that the pmtpostingupdate at minimum needs a Number to provide the guidance to the recieving system regarding whose folio to post this charge against.

File:ActivityGUIClientXMLSpyPmtpostingupdate2.jpg

In order to gather the reservation number required to post the charge we can use some of the other functions within SGI WSDL to perform a reservation number lookup using the Guests last name.

File:ActivityGUIClientXMLSpyReservationLookup.jpg

Using the results available from the ReservationLookupResultList we can use the ReservationID or RoomNumber as key information when constructing the final posting message.

File:ActivityGUIClientXMLSpyReservationLookupResultList.jpg

Personal tools
administrative tools