Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GETTING EMPTY SESSION ARRAY WHEN PNR_RETRIEVE CALL FAILED #429

Closed
dil-hf opened this issue Feb 16, 2021 · 13 comments · Fixed by #430
Closed

GETTING EMPTY SESSION ARRAY WHEN PNR_RETRIEVE CALL FAILED #429

dil-hf opened this issue Feb 16, 2021 · 13 comments · Fixed by #430
Labels

Comments

@dil-hf
Copy link

dil-hf commented Feb 16, 2021

Hi,

Is it normal to have an empty array session when PNR-Retrieve fails?
Whenever it failed, getSessionData() is empty.

@bimusiek @DerMika

@DerMika
Copy link
Collaborator

DerMika commented Feb 16, 2021

You should configure the Request & Response logging https://github.com/amabnl/amadeus-ws-client/blob/master/docs/how-to.rst#logging-request-and-response to find out in detail what goes wrong.

Also, is this a duplicate of #428 ?

@dil-hf
Copy link
Author

dil-hf commented Feb 16, 2021

@DerMika I have logging configured, I can't get the wrong event since one week now.
Please help me figure it out. Below is my log file:

laravel-2021-02-16.log

@DerMika
Copy link
Collaborator

DerMika commented Feb 16, 2021

The response to your PNR_Retrieve on line 61 of your logfile contains session data and has TransactionStatusCode="InSeries". If you check your $client->getSessionData(); after receiving this response, you should get session info.

Something must be happening to the state of $client in the second between line 61 and 62 of your client...

Also, lines 65-67 contain sensitive info, you may want to strip that.

@DerMika
Copy link
Collaborator

DerMika commented Feb 16, 2021

Can you try running the client code with a debugger enabled?

Set a breakpoint at https://github.com/amabnl/amadeus-ws-client/blob/master/src/Amadeus/Client/Session/Handler/SoapHeader4.php#L209 and step through this function and see if it picks up the session info when handling the response of the PNR_Retrieve.

If it picks that up, the problem is the state of $client in your code. If it doesn't, it may be a bug or an incompatibility with your WSAP.

@dil-hf
Copy link
Author

dil-hf commented Feb 16, 2021

Thank you @DerMika for your time.

I debug and find out that when PNR_retrieve failed (I mean with wrong PNR), the function getSessionDataFromHeader() is never called but it's being called when PNR_retrieve succeed.
is it normal?

@dil-hf
Copy link
Author

dil-hf commented Feb 18, 2021

Hi @DerMika

Can you guide me on how to get session info so that I can make a raw request as a workaround for avoiding losing the Amadeus slot?
Actually, $client->getSessionData(); is empty when pnr_retrieve failed but it getting logged.
Security_SignOut() works great when pnr_retrieve succeed.

Did anyone encounter the same issue as I do?
Exist any other workaround to close an active session after a failed call?

Thank you for your time.

@DerMika
Copy link
Collaborator

DerMika commented Feb 18, 2021

I found the problem. A PR is on the way...

@dil-hf
Copy link
Author

dil-hf commented Feb 18, 2021

Hi ,

I got it also. I made the modification locally.
I was preparing the PR.

@dil-hf
Copy link
Author

dil-hf commented Feb 18, 2021

Only one line added, so can I send it?

@DerMika
Copy link
Collaborator

DerMika commented Feb 18, 2021

Well, i already made it. But since you have it running locally, can you verify that the fix (#430) actually solves your problem? If so I can merge it to master

@dil-hf
Copy link
Author

dil-hf commented Feb 18, 2021

You can merge it, it's the same one I made locally.

@DerMika
Copy link
Collaborator

DerMika commented Feb 18, 2021

released v1.12.0 which includes this fix.

@dil-hf
Copy link
Author

dil-hf commented Feb 18, 2021

Great, thank you

@DerMika DerMika added the bug label Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants