有没有人有使用 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();
有什么想法我可能会出错吗?