when we want to access a file or image or some service from third party server such as flickr , yahoo, google …etc and ans since we do not have control to create a cross-domain.xml policy file then we can use life cycle data services to get the access.
Just download any life cycle data services such as Blaze DS/LCDS/Granite DS and configure the proxy-config.xml to create a proxy service. This service will enable you the access to the third party service.
There are two ways to create a proxy based service..
- Default Proxy service
In this case we use ‘dynamic-url’ element …..
<properties>
<dynamic-url>http://cnn.com/*</dynamic-url>
<dynamic-url>http://news.yahoo.com/*</dynamic-url>
</properties>
</destination>
and at the client side we can access them by specifying use-proxy attribute set to true..
<mx:WebService url=”http://cnn.com/api?wsdl” useProxy=”true” />
<properties>
<url>http://rss.cnn.com/rss/cnn_topstories.rss</url>
</properties>
</destination>
To access a named proxy service from MXML: