使用OpenEMM Web服务2.0进行身份验证

时间:2013-02-28 09:40:30

标签: c# soap-client

有没有人有使用OpenEMM Web服务的经验?

当我连接到服务时,我收到以下错误:

com.sun.xml.wss.XWSSecurityException:未达到消化密码的接收者要求;嵌套异常是com.sun.xml.wss.XWSSecurityException:com.sun.xml.wss.XWSSecurityException:未满足消化密码的接收者要求

这是我的web.config文件:

  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="openemmSoap11">
          <security mode="TransportWithMessageCredential">
            <transport clientCredentialType="Digest" />
            <message clientCredentialType="UserName" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="https://newsletter.********.co.uk/openemm-ws2/" binding="basicHttpBinding"
        bindingConfiguration="openemmSoap11" contract="emmservice.openemm"
        name="openemmSoap11" />
    </client>
  </system.serviceModel>

(我很高兴在apache上安装ssl证书)

这是我的实施:

   var param = new[]
        {
            new MapItem {key = "email", value = "*******************"},
            new MapItem {key = "mailtype", value = "0"}, new MapItem {key = "gender", value = "0"}
        };

    var service = new AddSubscriberRequest
        {
            parameters = param,
            overwrite = false,
            doubleCheck = true,
            keyColumn = "email"
        };

    var request = new openemmClient();
    request.ClientCredentials.UserName.UserName = "***********";
    request.ClientCredentials.UserName.Password = "********";
    request.Open();
    request.AddSubscriber(service);
    request.Close();

我可能出错的任何想法?

1 个答案:

答案 0 :(得分:1)

OpenEMM Web服务2.0需要创建随机数,时间戳和密码加密的创建。官方文档为HERE

您没有nonce或密码加密首先尝试文档示例

如果您需要实施方面的帮助 - 请!