简体   繁体   English

Sabre SOAP - wsse:安全 - 未绑定

[英]Sabre SOAP - wsse:Security - Not Bound

I am trying to make a TOken request to the SABRE SOAP, I am using their examples but at the end I get this error:我正在尝试向 SABER SOAP 发出令牌请求,我正在使用他们的示例,但最后我收到此错误:

  <faultstring>Unable to create envelope from given source: Error on line 19 of document  : The prefix "wsse" for element "wsse:Security" is not bound. Nested exception: The prefix "wsse" for element "wsse:Security" is not bound.</faultstring>

This is my request:这是我的要求:

    <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>     
      <mes:MessageHeader mes:version="1">
         <mes:From>           
            <mes:PartyId>Client</mes:PartyId>           
         </mes:From>
         <mes:To>           
            <mes:PartyId>SWS</mes:PartyId>            
         </mes:To>
         <mes:CPAId>DCG</mes:CPAId>
         <mes:ConversationId>123</mes:ConversationId>
         <mes:Service>Session</mes:Service>
         <mes:Action>TokenCreateRQ</mes:Action>
         <mes:MessageData>
            <mes:MessageId>1234</mes:MessageId>
            <mes:Timestamp>2015-01-01T00:00:00</mes:Timestamp>           
         </mes:MessageData>       
      </mes:MessageHeader>
         <wsse:Security>
            <wsse:UsernameToken>
                <wsse:Username>USER</wsse:Username>
                <wsse:Password>PASSWORD</wsse:Password>
                <Organization>PCC</Organization>
                <Domain>DOMAIN</Domain>
            </wsse:UsernameToken>
        </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <web:TokenCreateRQ Version="1.0.0"/>
   </soapenv:Body>
</soapenv:Envelope>

and this is the WSDL file: http://files.developer.sabre.com/wsdl/sabreXML1.0.00/usg/TokenCreateRQ.wsdl这是 WSDL 文件: http://files.developer.sabre.com/wsdl/sabreXML1.0.00/usg/TokenCreateRQ.ZDD3BDA2F13F14AEF6CC0EDE06064E

Any idea what is wrong?知道有什么问题吗?

Try this structure.试试这个结构。 The difference are namespaces under Security.不同之处在于安全性下的命名空间。

<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/12/utility">
         <wsse:UsernameToken>
            <wsse:Username>${#TestCase#Username}</wsse:Username>
            <wsse:Password>${#TestCase#Password}</wsse:Password>
            <Organization>${#TestCase#CPAId}</Organization>
            <Domain>${#TestCase#Domain}</Domain>
         </wsse:UsernameToken>
      </wsse:Security>

The error is on the namespace declaration, used declared as sec but then used wsse .错误出现在命名空间声明上,使用声明为sec但随后使用wsse

Replace: xmlns:sec="http://schemas.xmlsoap.org/ws/2002/12/secext"替换: xmlns:sec="http://schemas.xmlsoap.org/ws/2002/12/secext"
With: xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext"与: xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext"

As a simple recommendation for looking into namespaces, you can import the WSDL into SoapUI and check the blank example auto-generated with all the possible elements for the request.作为查看命名空间的简单建议,您可以将 WSDL 导入 SoapUI 并检查自动生成的空白示例以及请求的所有可能元素。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为wsse:UserToken构造SOAP安全标头 - Constructing SOAP Security Header for wsse:UserToken 将wsse:security元素添加到soap标头 - Adding wsse:security element to soap header 使用kso​​ap2在Android中使用摘要(SOAP)的WSSE安全标头 - WSSE Security Headers with Digest (SOAP) in Android using ksoap2 对如何创建 SOAP 一无所知<wsse:Security>标题 - Clueless about how to create SOAP <wsse:Security> header WSSE - XML SOAP安全性和密钥加密和存储(EncryptedData / EncryptedKey) - WSSE - XML SOAP security and key encryption and storing (EncryptedData/EncryptedKey) 具有SAML的wsse安全标头 - wsse Security Header with SAML 在soap消息中使用wsse安全标头(Visual Studio 2015,.Net Framework 4.5) - Use wsse security header in soap message (Visual Studio 2015, .Net Framework 4.5) javax.xml.soap.SOAPException:无法找到前缀名称空间:wsse HEADER安全性 - javax.xml.soap.SOAPException:unable to find namespace for prefix: wsse HEADER Security "<i>How to add SOAP-ENV:mustUnderstand=&quot;1&quot; in<\/i>如何添加 SOAP-ENV:mustUnderstand=&quot;1&quot;<\/b><wsse:security> <i>header using python zeep library<\/i>使用 python zeep 库的标头<\/b>" - How to add SOAP-ENV:mustUnderstand="1" in <wsse:security> header using python zeep library 在SOAP请求中使用自定义字段实现WSSE安全标头时,C#运行时错误 - C# Runtime Error when implementing WSSE Security Headers with custom fields in SOAP request
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM