我尝试连接到 .Net SOAP 服务,该 SOAP 服务由另一个项目成员制作,并用 C# 编写。他告诉我他使用 WCF Self Host Client。
我使用 netbeans 7.1 生成基于 WSDL 的 Java SOAP 客户端。当我用java客户端到java服务器尝试它时,这很有效。但是当我使用 .Net 服务器尝试它时,我得到:
WARNING: SP0100: Policy assertion WARNING: SP0100: Policy assertion Assertion[com.sun.xml.ws.security.impl.policy.SpnegoContextToken] {
assertion data {
namespace = 'http://schemas.xmlsoap.org/ws/2005/07/securitypolicy'
prefix = 'sp'
local name = 'SpnegoContextToken'
value = 'null'
optional = 'false'
ignorable = 'false'
attributes {
name = 'http://schemas.xmlsoap.org/ws/2005/07/securitypolicy:IncludeToken', value = 'http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient'
}
}
no parameters
nested policy {
namespace version = 'v1_5'
id = 'null'
name = 'null'
vocabulary {
1. entry = 'http://schemas.xmlsoap.org/ws/2005/07/securitypolicy:RequireDerivedKeys'
}
assertion set {
Assertion[com.sun.xml.ws.policy.sourcemodel.DefaultPolicyAssertionCreator$DefaultPolicyAssertion] {
assertion data {
namespace = 'http://schemas.xmlsoap.org/ws/2005/07/securitypolicy'
prefix = 'sp'
local name = 'RequireDerivedKeys'
value = 'null'
optional = 'false'
ignorable = 'false'
no attributes
}
no parameters
no nested policy
}
}
}
} is not supported under Token assertion.
我在其他论坛上看到这个问题无法解决,有人知道如何帮助我吗?
对于服务器端,我们设置了 wsHttpBinding,但我们希望在没有任何安全设置的情况下运行 SOAP 服务。这就是为什么我们尝试在我们的 app.config 中使用这段 xml 来修复它
<bindings>
<basicHttpBinding>
<binding name="basicHttpBindingConfig">
<security mode="None">
</security>
</binding>
</basicHttpBinding>
</bindings>
它只是一个基本的自托管 WCF 应用程序。