-
Notifications
You must be signed in to change notification settings - Fork 191
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 Session Array Blank #85
Comments
Hi, sorry for the late response, I'm on holiday. I see you're using SoapHeader 2. That implementation requires you to manually send an authenticate message before performing any other action. This is the reason for the blank session. You can use the |
Hi DerMika, Thanks for the reply, I try to print the request and response through getLastRequest() and getLastResponse() but i still get blank in both cases. And when i try to call fareMasterPricerTravelBoardSearch then the below message coming Please help me in both cases. Thanks |
If you can't connect to the server, you won't be sending any messages, so that would explain why you'd get a blank response. Question is why can't you connect, have you tested if you can reach the Amadeus server endpoint in your WSDL? This is not something I can help you with, sounds like a WSDL issue or a network issue. |
Hello, |
Hi Dermika, Regards, |
The client just uses connection data present in the WSDL. You will have to check in the WSDL what the endpoint is for this message, and then check your network connection yourself. There is nothing I can do to help you. Have you tried the |
Hi Der Mika,
Regards, |
You do not need to perform all these operations on the password. The client needs the base_64 encoded version of the plain text password and it will do all the sha1 operations to pass the correct password. |
Hi Der Mika, use Amadeus\Client; $password=PasswordAmadeus; //get the password from the config
Regards, |
Hi Der Mika, Amadeus\Client Object
) Regards, |
Hi Der Mika, any update on above request. Regards, |
Hi Der Mika, any update on above request. Regards, |
Hi, I'm sorry but I was unavailable for a while. Have you been able to figure out the problem in the mean time? some questions that popped up:
|
Hi DerMika , Thanks for update. -Kunwar Ali |
Just follow the installation instructions from the readme and you should have the latest version 1.4.0. |
Hi DerMika,
Please check the screenshot for directory structure. include_once('vendor/autoload.php');
use Amadeus\Client;
use Amadeus\Client\Params;
use Amadeus\Client\Result;
use Amadeus\Client\RequestOptions\FareMasterPricerTbSearch;
use Amadeus\Client\RequestOptions\Fare\MPItinerary;
use Amadeus\Client\RequestOptions\Fare\MPLocation;
use Amadeus\Client\RequestOptions\Fare\MPPassenger;
use Amadeus\Client\RequestOptions\Fare\MPDate;
//Set up the client with necessary parameters:
$params = new Params([
'authParams' => [
'officeId' => 'xxxxx', //The Amadeus Office Id you want to sign in to - must be open on your WSAP.
'userId' => 'xxxx', //Also known as 'Originator' for Soap Header 1 & 2 WSDL's
'passwordData' => base64_encode('yyyyy') // **base 64 encoded** password
],
'sessionHandlerParams' => [
'soapHeaderVersion' => Client::HEADER_V4, //This is the default value, can be omitted.
'wsdl' => 'Amadeus_wsdl_lib/1ASIWSMLLVN_PDT_20170724_131430.wsdl', //Points to the location of the WSDL file for your WSAP. Make sure the associated XSD's are also available.
'stateful' => false, //Enable stateful messages by default - can be changed at will to switch between stateless & stateful.
'logger' => new Psr\Log\NullLogger()
//'logger' => new vendor\psr\log\Psr\Log\NullLogger()
],
'requestCreatorParams' => [
'receivedFrom' => 'my test project' // The "Received From" string that will be visible in PNR History
]
]);
$client = new Client($params);
//echo "<pre>"; print_r($client); echo "</pre>";
//start code for travelboardsearch
$opt = new FareMasterPricerTbSearch([
'nrOfRequestedResults' => 30, //no of result get from the response
'nrOfRequestedPassengers' => 2, //total no of passengers i.e., adults+childs+infants
'passengers' => [ //passengers details array
new MPPassenger([
'type' => MPPassenger::TYPE_ADULT,
'count' => 1
]),
new MPPassenger([
'type' => MPPassenger::TYPE_CHILD,
'count' => 1
]),
],
'itinerary' => [
new MPItinerary([
'departureLocation' => new MPLocation(['city' => 'DEL']), //from departure location
'arrivalLocation' => new MPLocation(['city' => 'BOM']), //to arrivalLocation
'date' => new MPDate([
'dateTime' => new \DateTime('2017-08-28T10:00:00+0000', new \DateTimeZone('UTC')), //departure date
'timeWindow' => 5,
'rangeMode' => MPDate::RANGEMODE_MINUS_PLUS,
'range' => 1
])
]),
]
]);
$Fare_TravelBoardSearch=$client->fareMasterPricerTravelBoardSearch(
$opt
);
echo "<textarea>";print_r($Fare_TravelBoardSearch); echo "</textarea>";die;
die; Please check my request and give your valuable suggestion. Regards, |
This seems like the same error you've had before. I really suggest you check out your network connectivity to the Amadeus WS server and try to fix this problem together with Amadeus Support. I can't help you with that I'm afraid. |
Hi DerMika, I have download "aunch Amadeus pinger" from https://webservices.amadeus.com/extranet/spinger.do after it I have check at our server. I am waiting your valuable feedback. Regards, |
I can't help you with that. You need to take this up with Amadeus. |
Hi DerMika, AirFlight_Fare_MasterTBSearchReq.txt Also You may check our core php project from below mentioned url Regards, |
Ok, upon reviewing your sample code, there's one more thing I can think of. Try making the location to the WSDL file an absolute path. For example, in Symfony you can make a path from the root of the application using code like this: 'wsdl' => realpath(
$this->get('kernel')->getRootDir() .
DIRECTORY_SEPARATOR . "wsdl" . DIRECTORY_SEPARATOR . '1ASIWSMLLVN_PDT_20170724_131430.wsdl'
); At least that's how I do it in my code. |
Hi DerMika, it is giving response.
because all above values are coming from my WSDL. please help us on this so that we can take profit from amadeus-ws-client. Regards, |
Yes, good point. The only thing left that I can do is try to reproduce the problem. For that you'd need to send me the WSDL and auth details privately. |
Hi DerMika |
I just checked your mail, and as I replied, the script you provided me works just fine. I get a proper As I explained to you, either it's a network problem or there is some kind of problem with the SSL handshake. Please check if you can upgrade your PHP installation and/or your OpenSSL. |
Do you have a status update? Did you manage to fix the problem? |
Closing due to no feedback. Re-open if necessary! |
Which issue exactly? Many issues have been mentioned in this thread ;) |
…tinRead to master * commit '8d19f0fb493912640f7c0474835ab174c29962b0': - refactoring, simplexml extension constraint in composer.json ItinRead - fix error by pricing
Hello,
I am trying to test the FareMasterPricerTbSearch then i am getting Fault Status with host could not reach. I also try to print the Client response but in this case their is no value coming in sessionId, sequenceNumber, securityToken while when i test through https://webservices.amadeus.com then i get the sessions details. For more please find the below code:
$params = new Params([
'authParams' => [
'officeId' => 'XXX', //Office Id
'userId' => 'XXX', //UserId
'passwordData' =>'XXX', // base 64 encoded password
'passwordLength' => 8,
'dutyCode' => 'XX', // duty code
'organizationId' => 'XX', //Organization Id
],
'sessionHandlerParams' => [
'soapHeaderVersion' => Client::HEADER_V2,
'wsdl' => '', //path of the wsdl file
'stateful' => true,
'logger' => new Psr\Log\NullLogger(),
],
'requestCreatorParams' => [
'receivedFrom' => 'My Project'
]
]);
$client = new Client($params);
In the above code when i try to print the $client then i get sessionData array with blank values in sessionId, sequenceNumber, securityToken.
Secondly i want to know how i debug (print) the request in XML format i try to enable the returnXml=true by default but still the same.
The text was updated successfully, but these errors were encountered: