Travelport / travelport-uapi-tutorial

The travelport-uapi-tutorial is a Java project for Universal API that will help you connect and code a standard workflow including Air and Hotel.
45 stars 34 forks source link

Need help #39

Open naveedjasim opened 8 years ago

naveedjasim commented 8 years ago

Hi

hope you are doing good. I am working on site which need to integrate flight and hotel booking. Can you please guide me how I will be able to integrate these facilities on my site? below are the credentials which I received but I am getting an error message "User account is locked".

please also guide me which API Should I have to use for flight and hotel booking?

vivekjyotipramanik commented 8 years ago

Hi naveendjasim,

Thank you for your interest in Travelport Universal API. Surely we will help you with your development. Could you please provide your username and TargetBranch and we can go ahead and unlock the account. Thanks.

Thanks & Regards Vivekjyoti Pramanik

naveedjasim commented 8 years ago

Hi Vivekjyoti Pramanik

Thank you for your kind reply. Below are my credentials

Universal API User ID: Universal API/uAPI1406519455-9fe5c311 Branch Code (TargetBranch) for ProviderName (ProviderCode): Branch Code for Worldspan (1P): P108131

Can you please differentiate between Worldspan, Apollo and Galileo.

I want to use flight and hotel booking system on my site. what will be the best solution for me. please provide code sample according to my requirement or I have to copy it from Github?

Waiting for your reply

Best Regards Naveed Jasim

NirandaG commented 8 years ago

Hi Naveed,

Your account has been unlocked. Please try the transactions and let me know if you face any issues. Regarding the content: Depending on the region you fall the GDS would differ. For example if you are based out of Pacific, best is to sign up for Galileo. Is you fall under Europe, either Galileo or Worldspan can be integrated. I would reckon speak to your Travelport representative for moving forward with the content.

Beside that, which GDS you connect we can help you to integrate the services to your booking engine. Please have a look on the below demo site to have a understanding of the workflows.

https://demo.travelportuniversalapi.com/

Also have a look on the uAPI help pages which gives you better understanding of the transactions from the scratch. And also GitHub has sample to integrate with uAPI services.

Please let me know if you need any help on this.

Thank you, B.Rgds, Niranda

naveedjasim commented 8 years ago

Hi Niranda

please check below code. I am getting this error

<?xml version="1.0"?>

