Sabre会话令牌到期

时间:2018-05-02 11:26:32

标签: php sabre

我使用SessionCreateRQ检索了会话令牌,我知道会话令牌在15分钟后过期,我如何使用OTA_PingRQ更新我的会话,该行为没有适当的有效负载,所以如果任何人可以提供SOAP有效载荷,请。

2 个答案:

答案 0 :(得分:2)

除了以下内容之外,无需拥有有效负载

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
    <SOAP-ENV:Header>
        <eb:MessageHeader SOAP-ENV:mustUnderstand="1" eb:version="1.0">
            <eb:ConversationId/>
            <eb:From>
                <eb:PartyId>{FROM}</eb:PartyId>
            </eb:From>
            <eb:To>
                <eb:PartyId>{TO}</eb:PartyId>
            </eb:To>
            <eb:CPAId>{IPCC}</eb:CPAId>
            <eb:Service eb:type="sabreXML">OTA_PingRQ</eb:Service>
            <eb:Action>OTA_PingRQ</eb:Action>
            <eb:MessageData>
                <eb:MessageId>{MESSAGEID}</eb:MessageId>
                <eb:Timestamp>{TIMESTAMP}</eb:Timestamp>
            </eb:MessageData>
        </eb:MessageHeader>
        <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/12/utility">
            <wsse:BinarySecurityToken>{TOKEN}</wsse:BinarySecurityToken>
        </wsse:Security>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <OTA_PingRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0.0">
            <EchoData> Are you there </EchoData>
        </OTA_PingRQ>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

信封完整请求:

openFileDialog1.Filter = "Excel workbooks(*.xls;*.xlsx)|*.xls;*.xlsx";

答案 1 :(得分:2)

第一次从SessionCreateRS响应中存储返回的BinarySecurityToken时,使用SessionCreateRQ请求。 在OTA_PingRQ请求中使用此BinarySecurityToken。 以下是使用Soap Envelope的OTA_PingRQ请求示例:

 <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
  <soap-env:header>
    <eb:MessageHeader xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" soap-env:mustUnderstand="0">
      <eb:From>
        <eb:PartyId eb:type="urn:x12.org:IO5:01">from</eb:PartyId>
      </eb:From>
      <eb:To>
        <eb:PartyId eb:type="urn:x12.org:IO5:01">ws</eb:PartyId>
      </eb:To>
      <eb:CPAId>[CPA_ID]</eb:CPAId>
      <eb:ConversationId>[CONVERSATION_ID]</eb:ConversationId>
      <eb:Service>OTA_PingRQ</eb:Service>
      <eb:Action>OTA_PingRQ</eb:Action>
      <eb:MessageData>
        <eb:MessageId>[MESSAGE_ID]</eb:MessageId>
        <eb:Timestamp>[TIMESTAMP]</eb:Timestamp>
      </eb:MessageData>
    </eb:MessageHeader>
    <eb:Security xmlns:eb="http://schemas.xmlsoap.org/ws/2002/12/secext" soap-env:mustUnderstand="0">
      <eb:BinarySecurityToken>[BINARY_SECURITY_TOKEN]</eb:BinarySecurityToken>
    </eb:Security>
  </soap-env:header>
  <soap-env:Body>
    <OTA_PingRQ xmlns="http://www.opentravel.org/OTA/2003/05" TimeStamp="2011-02-28T15:15:00-06:00" Version="1.0.0">
      <EchoData>Are you there</EchoData>
    </OTA_PingRQ>
  </soap-env:Body>
</soap-env:Envelope>