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

One way flight search error : Preferred date-time is before the current departure city date-time. #132

Open jadchahine opened 7 years ago

jadchahine commented 7 years ago

Hi All,

I am trying to search for a one way flight but I am facing a error, please find the below request and response

Request

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <ns2:LowFareSearchReq xmlns="http://www.travelport.com/schema/common_v38_0" xmlns:ns2="http://www.travelport.com/schema/air_v38_0" xmlns:ns3="http://www.travelport.com/schema/vehicle_v38_0" xmlns:ns4="http://www.travelport.com/soa/common/security/SessionContext_v1" xmlns:ns5="http://www.travelport.com/schema/rail_v38_0" xmlns:ns6="http://www.travelport.com/schema/universal_v38_0" xmlns:ns7="http://www.travelport.com/schema/hotel_v38_0" xmlns:ns8="http://www.travelport.com/schema/passive_v38_0" xmlns:ns9="http://www.travelport.com/schema/cruise_v38_0" SolutionResult="true" TargetBranch="P105201">
            <BillingPointOfSaleInfo OriginApplication="UAPI"/>
            <ns2:SearchAirLeg>
                <ns2:SearchOrigin>
                    <Airport Code="MEL"/>
                </ns2:SearchOrigin>
                <ns2:SearchDestination>
                    <Airport Code="SYD"/>
                </ns2:SearchDestination>
                <ns2:SearchDepTime PreferredTime="2016-10-30">
                    <SearchExtraDays DaysBefore="0" DaysAfter="0"/>
                </ns2:SearchDepTime>
                <ns2:AirLegModifiers>
                    <ns2:PreferredCabins>
                        <CabinClass Type="Economy"/>
                    </ns2:PreferredCabins>
                </ns2:AirLegModifiers>
            </ns2:SearchAirLeg>
            <ns2:AirSearchModifiers>
                <ns2:PreferredProviders>
                    <Provider Code="1G"/>
                    <Provider Code="RCH"/>
                    <Provider Code="ACH"/>
                </ns2:PreferredProviders>
                <ns2:PermittedCarriers>
                    <Carrier Code="QF"/>
                </ns2:PermittedCarriers>
            </ns2:AirSearchModifiers>
            <SearchPassenger Code="ADT"/>
            <ns2:AirPricingModifiers/>
            <ns2:PCC>
                <PointOfSale ProviderCode="1G" PseudoCityCode="MEL"/>
                <PointOfSale ProviderCode="RCH" PseudoCityCode="MEL"/>
                <PointOfSale ProviderCode="ACH" PseudoCityCode="MEL"/>
            </ns2:PCC>
        </ns2:LowFareSearchReq>
    </soap:Body>
</soap:Envelope>

Response

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Body>
        <SOAP:Fault>
            <faultcode>Server.ValidationException</faultcode>
            <faultstring>Preferred date-time is before the current departure city date-time.</faultstring>
            <detail>
                <common_v38_0:ErrorInfo xmlns:common_v38_0="http://www.travelport.com/schema/common_v38_0">
                    <common_v38_0:Code>3003</common_v38_0:Code>
                    <common_v38_0:Service>AIRSEARCH_SERVICE</common_v38_0:Service>
                    <common_v38_0:Type>ValidationException</common_v38_0:Type>
                    <common_v38_0:Description>Preferred date-time is before the current departure city date-time.</common_v38_0:Description>
                    <common_v38_0:TransactionId>171F07EE0A0764777BAF8C11C0E0C515</common_v38_0:TransactionId>
                    <common_v38_0:Auxdata>
                        <common_v38_0:Entry>
                            <common_v38_0:Reason>element</common_v38_0:Reason>
                            <common_v38_0:Description>SearchAirLeg.DepTimes</common_v38_0:Description>
                        </common_v38_0:Entry>
                    </common_v38_0:Auxdata>
                </common_v38_0:ErrorInfo>
            </detail>
        </SOAP:Fault>
    </SOAP:Body>
</SOAP:Envelope>
NirandaG commented 7 years ago

Hi JadChahine,

I am getting successful response. Could you please change the SearchDepTime to three months ahead from today onwards and give a try?

Thank you, Niranda

vivekjyotipramanik commented 7 years ago

Hi JadChahine,

Please change the preferred time to future date and time. Please let me know how it goes. Thanks.

Thanks & Regards Vivekjyoti Pramanik

jadchahine commented 7 years ago

Ok thank you.