SOAP:Body SOAP:Fault Server.Security Preferred Provider: 1G is not in the permissible list of providers for this user and operation. 301 SYSTEM Security User is not authorized. 54F2DEF80A07643B68897FF6EA54F1F6 trace /SOAP:Fault /SOAP:Body /SOAP:Envelope I have used this code $TARGETBRANCH = 'P108131'; $CREDENTIALS = 'Universal API/uAPI1406519455-9fe5c311:afy3EkPFFWwdRAgW2WFccyyYh'; $Provider = 'ACH'; // Any provider you want to use like 1G/1P/1V/ACH $message = << soapenv:Header/ soapenv:Body air:SearchAirLeg air:SearchOrigin /air:SearchOrigin air:SearchDestination /air:SearchDestination /air:SearchAirLeg air:SearchAirLeg air:SearchOrigin /air:SearchOrigin air:SearchDestination /air:SearchDestination /air:SearchAirLeg air:PreferredProviders /air:PreferredProviders air:PermittedCarriers /air:PermittedCarriers /air:AirSearchModifiers /air:LowFareSearchReq /soapenv:Body /soapenv:Envelope EOM; $file = "001-".$Provider."_AirAvailabilityReq.xml"; // file name to save the request xml for test only(if you want to save the request/response) prettyPrint($message,$file);//call function to pretty print xml $auth = base64_encode("$CREDENTIALS"); $soap_do = curl_init ("https://americas.universal-api.pp.travelport.com/B2BGateway/connect/uAPI/AirService"); $header = array( "Content-Type: text/xml;charset=UTF-8", "Accept: gzip,deflate", "Cache-Control: no-cache", "Pragma: no-cache", "SOAPAction: \"\"", "Authorization: Basic $auth", "Content-length: ".strlen($message), ); //curl_setopt($soap_do, CURLOPT_CONNECTTIMEOUT, 30); //curl_setopt($soap_do, CURLOPT_TIMEOUT, 30); curl_setopt($soap_do, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($soap_do, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($soap_do, CURLOPT_POST, true ); curl_setopt($soap_do, CURLOPT_POSTFIELDS, $message); curl_setopt($soap_do, CURLOPT_HTTPHEADER, $header); curl_setopt($soap_do, CURLOPT_RETURNTRANSFER, true); // this will prevent the curl_exec to return result and will let us to capture output $return = curl_exec($soap_do); $file = "001-".$Provider."_AirAvailabilityRsp.xml"; // file name to save the response xml for test only(if you want to save the request/response) $content = prettyPrint($return,$file); parseOutput($content); //print '
'; //echo $return; //print '
'; //print_r(curl_getinfo($soap_do)); //Pretty print XML function prettyPrint($result,$file){ $dom = new DOMDocument; $dom->preserveWhiteSpace = false; $dom->loadXML($result); $dom->formatOutput = true; //call function to write request/response in file outputWriter($file,$dom->saveXML()); return $dom->saveXML(); } //function to write output in a file function outputWriter($file,$content){ file_put_contents($file, $content); // Write request/response and save them in the File } function parseOutput($content){ //parse the Search response to get values to use in detail request $AirAvailabilitySearchRsp = $content; //use this if response is not saved anywhere else use above variable //echo $AirAvailabilitySearchRsp; $xml = simplexml_load_String("$AirAvailabilitySearchRsp", null, null, 'SOAP', true); ``` if($xml) echo "Processing! Please wait!"; else{ trigger_error("Encoding Error!", E_USER_ERROR); } $Results = $xml->children('SOAP',true); foreach($Results->children('SOAP',true) as $fault){ if(strcmp($fault->getName(),'Fault') == 0){ trigger_error("Error occurred request/response processing!", E_USER_ERROR); } } $count = 0; $fileName = "flights.txt"; if(file_exists($fileName)){ file_put_contents($fileName, ""); } foreach($Results->children('air',true) as $nodes){ foreach($nodes->children('air',true) as $hsr){ if(strcmp($hsr->getName(),'AirSegmentList') == 0){ foreach($hsr->children('air',true) as $hp){ if(strcmp($hp->getName(),'AirSegment') == 0){ $count = $count + 1; file_put_contents($fileName,"\r\n"."Air Segment ".$count."\r\n"."\r\n", FILE_APPEND); foreach($hp->attributes() as $a => $b ){ $GLOBALS[$a] = "$b"; //echo "$a"." : "."$b"; file_put_contents($fileName,$a." : ".$b."\r\n", FILE_APPEND); } } } } //break; } } $Token = 'Token'; $TokenKey = 'TokenKey'; $fileName = "tokens.txt"; if(file_exists($fileName)){ file_put_contents($fileName, ""); } foreach($Results->children('air',true) as $nodes){ foreach($nodes->children('air',true) as $hsr){ if(strcmp($hsr->getName(),'HostTokenList') == 0){ foreach($hsr->children('common_v29_0', true) as $ht){ if(strcmp($ht->getName(), 'HostToken') == 0){ $GLOBALS[$Token] = $ht[0]; foreach($ht->attributes() as $a => $b){ if(strcmp($a, 'Key') == 0){ file_put_contents($fileName,$TokenKey.":".$b."\r\n", FILE_APPEND); } } file_put_contents($fileName,$Token.":".$ht[0]."\r\n", FILE_APPEND); } } } } } echo "\r\n"."Processing Done. Please check results in files."; ``` } Best Regards Naveed Jasim
naveedjasim commented 8 years ago

Hi Vivekjyoti Pramanik

Now this code works for me but how I can get the price and airline name? and can show results just like demo

below is working code

<?php $TARGETBRANCH = 'P108131'; $CREDENTIALS = 'Universal API/uAPI1406519455-9fe5c311:afy3EkPFFWwdRAgW2WFccyyYh'; $Provider = '1P'; // Any provider you want to use like 1G/1P/1V/ACH $message = <<<EOM

