I have a FLEX3 application - I have created a release for it and saved it in my tomcat webapps folder. This Flex3 application consumes the Web-Services hosted on the same tomcat [axis web services]. This is how I have defined them in Flex code:
<mx:WebService
id="abc"
wsdl="http://localhost:8080/axis2/services/ABC?wsd开发者_运维百科l" ></mx:WebService>
When I try to access the application from the browser using localhost, I am able to. When I try to access the application from the browser on the same machine using the IPAddress, only the main page is opened and none of the web-services is called.
You should probably put a special crossdomain.xml file to the root of the web service site because Flash denies crossdomain requests by default security configuration.
The simpliest crossdomain.xml allowing access from any location is:
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>
When you access your application using localhost, requests are in the same domain, that's why it works.
精彩评论