3 Replies Latest reply on Apr 15, 2010 5:28 AM by bh-pano-life

    Flex Dataservices Deployment Problem

    bh-pano-life Level 1
      I´m using dataservices to connect to my database via php. This works  fine so far.
      The problems begin when I want to deploy the app, because I had to make  some changes to my model .fml file.
      Here is an excerpt:

      <annotation name="ServiceConfig">
      <item  name="PHP_RELATIVE_LOCATION">MyApp/application/amf/Navigation.php</item>
      <item name="PHP_SERVER_ROOT">C:/xampp/htdocs</item>
      <item name="DEFAULT_ENTITY_PACKAGE">valueObjects</item>
      <item  name="PHP_SERVICES_FOLDER">C:/xampp/htdocs/MyApp/public/flash/services</item>
      <item  name="PHP_LOCATION">C:/xampp/htdocs/MyApp/application/amf/Navigation.php</item>
      <item name="LINKED_FILE">Navigation.php</item>
      <item name="PHP_SERVER_ROOT_URL">http://localhost/</item>
      <item name="ABSOLUTE_ENDPOINT">http://localhost/MyApp/public/amf</item>
      <item name="PHP_CLASS_NAME">AMF_Navigation</item>
      </annotation>

      As you can see I intergrated my amf endpoint into my zend project,  there´s no gateway.php, and furthermore
      integrated the php classes used to "talk to the database". I had to do  this in order to make the whole thing run
      with zend session and doctrine as an ORM layer.
      As I now have paths and values specific for my development environment  the next question is, can I somehow
      use another .fml file for my release build to run in my production  environment? Of course I could edit the .fml file
      every time for the release build, but that would really be a pain... and  also I just can´t believe that Adobe didn´t
      anticipate a scenario like this and has some kind of solution.

        • 1. Re: Flex Dataservices Deployment Problem
          Radhakrishna Bhat Level 3

          Hi,

           

          .fml file is not required for deployment. Please refer this thread, http://forums.adobe.com/message/2551218

           

          -Radhakrishna

          1 person found this helpful
          • 2. Re: Flex Dataservices Deployment Problem
            bh-pano-life Level 1

            Thanks for the hint!

            That explains a little but doesn´t seem to solve my problem. I used the

            charles debugging proxy (http://www.charlesproxy.com/)

            to check whether there is an amf request dispatched at all but nothing.

             

             

            What strikes my odd is that in firebug I discovered that there is a

            request to http://localhost/crossdomain.xml with 404 Not Found of course.

            Could that be the problem in the first place?

             

            -Benjamin

            • 3. Re: Flex Dataservices Deployment Problem
              bh-pano-life Level 1

              I found the answer myself.

              I had a look at the files generated out of the .fml file, i.e. _Super_MyApp.as and there it said under _serviceControl.endpoint "http://localhost/and so on" where in default configurations there would be "gateway.php" only. As I integrated the gateway.php into my Zend Controllers .i.e. AmfController.php I had to put <item name="Endpoint">../amf</item> in my .fml file. Now it seems to work.

              However I still wonder what this does...

               

              <annotation name="ServiceConfig">

              <item   name="PHP_RELATIVE_LOCATION">MyApp/application/amf/Navigation.php</item>

              <item name="PHP_SERVER_ROOT">C:/xampp/htdocs</item>

              <item  name="DEFAULT_ENTITY_PACKAGE">valueObjects</item>

              <item    name="PHP_SERVICES_FOLDER">C:/xampp/htdocs/MyApp/public/flash/services</item>

              <item   name="PHP_LOCATION">C:/xampp/htdocs/MyApp/application/amf/Navigation.php</item>

              <item name="LINKED_FILE">Navigation.php</item>

              <item  name="PHP_SERVER_ROOT_URL">http://localhost/</item>

              <item  name="ABSOLUTE_ENDPOINT">http://localhost/MyApp/public/amf</item>

              <item name="PHP_CLASS_NAME">AMF_Navigation</item>

              </annotation>

               

              ... urls and paths are obviously wrong here but that doesn´t seem to be a problem when exported. I guess this is only for introspection of the services in flashbuilder, right? Or am I going to run into more problems?