Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/287.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Sabre BargainFinderMax(BFM)只返回一个行程_C#_.net_Soap_Sabre - Fatal编程技术网

C# Sabre BargainFinderMax(BFM)只返回一个行程

C# Sabre BargainFinderMax(BFM)只返回一个行程,c#,.net,soap,sabre,C#,.net,Soap,Sabre,我使用Saber的soap api获取航班详细信息,xml请求如下所示: `<OTA_AirLowFareSearchRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="3.0.0" ResponseType="OTA" ResponseVersion="3.0.0">

我使用Saber的soap api获取航班详细信息,xml请求如下所示:

    `<OTA_AirLowFareSearchRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-       instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="3.0.0"         ResponseType="OTA" ResponseVersion="3.0.0">
    <POS xmlns="http://www.opentravel.org/OTA/2003/05">
    <Source PseudoCityCode="XXXX">
        <RequestorID Type="0.AAA.X" ID="REQ.ID">
        <CompanyName Code="TN"/>
        </RequestorID>
    </Source>
    </POS>
<OriginDestinationInformation xmlns="http://www.opentravel.org/OTA/2003/05"      RPH="1">
    <DepartureDateTime>2017-04-21T03:18:35</DepartureDateTime>
    <OriginLocation LocationCode="YYZ"/>
        <DestinationLocation LocationCode="SIN"/>
    </OriginDestinationInformation>
    <TravelPreferences xmlns="http://www.opentravel.org/OTA/2003/05">
        <TPA_Extensions>
            <NumTrips Number="1"/>
        </TPA_Extensions>
    </TravelPreferences>
    <TravelerInfoSummary xmlns="http://www.opentravel.org/OTA/2003/05">
        <AirTravelerAvail>
            <PassengerTypeQuantity Code="ADT" Quantity="1"/>
        </AirTravelerAvail>
    </TravelerInfoSummary>
    <TPA_Extensions xmlns="http://www.opentravel.org/OTA/2003/05">
        <IntelliSellTransaction>
            <RequestType Name="50ITINS"/>
        </IntelliSellTransaction>
    </TPA_Extensions>
</OTA_AirLowFareSearchRQ>`
<OTA_AirLowFareSearchRQ AvailableFlightsOnly="true" ResponseType="OTA" ResponseVersion="3.0.0" Version="3.0.0" xmlns="http://www.opentravel.org/OTA/2003/05">
<POS xmlns="http://www.opentravel.org/OTA/2003/05">
    <Source PseudoCityCode="XXXX">
        <RequestorID ID="REQ.ID" Type="0.AAA.X">
            <CompanyName Code="TN"/>
        </RequestorID>
    </Source>
</POS>
<OriginDestinationInformation RPH="1">
    <DepartureDateTime>2017-04-21T00:00:00</DepartureDateTime>
    <DepartureWindow>00002359</DepartureWindow>
    <OriginLocation LocationCode="YYZ" LocationType="A"/>
    <DestinationLocation LocationCode="SIN" LocationType="A"/>
    <TPA_Extensions>
        <SegmentType Code="O"/>
    </TPA_Extensions>
</OriginDestinationInformation>
<TravelPreferences ETicketDesired="true" ValidInterlineTicket="true">
    <TPA_Extensions>
        <TripType Value="OneWay"/>
        <FlightStopsAsConnections Ind="true"/>
        <ExcludeCallDirectCarriers Enabled="true"/>
    </TPA_Extensions>
    <Baggage Description="true" RequestType="A"/>
</TravelPreferences>
<TravelerInfoSummary>
    <SeatsRequested>1</SeatsRequested>
    <AirTravelerAvail>
        <PassengerTypeQuantity Code="ADT" Quantity="1"/>
    </AirTravelerAvail>
    <PriceRequestInformation CurrencyCode="TRY" NegotiatedFaresOnly="false"/>
</TravelerInfoSummary>
<TPA_Extensions>
    <IntelliSellTransaction>
        <RequestType Name="50ITINS"/>
    </IntelliSellTransaction>
</TPA_Extensions></OTA_AirLowFareSearchRQ>
`
2017-04-21T03:18:35
`
但出于某种原因,我的回答总是局限于一个航班行程, 感谢您的帮助