soapenv:Header/ soapenv:Body air:SearchAirLeg air:SearchOrigin /air:SearchOrigin air:SearchDestination /air:SearchDestination /air:SearchAirLeg air:SearchAirLeg air:SearchOrigin /air:SearchOrigin air:SearchDestination /air:SearchDestination /air:SearchAirLeg air:PreferredProviders /air:PreferredProviders /air:AirSearchModifiers /air:LowFareSearchReq /soapenv:Body /soapenv:Envelope EOM; $file = "001-".$Provider."_AirAvailabilityReq.xml"; // file name to save the request xml for test only(if you want to save the request/response) prettyPrint($message,$file);//call function to pretty print xml $auth = base64_encode("$CREDENTIALS"); $soap_do = curl_init ("https://americas.universal-api.pp.travelport.com/B2BGateway/connect/uAPI/AirService"); $header = array( "Content-Type: text/xml;charset=UTF-8", "Accept: gzip,deflate", "Cache-Control: no-cache", "Pragma: no-cache", "SOAPAction: \"\"", "Authorization: Basic $auth", "Content-length: ".strlen($message), ); //curl_setopt($soap_do, CURLOPT_CONNECTTIMEOUT, 30); //curl_setopt($soap_do, CURLOPT_TIMEOUT, 30); curl_setopt($soap_do, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($soap_do, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($soap_do, CURLOPT_POST, true ); curl_setopt($soap_do, CURLOPT_POSTFIELDS, $message); curl_setopt($soap_do, CURLOPT_HTTPHEADER, $header); curl_setopt($soap_do, CURLOPT_RETURNTRANSFER, true); // this will prevent the curl_exec to return result and will let us to capture output $return = curl_exec($soap_do); $file = "001-".$Provider."_AirAvailabilityRsp.xml"; // file name to save the response xml for test only(if you want to save the request/response) $content = prettyPrint($return,$file); parseOutput($content); //print '
'; //echo $return; //print '
'; //print_r(curl_getinfo($soap_do)); //Pretty print XML function prettyPrint($result,$file){ $dom = new DOMDocument; $dom->preserveWhiteSpace = false; $dom->loadXML($result); $dom->formatOutput = true; //call function to write request/response in file outputWriter($file,$dom->saveXML()); return $dom->saveXML(); } //function to write output in a file function outputWriter($file,$content){ file_put_contents($file, $content); // Write request/response and save them in the File } function parseOutput($content){ //parse the Search response to get values to use in detail request $AirAvailabilitySearchRsp = $content; //use this if response is not saved anywhere else use above variable //echo $AirAvailabilitySearchRsp; $xml = simplexml_load_String("$AirAvailabilitySearchRsp", null, null, 'SOAP', true); ``` if($xml) echo "Processing! Please wait!"; else{ trigger_error("Encoding Error!", E_USER_ERROR); } $Results = $xml->children('SOAP',true); foreach($Results->children('SOAP',true) as $fault){ if(strcmp($fault->getName(),'Fault') == 0){ trigger_error("Error occurred request/response processing!", E_USER_ERROR); } } $count = 0; $fileName = "flights.txt"; if(file_exists($fileName)){ file_put_contents($fileName, ""); } foreach($Results->children('air',true) as $nodes){ foreach($nodes->children('air',true) as $hsr){ if(strcmp($hsr->getName(),'AirSegmentList') == 0){ foreach($hsr->children('air',true) as $hp){ if(strcmp($hp->getName(),'AirSegment') == 0){ $count = $count + 1; file_put_contents($fileName,"\r\n"."Air Segment ".$count."\r\n"."\r\n", FILE_APPEND); foreach($hp->attributes() as $a => $b ){ $GLOBALS[$a] = "$b"; //echo "$a"." : "."$b"; file_put_contents($fileName,$a." : ".$b."\r\n", FILE_APPEND); } } } } //break; } } $Token = 'Token'; $TokenKey = 'TokenKey'; $fileName = "tokens.txt"; if(file_exists($fileName)){ file_put_contents($fileName, ""); } foreach($Results->children('air',true) as $nodes){ foreach($nodes->children('air',true) as $hsr){ if(strcmp($hsr->getName(),'HostTokenList') == 0){ foreach($hsr->children('common_v33_0', true) as $ht){ if(strcmp($ht->getName(), 'HostToken') == 0){ $GLOBALS[$Token] = $ht[0]; foreach($ht->attributes() as $a => $b){ if(strcmp($a, 'Key') == 0){ file_put_contents($fileName,$TokenKey.":".$b."\r\n", FILE_APPEND); } } file_put_contents($fileName,$Token.":".$ht[0]."\r\n", FILE_APPEND); } } } } } echo "\r\n"."Processing Done. Please check results in files."; ``` } Waiting for your reply Thanks & Best Regards Naveed Jasim
vivekjyotipramanik commented 8 years ago

