You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Sabre无会话Token获取失败求助:XML报错及字段填写疑问

Fixing Sabre TokenCreateRQ: USG_EBXML_FIELD_TOO_LONG & Missing Fields

Let's tackle your Sabre TokenCreateRQ issues head-on. First, that USG_EBXML_FIELD_TOO_LONG error tells you one of your XML fields has content exceeding the allowed character limit—we'll fix that while sorting out all the uncertain/missing fields in your request.

First: Resolve the Field Length Error

The most likely culprits here are either:

  • Stale timestamp values: You're using a 2018 timestamp, which might not be the issue itself, but ensuring you use a valid current UTC time (formatted correctly) avoids edge cases.
  • Unnecessary fields: Elements like sec:NewPassword (for password resets, not token creation) or extra optional fields with invalid/overlong content can trigger this error.

Step-by-Step Field Fixes

Let's go through each uncertain field in your request:

Security Header Fields

  • sec:BinarySecurityToken: Remove this entirely—it's used for authenticated subsequent requests, not for creating a new token.
  • sec:SabreAth: Remove this too—it's for existing session authentication, not token creation.
  • sec:NewPassword: Delete this element; it's only needed if you're resetting your password, not generating a token.
  • Organization & Domain: If your Sabre account doesn't require these, remove them. If they are required, confirm the allowed length with Sabre (typically short strings, no more than 10-15 characters).

MessageHeader Fields

  • mes:id: Generate a unique UUID (e.g., urn:uuid:7a3e0d2f-4b5c-6d7e-8f9a-0b1c2d3e4f5a)—this identifies your request header.
  • mes:version: Set to 1.0 (fixed ebXML version for Sabre requests).
  • mes:From > mes:Role: Set to Originator (standard ebXML role for the request sender).
  • mes:From > mes:PartyId mes:type: Use urn:x-sabre:clientid (identifies your client ID).
  • mes:To > mes:Role: Set to Receiver (standard ebXML role for the Sabre server).
  • mes:To > mes:PartyId mes:type: Use urn:x-sabre:serverid (identifies the Sabre server endpoint).
  • CPAId: This is your Commerce Partner Agreement ID—you must get this from the Sabre Developer Portal; it's a required field for all Sabre API requests.
  • mes:MessageId: Generate another unique UUID (different from the header's id) to identify the message itself.
  • mes:Timestamp, mes:TimeToLive, mes:Timeout: Use current UTC time in the format YYYY-MM-DDTHH:MM:SSZ (e.g., 2024-05-20T15:45:00Z). Avoid past timestamps, as they can cause validation errors.
  • mes:DuplicateElimination: Set to true if you want Sabre to ignore duplicate requests with the same MessageId; otherwise, remove it.
  • mes:Description: Optional—you can set it to something like Token creation request if needed, keep it short.

Body Field

  • web:TokenCreateRQ Version: Set to 1.0.0 (fixed version for this request).

Corrected Request Example

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
                  xmlns:sec="http://schemas.xmlsoap.org/ws/2002/12/secext" 
                  xmlns:mes="http://www.ebxml.org/namespaces/messageHeader" 
                  xmlns:web="http://webservices.sabre.com">
  <soapenv:Header>
    <sec:Security>
      <sec:UsernameToken>
        <sec:Username>123</sec:Username>
        <sec:Password>mypass</sec:Password>
        <!-- Remove Organization/Domain if not required by your account -->
        <Organization>org1</Organization>
        <Domain>AAA</Domain>
      </sec:UsernameToken>
    </sec:Security>
    <mes:MessageHeader mes:id="urn:uuid:7a3e0d2f-4b5c-6d7e-8f9a-0b1c2d3e4f5a" mes:version="1.0">
      <mes:From>
        <mes:PartyId mes:type="urn:x-sabre:clientid">sastaticket.pk</mes:PartyId>
        <mes:Role>Originator</mes:Role>
      </mes:From>
      <mes:To>
        <mes:PartyId mes:type="urn:x-sabre:serverid">https://sws-crt.cert.havail.sabre.com</mes:PartyId>
        <mes:Role>Receiver</mes:Role>
      </mes:To>
      <mes:CPAId>YOUR_CPA_ID_HERE</mes:CPAId>
      <mes:ConversationId>1234</mes:ConversationId>
      <mes:Service mes:type="Sabre Web Services">Session</mes:Service>
      <mes:Action>TokenCreateRQ</mes:Action>
      <mes:MessageData>
        <mes:MessageId>urn:uuid:1a2b3c4d-5e6f-7g8h-9i0j-k1l2m3n4o5p6</mes:MessageId>
        <mes:Timestamp>2024-05-20T15:45:00Z</mes:Timestamp>
        <mes:TimeToLive>2024-05-20T16:00:00Z</mes:TimeToLive>
      </mes:MessageData>
      <mes:DuplicateElimination>true</mes:DuplicateElimination>
      <mes:Description xml:lang="en">Token creation request</mes:Description>
    </mes:MessageHeader>
  </soapenv:Header>
  <soapenv:Body>
    <web:TokenCreateRQ Version="1.0.0"/>
  </soapenv:Body>
</soapenv:Envelope>

Final Checks

  • Replace YOUR_CPA_ID_HERE with your actual CPA ID from Sabre.
  • Double-check all field lengths—Sabre typically limits string fields to 50 characters or less (varies by field; refer to Sabre's official docs for specifics).
  • Ensure your username and password are valid for the Sabre certification environment.

内容的提问来源于stack exchange,提问作者Awais Qureshi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 04:36:01