谢谢。

嗯,这看起来很奇怪,你能试着提出以下请求吗:

    `<OTA_AirLowFareSearchRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-       instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="3.0.0"         ResponseType="OTA" ResponseVersion="3.0.0">
    <POS xmlns="http://www.opentravel.org/OTA/2003/05">
    <Source PseudoCityCode="XXXX">
        <RequestorID Type="0.AAA.X" ID="REQ.ID">
        <CompanyName Code="TN"/>
        </RequestorID>
    </Source>
    </POS>
<OriginDestinationInformation xmlns="http://www.opentravel.org/OTA/2003/05"      RPH="1">
    <DepartureDateTime>2017-04-21T03:18:35</DepartureDateTime>
    <OriginLocation LocationCode="YYZ"/>
        <DestinationLocation LocationCode="SIN"/>
    </OriginDestinationInformation>
    <TravelPreferences xmlns="http://www.opentravel.org/OTA/2003/05">
        <TPA_Extensions>
            <NumTrips Number="1"/>
        </TPA_Extensions>
    </TravelPreferences>
    <TravelerInfoSummary xmlns="http://www.opentravel.org/OTA/2003/05">
        <AirTravelerAvail>
            <PassengerTypeQuantity Code="ADT" Quantity="1"/>
        </AirTravelerAvail>
    </TravelerInfoSummary>
    <TPA_Extensions xmlns="http://www.opentravel.org/OTA/2003/05">
        <IntelliSellTransaction>
            <RequestType Name="50ITINS"/>
        </IntelliSellTransaction>
    </TPA_Extensions>
</OTA_AirLowFareSearchRQ>`
<OTA_AirLowFareSearchRQ AvailableFlightsOnly="true" ResponseType="OTA" ResponseVersion="3.0.0" Version="3.0.0" xmlns="http://www.opentravel.org/OTA/2003/05">
<POS xmlns="http://www.opentravel.org/OTA/2003/05">
    <Source PseudoCityCode="XXXX">
        <RequestorID ID="REQ.ID" Type="0.AAA.X">
            <CompanyName Code="TN"/>
        </RequestorID>
    </Source>
</POS>
<OriginDestinationInformation RPH="1">
    <DepartureDateTime>2017-04-21T00:00:00</DepartureDateTime>
    <DepartureWindow>00002359</DepartureWindow>
    <OriginLocation LocationCode="YYZ" LocationType="A"/>
    <DestinationLocation LocationCode="SIN" LocationType="A"/>
    <TPA_Extensions>
        <SegmentType Code="O"/>
    </TPA_Extensions>
</OriginDestinationInformation>
<TravelPreferences ETicketDesired="true" ValidInterlineTicket="true">
    <TPA_Extensions>
        <TripType Value="OneWay"/>
        <FlightStopsAsConnections Ind="true"/>
        <ExcludeCallDirectCarriers Enabled="true"/>
    </TPA_Extensions>
    <Baggage Description="true" RequestType="A"/>
</TravelPreferences>
<TravelerInfoSummary>
    <SeatsRequested>1</SeatsRequested>
    <AirTravelerAvail>
        <PassengerTypeQuantity Code="ADT" Quantity="1"/>
    </AirTravelerAvail>
    <PriceRequestInformation CurrencyCode="TRY" NegotiatedFaresOnly="false"/>
</TravelerInfoSummary>
<TPA_Extensions>
    <IntelliSellTransaction>
        <RequestType Name="50ITINS"/>
    </IntelliSellTransaction>
</TPA_Extensions></OTA_AirLowFareSearchRQ>

2017-04-21T00:00:00
00002359
1.
我们有很多理由只返回一个行程。尝试这个请求,如果你得到一个错误或什么,让我现在比,我们将继续一步一步

附加说明:请注意,发出请求时必须使用代理配置,例如:use应使用之前定义的货币


问候。