Hi Naveed,

I can see the Airlines names and Pricing in the LowFareSearchRsp itself. In PHP you have to parse the response to get the details. Once you have selected one of the AirSegment, you can run AirPricingReq to confirm the Price. In the AirPricingRsp you will get all the details about the AirPricingSolution. Using the AirPriceSolution you can create the Booking using AirCreateReservationReq. The complete flow is documented here in https://support.travelport.com/webhelp/uapi/uAPI.htm#SampleWeb/Alternative_Sample_Pages/Samples_Air-Worldspan-Overview.htm.

The demosite is create using ASP.net/C# and not PHP. In PHP, Once you create the UI and parse the response results you can show the results just like demo site. You need to parse the response according to your requirement. All the details like Airline, Pricing etc already there in the response. Please let me know if you need a sample of the parser in PHP.

We already have a Hotel end to end flow sample in PHP with all the required parsers. Please find below the link of the same.

https://github.com/Travelport/travelport-uapi-tutorial-php/tree/master/Hotel

Thanks.

Thanks & Regards Vivekjyoti Pramanik

naveedjasim commented 8 years ago

Hi Vivekjyoti Pramanik

Thank you for your reply. But I am not so much technical, can you provide parser in PHP? I will be very thankful to your

Thanks and Regards Naveed

naveedjasim commented 8 years ago

Hi Vivekjyoti Pramanik

Hope you are doing good. I am waiting for your reply.

Thanks and Regards Naveed Jasim

vivekjyotipramanik commented 8 years ago

Hi Naveed,

If PHP is your language, then you will require quite a few parsers along the complete development to parse each response in the flow of AirBooking. We already have a sample parser in the PHP file itself. To create the exact parser you are looking for, please provide us some time. Please check out the already existing parser which might help you progress. In the below example we are parsing AirAvailabilitySearchRsp. Thanks.


function parseOutput($content){ //parse the Search response to get values to use in detail request
    $AirAvailabilitySearchRsp = $content; //use this if response is not saved anywhere else use above variable
    //echo $AirAvailabilitySearchRsp;
    $xml = simplexml_load_String("$AirAvailabilitySearchRsp", null, null, 'SOAP', true);    

    if($xml)
        echo "Processing! Please wait!";
    else{
        trigger_error("Encoding Error!", E_USER_ERROR);
    }
    $Results = $xml->children('SOAP',true);
    foreach($Results->children('SOAP',true) as $fault){
        if(strcmp($fault->getName(),'Fault') == 0){
            trigger_error("Error occurred request/response processing!", E_USER_ERROR);
        }
    }

    $count = 0;
    $fileName = "flights.txt";
    if(file_exists($fileName)){
        file_put_contents($fileName, "");
    }
    foreach($Results->children('air',true) as $nodes){
        foreach($nodes->children('air',true) as $hsr){
            if(strcmp($hsr->getName(),'AirSegmentList') == 0){
                foreach($hsr->children('air',true) as $hp){
                    if(strcmp($hp->getName(),'AirSegment') == 0){
                        $count = $count + 1;
                        file_put_contents($fileName,"\r\n"."Air Segment ".$count."\r\n"."\r\n", FILE_APPEND);
                        foreach($hp->attributes() as $a => $b   ){
                                $GLOBALS[$a] = "$b";
                                //echo "$a"." : "."$b";
                                file_put_contents($fileName,$a." : ".$b."\r\n", FILE_APPEND);
                        }                                               
                    }                   
                }
            }
            //break;
        }
    }
    $Token = 'Token';
    $TokenKey = 'TokenKey';
    $fileName = "tokens.txt";
    if(file_exists($fileName)){
        file_put_contents($fileName, "");
    }
    foreach($Results->children('air',true) as $nodes){
        foreach($nodes->children('air',true) as $hsr){
            if(strcmp($hsr->getName(),'HostTokenList') == 0){           
                foreach($hsr->children('common_v33_0', true) as $ht){
                    if(strcmp($ht->getName(), 'HostToken') == 0){
                        $GLOBALS[$Token] = $ht[0];
                        foreach($ht->attributes() as $a => $b){
                            if(strcmp($a, 'Key') == 0){
                                file_put_contents($fileName,$TokenKey.":".$b."\r\n", FILE_APPEND);
                            }
                        }                       
                        file_put_contents($fileName,$Token.":".$ht[0]."\r\n", FILE_APPEND);
                    }
                }
            }
        }
    }

Thanks & Regards Vivekjyoti Pramanik

vivekjyotipramanik commented 8 years ago

Hi Naveen,

We have added a Parser to parse the LowFareSearchRsp. The parser will read through the LowFareSearchRsp and append the details in a text files. We have also added the sample text file. Please let me know how it goes. Thanks.

https://github.com/Travelport/travelport-uapi-tutorial-php/tree/master/Air

Thanks & Regards Vivekjyoti Pramanik

jadchahine commented 8 years ago

Hi All,

I have imported the GitHub using this link: travelport-uapi-tutorial

And i have done all the necessary configurations (integrating Apache CXF with tomcat etc...)

When i was trying to run both the SystemService.wsdl on the server and then the Lesson1service, i faced this below error :

Exception in thread "main" javax.xml.ws.WebServiceException: Could not send Message.
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:150)
    at $Proxy48.service(Unknown Source)
    at com.travelport.service.system_v9_0.SystemPingPortType_SystemPingPort_Client.main(SystemPingPortType_SystemPingPort_Client.java:55)
Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '404: Not Found' when communicating with http://localhost:8080/kestrel/SystemService
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doProcessResponseCode(HTTPConduit.java:1600)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1607)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1551)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1348)
    at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
    at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:651)
    at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:277)
    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139)
    ... 2 more

