我有一个 Silverlight 3 项目,我需要调用一个 Java WebService - 绑定没问题(SOAP 1.1 和 basicHttpBinding):
客户端配置文件:
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="SkyinfoTestInterfaceExport2_SkyinfoTestInterfaceHttpBinding"
maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<security mode="None">
<transport>
<extendedProtectionPolicy policyEnforcement="Never" />
</transport>
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="myAddress"
binding="basicHttpBinding" bindingConfiguration="SkyinfoTestInterfaceExport2_SkyinfoTestInterfaceHttpBinding"
contract="SkyInfoServiceReference.SkyinfoTestInterface" name="SkyinfoTestInterfaceExport2_SkyinfoTestInterfaceHttpPort" />
</client>
</system.serviceModel>
当我在客户端调用方法时,我收到此策略错误:
尝试向 URI '...' 发出请求时出错。这可能是由于在没有适当的跨域策略或不适合 SOAP 服务的策略的情况下尝试以跨域方式访问服务。您可能需要联系服务的所有者以发布跨域策略文件并确保它允许发送与 SOAP 相关的 HTTP 标头。此错误也可能是由于在 Web 服务代理中使用内部类型而不使用 InternalsVisibleToAttribute 属性造成的。有关更多详细信息,请参阅内部异常。
我知道这 2 个策略 XML 文件,但我试图调用的 Java EE 服务托管在我无权访问的 IBM WebSphere Process Server 上。
有人知道如何解决这个政策例外吗?