Skip to Content
0
Former Member
Dec 01, 2009 at 09:13 AM

Silverlight and SAP Web Service

38 Views

Hi,

I'm trying to connect Silverlight4 with SAP web service. Web service has no encryption and uses SOAP 1.1.

I've already tried Web Client, HTTPrequest and 'Add service reference'. Each method returns the same error: 'Not found' ... but endpoint is ok.. When I enter its address in browser I see soap packet so it works for sure.

When I run my application first I see logging window. Then I enter my SAP username and password and after couple of seconds debugger says that file was not found on the server. Before I placed crossdomain.xml and clientaccesspolicy.xml on the server I saw only 'security exception' and there was no logging window, so I though that these files are ok.. but today I tried to debug my program and when I do:

MessageBox(response.ToString()) - just to see what is wrong, then I saw an error: 'Invalid cross-thread access'. What now? Where is the problem?

xml files are placed in the root:

http://myserver_ip/crossdomain.xml

and looks like this:

<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
  <allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>




<access-policy>

  <cross-domain-access>

    <policy>

      <allow-from http-request-headers="*">

        <domain uri="*"/>

      </allow-from>

      <grant-to>

        <resource path="/" include-subpaths="true"/>

      </grant-to>

    </policy>

  </cross-domain-access>

</access-policy>

what is wrong? Endpoint works fine. I also can use this web service from FLEX. Why Silverlight doesn't work?

Please help.

Edited by: pw.skiba on Dec 5, 2009 9:08 PM