Retrieves a service Ticket.
A TicketResponse containing the Ticket with token.
This method is the last step of the authentication procedure described in the CarRentalAgentService SDK - Reference Manual.
In return, you will get a Ticket which is the service ticket. You will have to use the Token to create any valid Request to the CarRentalAgentService.
In most cases, you will call more than one method of this service using a valid Ticket. Therefore, you should consider to save the returned Ticket in your client implementation. Depending on concurrency and use of your client, you may save the Ticket or its Token in a user ticket.
Error Code | Description |
---|---|
E_INTERNAL_SERVICE | An internal service error occured during the process. |
E_TICKET_TOKEN_INVALID | The provided token is invalid. This error occurs if:
|
E_AUTHENTICATION_FAILED | The authentication procedure has failed. This error occurs if:
|
E_IMPERSONATION_FAILED | The requested impersonation has failed. This error occurs if:
|
E_REQUEST_INVALID | The performed request is invalid or malformed. |
Obtaining a service ticket.
[C#]
TicketGrantingRequest grantRq = new TicketGrantingRequest();
rq.OperatorKey = "000000";
TicketGrantingResponse grantRs = this.carAgent.GetTicketGrantingTicket(grantRq);
TicketGrantingTicket grant = rs.TicketGrantingTicket;
grant.Secret = this.secretGenerator.CreateResponseSecret(grant.Secret);
TicketRequest serviceRq = new TicketRequest();
serviceRq.TicketGrantingTicket = grant;
TicketResponse serviceRs = this.carAgent.GetTicket(serviceRq);
this.serviceTicket = serviceRs.Ticket;
CarRentalAgentService Class | SunnyCars.Services.Osi.WsReservation Namespace