How can i resolve this error ? Please need your support

vivekjyotipramanik commented 8 years ago

Hi JadChahine,

Thank you for interest in Travelport Universal API.

Could you please confirm which endpoint URL you are using. The Endpoint URL for the Java Project is stated in WsdlService.java file. Looks like the endpoint is not correct here.

Please let me know how it goes. Thanks.

Thanks & Regards Vivekjyoti Pramanik

jadchahine commented 8 years ago

Hi Vivekjyoti

Universal API User ID:  Universal API/uAPI-601628191

Universal API Password:  CzYkbQNzkwK6NA2pcd7mXbtdk

Branch Code (TargetBranch) for ProviderName (ProviderCode):  Branch Code for Galileo (1G): P105205

URLs:  https://emea.universal-api.pp.travelport.com/B2BGateway/connect/uAPI/

And i have tested these credentials using a test file, so these credentials are working.

The problem that i cannot do requests from my host to retrieve information from the real data, so please check the attachments concerning the error that i have faced when i was trying to run the web service?

What should be the endpoint in my case ?

Thank you very much

vivekjyotipramanik commented 8 years ago

Hi JadChahine,

I have tested the Java file in github and it is working fine. As it is a Java project in github, I generally provide the credentials and GDS through Run Configurations. The code is written that way that it would retrieve the credentials details from Run Confirgurations. Could you please confirm if you are using Run configurations.

We can have a meeting today if you want and I can resolve the issues. Please let me know your timezone and I can schedule the meeting accordingly. Thanks.

Thanks & Regards Vivekjyoti Pramanik

jadchahine commented 8 years ago

Hi Vivekjyoti,

Yes i am using Run configurations in Tomcat, and here are the parameters :

Djava.util.logging.config.file=logging.properties
Dtravelport.username="uAPI-601628191"
Dtravelport.password="CzYkbQNzkwK6NA2pcd7mXbtdk"
Dtravelport.gds="1G"
Dtravelport.targetBranch="P105205"

Here are the steps that i have done: 1) Running System.wsdl in tomcat 2) Running Lesson1.java as Java app (that have all the above arguments in Run configurations)

this is right?

I am in Lebanon (Middle East)

Thank you very much

vivekjyotipramanik commented 8 years ago

Hi JadChahine,

The username you are using is wrong. Please use the complete username which is 'Universal API/uAPI-601628191'. Please let me know how it goes. Thanks.

Thanks & Regards Vivekjyoti Pramanik

jadchahine commented 8 years ago

Hi Vivekjyoti,

