【问题标题】:How to include SAMl assertion in soap security header如何在肥皂安全标头中包含 SAMl 断言
【发布时间】:2017-02-04 12:53:51
【问题描述】:

我正在使用 gsoap 2.8.0。在其中一个请求中,我需要使用 SAML 断言添加从 Vmware SSO 服务器获取的令牌。

当我使用 gsoap(wsdl2h 和 soapcpp2)生成代码时,出现错误: .\wsdlout\vimService.h(224691): 警告: struct _saml__Assertion 在 wsse.h:197 中声明没有内容

在生成的代码中,我找不到“struct _saml__Assertion”定义。

如何在代码中添加 SAML 断言?

【问题讨论】:

    标签: c++ soap saml saml-2.0 gsoap


    【解决方案1】:

    建议将您的 gsoap 安装升级到 2.8.40,因为类型实际上是 struct saml1__AssertionTypestruct saml2__AssertionType,具体取决于您想要的 SAML 版本。

    saml 断言在 gsoap 根目录中的 import/saml1.h (SAML 1.0) 和 import/saml2.h (SAML 2.0) 下声明。 wsse.h 文件具有以下一项或两项:

    #import "saml1.h"
    #import "saml2.h"
    

    这些足以定义 SAML 断言结构。确保使用soapcpp2 -Igsoap-2.8/gsoap/import 让soapcpp2 在根gsoap 目录下的导入目录中找到正确的.h 文件。

    在更新的 soap 文档中查看 WS-Trust and SAML 上的所有这些详细信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-05
      • 1970-01-01
      • 1970-01-01
      • 2016-01-25
      • 1970-01-01
      相关资源
      最近更新 更多