【问题标题】:How to test WCF wsHttpBinding endpoint along with certificate using SOAP UI tool?如何使用 SOAP UI 工具测试 WCF wsHttpBinding 端点以及证书?
【发布时间】:2019-09-16 11:42:04
【问题描述】:

我想使用内置于 wsHttpBinding 的 SOAP UI 工具以及 x509certificate 身份验证来测试我的 wcf 服务端点。它支持 basicHttpBinding 并正常工作,但 wsHttpBinding 出错。任何帮助,将不胜感激。我收到以下错误消息作为响应。

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
   <s:Header>
      <a:Action s:mustUnderstand="1">http://www.w3.org/2005/08/addressing/soap/fault</a:Action>
      <a:RelatesTo>uuid:81f1ec47-0bd4-4dd0-b958-648ee934be24</a:RelatesTo>
   </s:Header>
   <s:Body>
      <s:Fault>
         <s:Code>
            <s:Value>s:Sender</s:Value>
            <s:Subcode>
               <s:Value xmlns:a="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">a:InvalidSecurity</s:Value>
            </s:Subcode>
         </s:Code>
         <s:Reason>
            <s:Text xml:lang="en-US">An error occurred when verifying security for the message.</s:Text>
         </s:Reason>
      </s:Fault>
   </s:Body>
</s:Envelope>

【问题讨论】:

  • 它给出的错误是什么?您提供的信息越多,别人提供解决方案的机会就越大。
  • @strickt01 我用错误信息更新了查询
  • 您的问题不清楚。您是在问如何使用工具 SoapUI,还是在问如何编写 WCF 服务?无论哪种情况,您都需要提供minimal reproducible example,以便我们知道您做了什么、您期望什么以及出了什么问题。

标签: wcf soapui x509certificate wcf-wshttpbinding


【解决方案1】:

如果 WCF 服务由 Wshttpbinding 创建并且所需的客户端凭据是证书,我们就能够在 SOAPUI 中测试 WCF 服务。
请参考我前几天写的回复。
Test WCF with Mutual Certificate Authentication using SOAPUI
仅仅基于安全错误。我无法推断出服务器端的代码设计。我希望您可以发布更多有关在服务器端配置的安全绑定和客户端凭据类型的详细信息,以便我举例说明。 另外,这里有一些链接,希望对你有用。
WCF wsHttpBinding in SoapUI
https://www.soapui.org/docs/functional-testing/sending-https-requests.html
如果有什么我可以帮忙的,请随时告诉我。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-01-10
    • 2012-07-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-23
    • 2016-10-28
    相关资源
    最近更新 更多