No it is not working 1) What should be the url prefix ? I have it url prefix = "file:///C://Users//User//git//travelport-uapi-tutorial/"; 2) When i run the Lesson1 as a java app , what should i put the project and what should i put the main class?

Thank you very much

vivekjyotipramanik commented 8 years ago

Hi JadChahine,

The URL Prefix should be your project path where you have created the project. The path should directly go to Wsdl file. The Lesson1 is itself the main class. It should run fine if all the parameters is provided correctly. Please point the URL prefix where the project resides. Please let me know how it goes. Thanks.

Thanks & Regards Vivekjyoti Pramanik

naveedjasim commented 8 years ago

Vivekjyoti Pramanik

hope you are doing good. I have tested Parser to parse the LowFareSearchRsp. and it is working fine on my local machine. can we discuss rest of things in private. My skype id is naveedjasim.

Thanks and Regards Naveed Jasim

jadchahine commented 8 years ago

Hi Vivekjyoti,

It still not working, can you provide me a teamviewer access?

vivekjyotipramanik commented 8 years ago

Hi JadChahine,

I do not have teamviewer. I can setup a webex at your preferred time and we can resolve the issues over webex. If you are free now, Please share your email and I can go ahead and start the webex right now. Thanks.

Thanks & Regards Vivekjyoti Pramanik

vivekjyotipramanik commented 8 years ago

Hi naveedjasim,

We do not provide support over skype. If you want I can schedule a webex meeting and discuss further. Could you please confirm the timezone you are in and we can schedule a webex accordingly to discuss about Universal API. Thanks.

Thanks & Regards Vivekjyoti Pramanik

jadchahine commented 8 years ago

Hi Vivekjyoti,

This is my email : jad.chahine4@gmail.com

I am downloading webex, once it is downloaded i will inform you here ok ?

Thanks & Regards

vivekjyotipramanik commented 8 years ago

Hi JadChahine,

I have sent the webex details in your mail and already started the webex. Could you please let me know if you received the details. Thanks.

Thanks & Regards Vivekjyoti Pramanik

vivekjyotipramanik commented 8 years ago

Hi JadChahine,

Could you please confirm if you are joining the meeting. I have already started the webex. Thanks.

Thanks & Regards Vivekjyoti Pramanik

naveedjasim commented 8 years ago

Hi Vivekjyoti,

my email is naveedjasim@gmail.com

Thanks and Regards Naveed Jasim

vivekjyotipramanik commented 8 years ago

Hi Naveed,

Could you please confirm which timezone you are in. Thanks.

Thanks & Regards Vivekjyoti Pramanik

naveedjasim commented 8 years ago

Hi Vivekjyoti

My timezone is GMT/UTC+05:00

Thanks and Regards Naveed

vivekjyotipramanik commented 8 years ago

Hi JadChahine,

I am closing the webex. Please let me know your preferred time and we can reconnect. Thanks.

Thanks & Regards Vivekjyoti Pramanik

vivekjyotipramanik commented 8 years ago

Hi Naveed,

Please let me know if Wednesday 630 PM your time works fine. If so, Please confirm and I will go ahead and schedule meeting and send the invitation to your email to discuss about Universal API. Thanks.

Thanks & Regards Vivekjyoti Pramanik

naveedjasim commented 8 years ago

Hi Vivekjyoti

is this possible to do this now? if no then ok, I will wait.

Thanks and Regards Naveed Jasim

vivekjyotipramanik commented 8 years ago

Hi Naveed,

Yes, We can do it now. I am sending you the invitation. Thanks.

Thanks & Regards Vivekjyoti Pramanik

vivekjyotipramanik commented 8 years ago

Hi Naveed,

I have started the webex and sent you the meeting invitation. Please confirm if you received the same. Thanks.

Thanks & Regards Vivekjyoti Pramanik

vivekjyotipramanik commented 8 years ago

Hi Naveed,

Could you please confirm if you are joining the meeting. I have already started the webex. Thanks.

Thanks & Regards Vivekjyoti Pramanik

jadchahine commented 8 years ago

Hi Vivekjyoti

Sorry it was a connection problem

Can you connect now? I am ready

Thanks & Regards

vivekjyotipramanik commented 8 years ago

Hi JadChahine,

I am opening the webex and will sent the invitation soon. Thanks.

Thanks & Regards Vivekjyoti Pramanik

