Automtically tickeing a PNR, usage of DesignatePrinter

At the moment I'm creating a ticketing robot. As part of the process, just like in Galileo, I need to "link" a ticket printer to my current connection/session before being able to send a ticketing request.

The documentation isn't however very clear on how to form my DesignatePrinter request.

At the moment I'm doing this the following way:

var messageHeader = new MessageHeader
{
    ConversationId = "TestSession",
    CPAId = licenseId,
    Action = "DesignatePrinterLLSRQ",
    Service = new Service { Value = "DesignatePrinterLLSRQ" },
    MessageData = new MessageData
    {
        MessageId = "xxx:xxxxxx",
        Timestamp = DateTime.UtcNow.ToString("s") + "Z"
    },
    From = new From()
    {
        PartyId = new[]
        {
            new PartyId {Value = "WebServiceClient"}
        }
    },
    To = new To()
    {
        PartyId = new[]
        {
            new PartyId {Value = "WebServiceSupplier"}
        }
    }
};

Since the idea is to ticket I assign a DesignatePrinterRQPrintersTicket to the request object, like this:

var request = new   
{
    Version = "2.25.0",
    TimeStamp = DateTime.UtcNow,
    TimeStampSpecified = true,
    Printers = new DesignatePrinterRQPrinters
    {
        Ticket = new DesignatePrinterRQPrintersTicket { LNIATA = printers }
    }
};

DesignatePrinterRS resp = null;
Policy.Handle<SoapException>()
    .Or<WebException>()
    .WaitAndRetry(new[]
    {
                TimeSpan.FromSeconds(1),
                TimeSpan.FromSeconds(1),
                TimeSpan.FromSeconds(1),
                TimeSpan.FromSeconds(1),
                TimeSpan.FromSeconds(1),
                TimeSpan.FromSeconds(1),
                TimeSpan.FromSeconds(1),
                TimeSpan.FromSeconds(1),
                TimeSpan.FromSeconds(1)
    })
    .Execute(() =>
    {
        using (
            DesignatePrinterService serviceObj = new DesignatePrinterService())
        {
            serviceObj.MessageHeaderValue = messageHeader;
            serviceObj.Security = new Security1 { BinarySecurityToken = token };
            resp = serviceObj.DesignatePrinterRQ(request);
        }
    });

if (resp != null && resp.ApplicationResults.status == CompletionCodes.Complete)
{
    //  Ticket printer linked
    resultValue = 1;
}
else
{
    //  Ticket printer not linked
    resultValue = 0;
}

Is this sufficient or do I need more?

I'm not able to test at the moment unfortunately...

Answers


can you post the generated output XML?

Normally, something like this would work, to designate a ticket printer using the DesignatePrinterLLSRQ request:

 <soapenv:Body>
      <ns:DesignatePrinterRQ ReturnHostCommand="true" Version="2.0.1">
         <ns:Printers>
            <ns:Ticket CountryCode="countryTicketPrinterTypeCodeHere" LNIATA="printerLineAddressHere" />
         </ns:Printers>
      </ns:DesignatePrinterRQ>
   </soapenv:Body>

You will need the values for CountryCode and LNIATA to be provided by Sabre. You can contact Sabre using the contact us form at: https://developer.sabre.com/contact

Information on the associated Sabre command to the DesignatePrinterLLSRQ service is available at: https://formatfinder.sabre.com/Content/Printers/TicketPrinter/PrinterTicket.aspx?LanguageOverride=en&ItemID=38722B8FF6C949189864DF2641F867ED

(Login parameters --> Agent Sign In: your SOAP API Username / Password: your Sabre API Password / PCC: your Sabre API 'Organization')


Need Your Help

Why doesn't "bundle exec" see that I have rake installed?

ruby-on-rails ruby rake bundler rbenv

I've been reading StackOverflow and trying to deal with this error for 2 hours now:

Using map to do "foreach" style call

clojure

I'm trying to get up the learning curve for Clojure, and I'm writing a simple program that should output a list of permutations of a given string. My recursive solution will call itself multiple ti...