Kazim Jamal
Kazim Jamal

Reputation: 15

Issue ticket from Sabre API

I am trying to implement an application to book flights using Sabre API. I have successfully created the PNR and am moving towards issuing tickets. I followed the listed workflow to book and issue ticket.

  1. BargainFinderMaxRQ to find the flights
  2. PassengerDetailsRQ to generate PNR
  3. EnhancedAirBookRQ to book the flight segment

To issue ticket I am following this workflow:

  1. TravelItineraryReadRQ to get PNR
  2. DesignatePrinterLLSRQ to designate a printer(Even though i do not want to designate a printer as I only require e-tickets)
  3. AirTicketLLSRQ to issue tickets
  4. EndTransactionLLSRQ to end the transaction and send email

I am stuck for a couple of days in issuing the ticket and have been working a lot to overcome but through one or more steps I somehow do get stuck somewhere. Right now I am stuck at DesignatePrinterLLSRQ which says ERR.SWS.CLIENT.VALIDATION_FAILED.

Attached are my xml logs: Request Body:

<SOAP-ENV:Body>
<DesignatePrinterRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.0.1">
<Printers>
<BagTag LNIATA=""/>
</Printers>
</DesignatePrinterRQ>
  <DesignatePrinterRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.0.1">
<Printers>
<BagTag Undesignate="true"/>
</Printers>
</DesignatePrinterRQ>
      </SOAP-ENV:Body>

Response:

<soap-env:Body>
        <soap-env:Fault>
            <faultcode>soap-env:Client.Validation</faultcode>
            <faultstring>ERR.SWS.CLIENT.VALIDATION_FAILED</faultstring>
            <detail>
                <stl:ApplicationResults xmlns:stl="http://services.sabre.com/STL/v01" status="NotProcessed">
                    <stl:Error timeStamp="2017-02-10T02:35:51-06:00" type="Validation">
                        <stl:SystemSpecificResults>
                            <stl:Message>Request resulted in empty Host Command</stl:Message>
                            <stl:ShortText>ERR.SWS.CLIENT.VALIDATION_FAILED</stl:ShortText>
                        </stl:SystemSpecificResults>
                    </stl:Error>
                </stl:ApplicationResults>
            </detail>
        </soap-env:Fault>
    </soap-env:Body>

If it is possible, do let me know if there is an issue with my workflow. Regards

Upvotes: 1

Views: 2134

Answers (2)

httPants
httPants

Reputation: 2143

Sabre has the concept of virtual printers, which are not physical printers and are suitable for cases like this, where you don't want something to be actually printed. You need to get sabre to configure virtual printers and give you the line addresses for them.

Your workflow for ticketing should be...

  • Get a sabre session
  • Designate a printer. You may need to change your duty code to 4 or 5 before this otherwise printer designation can fail.
  • Call AirTicket
  • EndTransaction

Make sure your itinerary is quoted before issuing a ticket.

When designating a printer, you need to specify the country code and the line address. Some code I use for doing this is below...

// Assign a printer
DesignatePrinterRQ designatePrinterRQ = new DesignatePrinterRQ();
designatePrinterRQ.setVersion("2003A.TsabreXML1.2.1");
Printers printers = new Printers();
designatePrinterRQ.setPrinters(printers);
Ticket ticketPrinter = new Ticket();
printers.setTicket(ticketPrinter);
ticketPrinter.setCountryCode("2A");
ticketPrinter.setLineAddress("99999901234540");

In the above code, 999999 is a virtual printer and 01234540 is the station code of the sabre session.

Upvotes: 0

Giancarlo
Giancarlo

Reputation: 1429

There is one important error and even if you are not getting the same error anymore it is important to highlight.

In your request, you attempting to call the service more than once and that is not correct. You are opening the DesignatePrinterRQ tag twice and that will not work, because after closing the first DesignatePrinter nothing else is expected.

Below is your request:

<SOAP-ENV:Body>
    <DesignatePrinterRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.0.1">
        <Printers>
            <BagTag LNIATA=""/>
        </Printers>
    </DesignatePrinterRQ>
    <DesignatePrinterRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.0.1">
        <Printers>
            <BagTag Undesignate="true"/>
        </Printers>
    </DesignatePrinterRQ>
</SOAP-ENV:Body>

Below is how it should be:

<SOAP-ENV:Body>
    <DesignatePrinterRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.0.1">
        <Printers>
            <BagTag LNIATA=""/>
        </Printers>
    </DesignatePrinterRQ>
</SOAP-ENV:Body>

--

Now, I am not sure for which kind of customer you are developing but BagTag printer is only meant for airlines to use, not travel agencies. You will just need to send something like this before issuing the ticket:

<SOAP-ENV:Body>
    <DesignatePrinterRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.0.1">
        <Printers>
            <Ticket CountryCode="AT">
        </Printers>
    </DesignatePrinterRQ>
</SOAP-ENV:Body>

In order to check which CountryCode should you use, please check on the Format Finder. (You should be able to use the same credentials you use for creating sessions)

If, at the time of issuing the ticket you get something like Designate HardCopy printer, get in touch with Sabre for them to try and disable the hardcopy printing.

Upvotes: 2

Related Questions