1
我正在C#中的asp.net webservices中使用saber工作,我正在尝试调用wwebservice airlowfaresearch并且没关系,但我会尽力让讨价还价查找器的最大备用日期,我用这个:webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirLowFareSearchLLS1.13.1RQ.wsdl
,改变了行动:BargainFinderMax_ADRQ
,这是我的要求:访问WSDL文件的SOAP客户端
<?xml version="1.0" encoding="UTF-8"?>
<OTA_AirLowFareSearchRQ AltLangID="en-us" PrimaryLangID="en-us" SequenceNmbr="1" Version="3.1.0" Target="Test" TimeStamp="0001-01-01T12:00:00" EchoToken="String" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<POS>
<Source PseudoCityCode="X0JA"/>
</POS>
<OriginDestinationInformation RPH="1">
<DepartureDateTime>2017-06-07</DepartureDateTime>
<OriginLocation LocationCode="LIM"/>
<DestinationLocation LocationCode="AQP"/>
<TPA_Extensions>
<SegmentType Code="O"/>
<WithoutAvail/>
</TPA_Extensions>
</OriginDestinationInformation>
<OriginDestinationInformation RPH="2">
<DepartureDateTime>2017-06-10</DepartureDateTime>
<OriginLocation LocationCode="AQP"/>
<DestinationLocation LocationCode="LIM"/>
<TPA_Extensions>
<SegmentType Code="O"/>
<WithoutAvail/>
</TPA_Extensions>
</OriginDestinationInformation>
<TravelPreferences MaxStopsQuantity="2">
<CabinPref RPH="1" Code="Y"/>
<CabinPref RPH="2" Code="Y"/>
<TPA_Extensions>
<ExcludeVendorPref Code="2I"/>
<ExcludeVendorPref Code="UA"/>
<ExcludeVendorPref Code="IB"/>
<NumTrips Number="19"/>
</TPA_Extensions>
</TravelPreferences>
<TravelerInformation>
<PassengerTypeQuantity Code="ADT" Quantity="1"/>
<TPA_Extensions/>
</TravelerInformation>
<PriceRequestInformation CurrencyCode="USD">
<TPA_Extensions>
<FareCalc>
<FareBasis WithFareCalc="true"/>
</FareCalc>
<Priority>
<Price Priority="1"/>
<DirectFlights Priority="2"/>
<Time Priority="3"/>
<Vendor Priority="4"/>
</Priority>
</TPA_Extensions>
</PriceRequestInformation>
<TPA_Extensions>
<IntelliSellTransaction>
<RequestType Name="AD3"/>
</IntelliSellTransaction>
</TPA_Extensions>
</OTA_AirLowFareSearchRQ>
也没有找到,在响应中,对象oAirLowFareSearchRS
oAirLowFareSearchRS = oAirLowFareSearchRQService.OTA_AirLowFareSearchRQ(oAirLowFareSearchRQ)
我得到这个错误:
Object reference not set to an instance of an object.
和XML响应仅此:
<?xml version="1.0" encoding="UTF-8"?>
<OTA_AirLowFareSearchRS xsi:nil="true" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
是什么这个问题的原因是什么?
感谢您的回答,但我知道应该是请求,但我希望它出来这样,但在C#中,我不知道该怎么做,因为我什么都没有放回 –
让我明白,你正在使用.NET wsdl生成的请求模型类,因此您无法使用http客户端进行纯XML SOAP请求? –