vivekjyotipramanik commented 8 years ago

Hi JadChahine,

I have started the webex and sent you invitation. Could you please confirm if you received the same. Thanks.

Thanks & Regards Vivekjyoti Pramanik

jadchahine commented 8 years ago

Hi Vivekjyoti

Yes i am connecting

jadchahine commented 8 years ago

Hi Vivekjyoti

The environment is fine now, and i can do requests using this trial API

I have some questions please: 1) How can I purchase the original API ? and how much cost this API? 2) Can I connect the original API that I will purchase later on the test database for a duration of time for testing ? and doing some booking examples before I use the original database for production.

Thank you in advance Jad Chahine

vivekjyotipramanik commented 8 years ago

Hi Jad,

To run transactions in Production, you need a contract signed with Travelport. Please provide me your company details and I will have someone contact you regarding the process and cost. I need the company details and your contact number. I believe you have my email Id, please send those details in my email. Please let me know how it goes. Thanks.

Thanks & Regards Vivekjyoti Pramanik

jadchahine commented 8 years ago

Hi Vivekjyoti

Ok I will contact my company and provide you information once they replied.

I have a problem, please help,

When i am running the Lesson1 (the ping service), it is running fine But the Lesson2 (Flight Service) gives me the below error:

*** Unable to price itinerary:NO VALID FARE FOR INPUT CRITERIA
AA#787 from CDG to CLT at 2016-05-14T11:00:00.000+02:00
AA#5073 from CLT to CHA at 2016-05-14T16:04:00.000-04:00
AA#3485 from CHA to ORD at 2016-05-21T15:16:00.000-04:00
LH#9335 from ORD to CDG at 2016-05-21T18:15:00.000-05:00

What do you think is the problem?

Thanks, Jad

vivekjyotipramanik commented 8 years ago

Hi Jad,

This is a valid error, it is coming up in AirPriceReq. 'NO VALID FARE FOR INPUT CRITERIA' comes up, when there is no fare available for the AirSegment being priced. Please try with a different origin-destination, dates and Airlines. Please try in https://demo.travelportuniversalapi.com/ to search the Origin-destination where you will get fares. Please change the top right hand corner CREDENTIALS dropdown to PreProduction. As production version does not support complete flow. Please let me know how it goes. Thanks.

Thanks & Regards Vivekjyoti Pramanik

jadchahine commented 8 years ago

Hi Vivekjyoti

Please can you provide me your email or your number to let my company contact you to ask you about the travelport licence

Thanks & Regards

vivekjyotipramanik commented 8 years ago

Hi Jad,

I have sent you a mail to your email id with the subject 'Travelport Universal API - Contract'. Please confirm if you received it. Thanks.

Thanks & Regards Vivekjyoti Pramanik

jadchahine commented 8 years ago

Hi Vivekjyoti

I give the Lesson2 my credentials using run configurations and it works fine... My question is , how to give the Lesson2 (or any other lesson) the parameters if i want to run this lesson from another class, per example I want to call the Lesson2 from a java bean, so now i cannot use run configurations to give the Lesson2 the parameters, Please help

Thanks & Regards

vivekjyotipramanik commented 8 years ago

Hi Jad,

We can use a property file to store all the parameters and send the parameters as HttpHeader through Java code after retrieving the parameters from the Property file. To send the credentials through HttpHeader you can use RequestProperty as authorization and Basic authentication mode. Please convert the username and password in the format "username:password" to Base64 encoded format. Please let me know how it goes. Thanks.

Thanks & Regards Vivekjyoti Pramanik

jadchahine commented 8 years ago

Hi Vivekjyoti

I use System.getProperties().setProperty() to set VM arguments from the code and it works

Thanks & Regards

jadchahine commented 8 years ago

Hi Vivekjyoti

Please can you check if this User ID is active ? API/uAPI1378167135-632a12d1 It does not work

Thanks & Regards

vivekjyotipramanik commented 8 years ago

Hi Jad,

Could you please try with Universal API/uAPI1378167135-632a12d1. Please let me know how it goes. If it still does not work, Please provide the TargetBranch. Thanks.

Thanks & Regards Vivekjyoti Pramanik

jadchahine commented 8 years ago

Hi Vivekjyoti

It still not working, this is the TargetBranch : P7037373

Thanks & Regards