I have built a FB4 application which accesses a .NET web service of a partner company. The app runs just fine in FB4 development environment, but won't work when published to my server. I can not figure out how to get past the following error:
Security error accessing url Destination: DefaultHTTP
It is unlikely that I will get a crossdomain.xml file on their server, so I'm trying to get it to work using a proxy. The proxy.php is located in the same directory as the swf, and it works just fine if I use it directly in the browser.
The following is what I currently have setup:
proxy.php:
<?php
$session = curl_init(trim(urldecode($_GET['url']))); // Open the Curl session
curl_setopt($session, CURLOPT_HEADER, false); // Don't return HTTP headers
curl_setopt($session, CURLOPT_RETURNTRANSFER, true); // Do return the contents of the call
$xml = curl_exec($session); // Make the call
header("Content-Type: text/xml"); // Set the content type appropriately
echo $xml; // Spit out the xml
curl_close($session); ?>
The code in Flash Builder 4 (I'm using a Webservice object in FB4):
wsdl = http://example.com/autoben/proxy2.php?url=http://staging.partnerCompany.net/api/v01_00/theservice.asmx?wsdl
The flash player is version 10.x
I'm obviously not understanding the new security rules built into the latest Flash player.
A screenshot of the error can be seen here: