Question

I have a Silverlight 3 project, and I need to call a Java WebService - the bindings are ok (SOAP 1.1 and basicHttpBinding):

ClientConfig File:

<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>

When I call a method on client I get this Policy error:

An error occurred while trying to make a request to URI '...'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.

I know about those 2 policy XML filesbut Java EE service which I'm trying to call is hosted on a IBM WebSphere Process Server to which I don't have access.

Does anybody know how to work around this policy exception?

Was it helpful?

Solution

Since you don't have access to the server to implement a cross-domain policy, you will need to implement a proxy RIA service. Simply mimic the requests/responses on your local service and forward those requests onto the original service - then return the responses as necessary.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top