Skip Navigation Sample

The sample demonstrates the Sabre emulator command intercept and markup services. The functionality of these sample communications services is described as follows:

  • The EMU_COMMAND service intercepts the 1KRKLON command in Sabre emulator, replaces the command with 1KRKMUC, and then displays the response from the modified command. This service also intercepts commands that start with 1LA, but it does not send these commands to the Sabre GDS (host).

  • The EMU_RESPONSE service catches the response from the 6PAX command from the Sabre host before the response is sent to Sabre emulator. The service then marks up the response by adding a new line, and returns the modified response to Sabre emulator.

The following describes the files that this sample includes:

  • gets an instance of Activator and obtains an authentication token.

  • intercepts an emulator command starting with 1KRKLON and sends the modified command 1KRKMUC to the Sabre host. This class also intercepts command 1KRKWAW, but it does not send them to the Sabre host.

  • is a markup service that adds a new line before the last line in a response from the emulator.

  • redapp.xml registers the CommandModificationService for all commands that start with 1KRK and the MarkupService for 6`PAX`.

Running the Sample

MySabre API enables the use of the emulator services, however, do not include the sample plug-in in your run configuration at this point in order to demonstrate the emulator commands before and after running the sample.

  1. Launch Sabre Red 360 in development mode from Eclipse IDE. Sign in to the Sabre host using Sabre emulator.

  2. Type the 1KRKLON command. The host response displays availability from Krakow to London.

  3. Type the 1KRKWAW command. The host response displays availability from Krakow to Warsaw.

  4. Type the 6PAX command. The host response displays *.

  5. Exit Sabre Red 360.

  6. In Eclipse, import the plug-in into your workspace and add it to your run configuration.

  7. Launch Sabre Red 360 from your run configuration and log in with your CERT Sabre ID.

  8. Log in to the Sabre host using Sabre emulator.

  9. To see the EMU_COMMAND service, type the 1KRKLON command.

  10. The sample service modifies this command and returns availability from Krakow to Munich.

  1. To see the remaining capability in the EMU_COMMAND service, type the 1KRKWAW command. The service intercepts this command without sending the command to the host.

  1. To see the EMU_RESPONSE service, type 6PAX. The sample response inserts a line in the response: This line was inserted by MarkupService.