我正在尝试使用OTA_AirBookLLSRQ和PassengerDetailsRQ进行预订。我能够在OTA_AirBookLLSRQ中取得成功,但是在PassengerDetailsRQ中失败并且误差低于此值。
我指的是Sabre CERT环境并遇到了这个问题。
请帮我指出我的请求有什么问题。
System.ServiceModel.FaultException:无效的服务版本 System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime 操作,ProxyRpc& rpc)at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, 对象[]出,IAsyncResult结果)at System.ServiceModel.Channels.ServiceChannelProxy.TaskCreator<> c__DisplayClass7_0
1.<CreateGenericTask>b__0(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory
1.FromAsyncCoreLogic(IAsyncResult的 iar,Func2 endFunction, Action
1 endAction,Task`1 promise,Boolean requiresSynchronization)
PassengerDetailsRQ的请求xmls是
的MessageHeader
<?xml version="1.0" encoding="utf-16"?>
<MessageHeader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" d1p1:version="2.0" xmlns:d1p1="http://www.ebxml.org/namespaces/messageHeader">
<d1p1:From>
<d1p1:PartyId>99999</d1p1:PartyId>
</d1p1:From>
<d1p1:To>
<d1p1:PartyId>123123</d1p1:PartyId>
</d1p1:To>
<d1p1:CPAId>TestCPA</d1p1:CPAId>
<d1p1:ConversationId>20171024T155602Z</d1p1:ConversationId>
<d1p1:Service>PassengerDetailsRQ</d1p1:Service>
<d1p1:Action>PassengerDetailsRQ</d1p1:Action>
<d1p1:MessageData>
<d1p1:MessageId>mid:20171024T155602Z@clientofsabre.com</d1p1:MessageId>
<d1p1:Timestamp>20171024T155602Z</d1p1:Timestamp>
</d1p1:MessageData>
</MessageHeader>
安全对象
<?xml version="1.0" encoding="utf-16"?>
<Security xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<BinarySecurityToken xmlns="http://schemas.xmlsoap.org/ws/2002/12/secext">Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/CERTG!ICESMSLB\/CRT.LB!-3218433817369427567!1447734!0</BinarySecurityToken>
</Security>
PassengerDetailsRQ
<?xml version="1.0" encoding="utf-16"?>
<PassengerDetailsRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<PostProcessing xmlns="http://services.sabre.com/sp/pd/v3_3">
<EndTransactionRQ>
<EndTransaction Ind="true" />
<Source ReceivedFrom="Oneworld RTW" />
</EndTransactionRQ>
</PostProcessing>
<SpecialReqDetails xmlns="http://services.sabre.com/sp/pd/v3_3">
<SpecialServiceRQ>
<SpecialServiceInfo>
<AdvancePassenger SegmentNumber="A">
<PersonName NameNumber="1.1">
<GivenName>Narasimham</GivenName>
<MiddleName>Venkata Lakshmi</MiddleName>
<Surname>Akella</Surname>
</PersonName>
</AdvancePassenger>
</SpecialServiceInfo>
</SpecialServiceRQ>
</SpecialReqDetails>
<TravelItineraryAddInfoRQ xmlns="http://services.sabre.com/sp/pd/v3_3">
<CustomerInfo>
<PersonName NameNumber="1.1" PassengerType="ADT">
<GivenName>Narasimham</GivenName>
<Surname>Akella</Surname>
</PersonName>
</CustomerInfo>
</TravelItineraryAddInfoRQ>
</PassengerDetailsRQ>
通过SOAP代理类放置请求的代码
PassengerDetails.PassengerDetailsPortTypeClient paxDetCli = new PassengerDetails.PassengerDetailsPortTypeClient("PassengerDetailsPortType1" + envName);
Task<PassengerDetails.PassengerDetailsRQResponse> resp = paxDetCli.PassengerDetailsRQAsync(msgHeader, security, paxDetReq);
resp.Wait();
txtResult.Text += "Sucess Response:" + SerializeObject(typeof(PassengerDetails.PassengerDetailsRQResponse), resp.Result);
答案 0 :(得分:1)
错误几乎说明了一切;在这种情况下缺少版本声明。
您应该将version="3.3.0"
添加到服务请求的标头中。