Solving the Soap Cross Domain Problem for Flash Player 9,0,124,0
Posted on June 16th, 2008 by Jason
Recently, the Flash Player update (9,0,124,0) crippled one of our clients’ sites by stopping the Flash-based application from making Soap calls to a web server other than the one that served the SWF.
Despite consulting various internet resources, we were unable to find any solution that worked. Wade Arnold’s blog entry came the closest, but unfortunately included a tag that stopped even previous versions of the Flash Player from working.
The following crossdomain.xml file is the working solution that we came up with. In production, you should restrict the ‘domain=’ fields to the domains that serve your SWFs.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"> <cross-domain-policy> <allow-access-from domain="*" /> <allow-http-request-headers-from domain="*" headers="*" /> </cross-domain-policy>
Thanks guys! You saved me hours/days.
I’m having the same problem as you had, unfortunately even this most open of crossdomain policies doesn’t work. The strange thing is that the first call to our Service is allowed: it’s uses GET. Any subsequent calls to the the Service use POST and they fail.
I still have no resolution.
@Luke:
I don’t profess to be an expert in these matters, but doesn’t SOAP require the use of POST? How are you making the first call using GET?
Thanks! Solved also my problem.
I was using WebService to get data from other domains and suddently things stopeed working.
Added to the crossdomain.xml and now everything works.
I knew there was something screwy with Wade’s tags. This problem never seemed to affect any amfphp as he’d suggested it would, so I just ignored it. It was an intermittent FileReference upload (when it was to a different subdomain) problem that wouldn’t go away that caused me to find this post…
Thanks!!! Hours and days is exactly right, I wish Adobe’s documentation was clearer
LUKE: Looks to me like the GET comes from the call to
_global.gameService = new WebService(”http://www.DomainName.com/PostScore.asmx?wsdl”);
Presumably, Flash is just loading the service’s WSDL. The actual processing of the WebService Call is a POST.
Thanks for this, by the way. I did waste 3 hours today messing with all sorts of things. The Headers section in the crossdomain.xml did the trick!
Kevin
Of course - I’d forgotten about requesting the WSDL!
That makes sense.
Thanks for the help guys, much appreciated.
Well done guys, the request headers inclusion has done the trick. Shame adobe are not so forthcoming with the resolution.
Thanks Thanks Thanks Thanks