Embedded swf in html if hosted in a domain server cannot call a web service cross domain

36 views
Skip to first unread message

Tridib

unread,
Jul 29, 2011, 4:09:35 AM7/29/11
to SWFObject
I've embedded this swf file in a html which is hosted in a web server
[*.xyz.com]. The swf file calls a web service hosted in another domain
[*.abc.com]. The call fails to happen as the lookup to crossdomain.xml
file fails. Its a public web service [w3schools] and I wonder what is
the need for this.

Does anyone know how to solve it. Configuring the crossdomain.xml for
another server/domain or configuring a server proxy is outside of the
question.

There is no problem if i access the html locally.

Its urgent and very important for us to adopt Flex.

Aran Rhee

unread,
Jul 29, 2011, 11:06:03 AM7/29/11
to swfo...@googlegroups.com

Well, if you are not able to get a crossdomain xml on the server you want to call, then the only other solution if you still want to use XML web-services IS to put the calls through a local server on *.xyz.com somehow. You can use mod_rewrite on the local server, or a simple proxy script etc.

I am not sure what else you are expecting - you can't just go a break the security sandboxing without doing something to the server which is giving data in some way...

As per your original request - why can you not have a local server?


You may be able to do a client-side "hack" if you are willing to experiment etc. There are no gaurentees that this will work however, so YMMV / you could bring yourself some headache going down this road...

a) If the webservice can return JSON data, then you can get at it without cross domain issues through the browser. You would then use ExternalInterface to communicate between the local page (which now holds the json data), and your swf.

b) You can also check out the flensed library developed by Getify here: http://flxhr.flensed.com/ . This should allow you to do the same thing with non-JSON web service calls, but I think you will still need to bridge to your swf through ExternalInterface the same way once the data is on the local page.


Aran




--
You received this message because you are subscribed to the Google Groups "SWFObject" group.
To post to this group, send email to swfo...@googlegroups.com.
To unsubscribe from this group, send email to swfobject+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/swfobject?hl=en.


MOLOKO

unread,
Aug 1, 2011, 7:14:17 AM8/1/11
to swfo...@googlegroups.com
Your question is not related to SWFObject - the topic of this group.

Try the Adobe Flash forums or support center
Reply all
Reply to author
Forward
0 new messages