Visual Studio无法使用包含UsernameToken策略的Web Service
尝试在Visual Studio 2010中添加对Web Service的引用时出现错误.Web Service使用JAX-WS / Metro / GlassFish堆栈以Java实现,并包含UsernameToken策略。这是WSDL的摘录:
<wsp:Policy
xmlns:wsp="http://www.w3.org/ns/ws-policy"
xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"
wsu:Id="UsernameToken">
<sp:SupportingTokens>
<wsp:Policy>
<sp:UsernameToken sp:IncludeToken=".../IncludeToken/AlwaysToRecipient" />
</wsp:Policy>
</sp:SupportingTokens>
</wsp:Policy>
当我尝试在Visual Studio中向此Web服务添加服务引用时,我收到以下警告:
Custom tool warning:
The following Policy Assertions were not Imported:
XPath://wsdl:definitions[@targetNamespace='http://archfirst.org/bfoms/tradingservice.wsdl']/wsdl:binding[@name='TradingWebServicePortBinding']
Assertions:
<sp:SupportingTokens xmlns:sp='http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702'>..</sp:SupportingTokens>
Custom tool warning:
Endpoint 'TradingWebServicePort' at address 'http://localhost:8080/bfoms-javaee/TradingService'
is not compatible with Silverlight 4. Skipping...
Custom tool warning:
No endpoints compatible with Silverlight 4 were found. The generated client
class will not be usable unless endpoint information is provided via the
constructor.
为什么Visual Studio无法导入断言?
附:我能够使用SoapUI工具导入和测试Web服务。
没有找到相关结果
已邀请:
1 个回复
亥套惟间连
(我在创建自定义绑定时也没有找到它)。 WCF也不支持使用消化密码的用户名令牌。如果您需要具有已消化密码的用户名令牌,则必须实施WCF安全管道的其他部分。同样,它可能是Silverlight有限功能集的问题。 您可以尝试在托管应用程序中创建代理服务。该服务将由Silverlight应用程序调用,它将调用Java服务。