2 Replies Latest reply on Mar 10, 2011 3:29 PM by curtis33321

    HTTP Service Error

    forsythes Level 1

      Hello All,


      I've searched and read just about everything I've found and cannot resolve this issue. Please help!


      I've got a flex 4 project that is working beautifully locally. It allows a person to fill out a form which is sent to a cgi script. In turn, that cgi script querries a remote server and responds back to my flex app with an xml file that I use throughout the rest of the app.


      MyApp -> script.cgi -> remote server results -> script.cgi xml file -> MyApp


      Unfortunately, I get security and http errors when trying to use this app on my school's server. I've included a cross-domain.xml file with information regarding the remote server, but since the information I need for my app is coming from an xml file which is written to my cgi-bin by my cgi script, i'm not sure the cross-domain file is even necessary. Is it? I *do* get the error before any information is written to the cgi-bin... so the xml file I need is never written. Permissions on the cgi-bin are set to allow to write and execute, and outside of my app I am able to execute scripts which write to the folder.


      Is there some server (Apache) setting that could be preventing my flex app from working?

      Is there something I need to set in Flex? On init() I've tried URLLoader as well as Security.allowInsecureDomain("*.mysite.com"), but nothing seems to make any difference.


      Any help is appreciated.


      Thank you!

        • 1. Re: HTTP Service Error
          saisri2k2 Level 4

          Check the ports on the server, if the ports are closed it might cause this problem / firewalls etc., .. also, the application which you load should load from the same domain you are making the httpservice call. Also try a lot on the crossdomain policy.

          1 person found this helpful
          • 2. Re: HTTP Service Error

            Try to run the cgi script on your school server without calling it from the app to rule it out.  It may have access issues for the xml file you are loading.  If the file you are loading via the script is found locally on the server then you are correct you will not need a crossdomain file.


            That said, if the cgi call from the flash app is via a url that is a Fully Qualified Domain Name instead of a relative path, then you will need the cross domain file if the domains do not exactly match.  For example if the swif is located at http://mydomain.com/swf.html, the cgi also should be located at http://mydomain.com.  Hope this helps in troubleshooting.  I have found HTTP service calls to be the most tricky to troubleshoot because of all of the things that have to be right in order for them to work, but I use them an awful lot.