嗯,这看起来很奇怪,你能试着提出以下请求吗:

    `<OTA_AirLowFareSearchRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-       instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="3.0.0"         ResponseType="OTA" ResponseVersion="3.0.0">
    <POS xmlns="http://www.opentravel.org/OTA/2003/05">
    <Source PseudoCityCode="XXXX">
        <RequestorID Type="0.AAA.X" ID="REQ.ID">
        <CompanyName Code="TN"/>
        </RequestorID>
    </Source>
    </POS>
<OriginDestinationInformation xmlns="http://www.opentravel.org/OTA/2003/05"      RPH="1">
    <DepartureDateTime>2017-04-21T03:18:35</DepartureDateTime>
    <OriginLocation LocationCode="YYZ"/>
        <DestinationLocation LocationCode="SIN"/>
    </OriginDestinationInformation>
    <TravelPreferences xmlns="http://www.opentravel.org/OTA/2003/05">
        <TPA_Extensions>
            <NumTrips Number="1"/>
        </TPA_Extensions>
    </TravelPreferences>
    <TravelerInfoSummary xmlns="http://www.opentravel.org/OTA/2003/05">
        <AirTravelerAvail>
            <PassengerTypeQuantity Code="ADT" Quantity="1"/>
        </AirTravelerAvail>
    </TravelerInfoSummary>
    <TPA_Extensions xmlns="http://www.opentravel.org/OTA/2003/05">
        <IntelliSellTransaction>
            <RequestType Name="50ITINS"/>
        </IntelliSellTransaction>
    </TPA_Extensions>
</OTA_AirLowFareSearchRQ>`
<OTA_AirLowFareSearchRQ AvailableFlightsOnly="true" ResponseType="OTA" ResponseVersion="3.0.0" Version="3.0.0" xmlns="http://www.opentravel.org/OTA/2003/05">
<POS xmlns="http://www.opentravel.org/OTA/2003/05">
    <Source PseudoCityCode="XXXX">
        <RequestorID ID="REQ.ID" Type="0.AAA.X">
            <CompanyName Code="TN"/>
        </RequestorID>
    </Source>
</POS>
<OriginDestinationInformation RPH="1">
    <DepartureDateTime>2017-04-21T00:00:00</DepartureDateTime>
    <DepartureWindow>00002359</DepartureWindow>
    <OriginLocation LocationCode="YYZ" LocationType="A"/>
    <DestinationLocation LocationCode="SIN" LocationType="A"/>
    <TPA_Extensions>
        <SegmentType Code="O"/>
    </TPA_Extensions>
</OriginDestinationInformation>
<TravelPreferences ETicketDesired="true" ValidInterlineTicket="true">
    <TPA_Extensions>
        <TripType Value="OneWay"/>
        <FlightStopsAsConnections Ind="true"/>
        <ExcludeCallDirectCarriers Enabled="true"/>
    </TPA_Extensions>
    <Baggage Description="true" RequestType="A"/>
</TravelPreferences>
<TravelerInfoSummary>
    <SeatsRequested>1</SeatsRequested>
    <AirTravelerAvail>
        <PassengerTypeQuantity Code="ADT" Quantity="1"/>
    </AirTravelerAvail>
    <PriceRequestInformation CurrencyCode="TRY" NegotiatedFaresOnly="false"/>
</TravelerInfoSummary>
<TPA_Extensions>
    <IntelliSellTransaction>
        <RequestType Name="50ITINS"/>
    </IntelliSellTransaction>
</TPA_Extensions></OTA_AirLowFareSearchRQ>

2017-04-21T00:00:00
00002359
1.
我们有很多理由只返回一个行程。尝试这个请求,如果你得到一个错误或什么,让我现在比,我们将继续一步一步

附加说明:请注意,发出请求时必须使用代理配置,例如:use应使用之前定义的货币


问候。

所以我想出来了,你需要将
标签设置为你想要的旅行路线的数量,或者如果你想使用所有的回复,就不要设置它

`<OTA_AirLowFareSearchRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-           instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="3.0.0"             ResponseType="OTA" ResponseVersion="3.0.0">
         <POS xmlns="http://www.opentravel.org/OTA/2003/05">
        <Source PseudoCityCode="XXXX">
            <RequestorID Type="0.AAA.X" ID="REQ.ID">
            <CompanyName Code="TN"/>
            </RequestorID>
        </Source>
        </POS>
    <OriginDestinationInformation xmlns="http://www.opentravel.org/OTA/2003/05"      RPH="1">
        <DepartureDateTime>2017-04-21T03:18:35</DepartureDateTime>
        <OriginLocation LocationCode="YYZ"/>
            <DestinationLocation LocationCode="SIN"/>
        </OriginDestinationInformation>
        <TravelPreferences xmlns="http://www.opentravel.org/OTA/2003/05">
            <TPA_Extensions>
                **<NumTrips Number="5"/>**
            </TPA_Extensions>
        </TravelPreferences>
        <TravelerInfoSummary xmlns="http://www.opentravel.org/OTA/2003/05">
            <AirTravelerAvail>
                <PassengerTypeQuantity Code="ADT" Quantity="1"/>
            </AirTravelerAvail>
        </TravelerInfoSummary>
        <TPA_Extensions xmlns="http://www.opentravel.org/OTA/2003/05">
            <IntelliSellTransaction>
                <RequestType Name="50ITINS"/>
            </IntelliSellTransaction>
        </TPA_Extensions>
    </OTA_AirLowFareSearchRQ>`
`
2017-04-21T03:18:35
****
`

所以我想出来了,你需要将
标签设置为你想要的行程数,或者如果你想使用所有的回复,就不要设置它

`<OTA_AirLowFareSearchRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-           instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="3.0.0"             ResponseType="OTA" ResponseVersion="3.0.0">
         <POS xmlns="http://www.opentravel.org/OTA/2003/05">
        <Source PseudoCityCode="XXXX">
            <RequestorID Type="0.AAA.X" ID="REQ.ID">
            <CompanyName Code="TN"/>
            </RequestorID>
        </Source>
        </POS>
    <OriginDestinationInformation xmlns="http://www.opentravel.org/OTA/2003/05"      RPH="1">
        <DepartureDateTime>2017-04-21T03:18:35</DepartureDateTime>
        <OriginLocation LocationCode="YYZ"/>
            <DestinationLocation LocationCode="SIN"/>
        </OriginDestinationInformation>
        <TravelPreferences xmlns="http://www.opentravel.org/OTA/2003/05">
            <TPA_Extensions>
                **<NumTrips Number="5"/>**
            </TPA_Extensions>
        </TravelPreferences>
        <TravelerInfoSummary xmlns="http://www.opentravel.org/OTA/2003/05">
            <AirTravelerAvail>
                <PassengerTypeQuantity Code="ADT" Quantity="1"/>
            </AirTravelerAvail>
        </TravelerInfoSummary>
        <TPA_Extensions xmlns="http://www.opentravel.org/OTA/2003/05">
            <IntelliSellTransaction>
                <RequestType Name="50ITINS"/>
            </IntelliSellTransaction>
        </TPA_Extensions>
    </OTA_AirLowFareSearchRQ>`
`
2017-04-21T03:18:35
****
`

我尝试了这个方法,感谢您的输入,我找到了答案:)。不客气,我也怀疑NumTrips参数,但首先我想让您发出标准BFM请求,看看是否一切正常。无论如何,我很感激你找到了解决方案,祝你Sabre好运:)我尝试了这个,谢谢你的输入,我找到了答案:)。不客气,我也怀疑NumTrips参数,但首先我想让你发出标准BFM请求,看看一切是否正常。无论如何,我很感激你能找到一个解决方案,祝你Sabre好运:)你可能想在发布BFM问题时掩盖你的IPCC。@Bruno:嗯,这是一个假的IPCC,实际上是来自Sabre的代码样本。谢谢你的提醒。@wisdoom使用编辑来隐藏此信息是无用的,因为编辑历史记录是公共记录。如果需要删除,请使用自定义的mod标志。在发布BFM问题时,您可能希望屏蔽您的IPCC。@布鲁诺:这是一个假的IPCC,实际上是sabre代码样本中的IPCC。谢谢你的提醒。@wisdoom使用编辑来隐藏此信息是无用的,因为编辑历史记录是公共记录。如果需要删除,请使用自定义mod标志。