2 Replies Latest reply on Nov 29, 2011 2:11 PM by DrDTP

    Data services wizard not adding new package to the src.services package

    DrDTP Level 1

      I am using flash builder 4.5, as part of CS 5.5, on a development machine with Windows XP as the operating system. I use PHP with the Zend framework for data services server code and a My sql 5.1 database. I use the "add data service" wizard for my data services in the Flex project. By accepting "generate a sample" from the wizard several php code templates are generated that I can edit in Dreamweaver. I have added many data services with no problem. Today I developed a table to store user identifiers and used the wizard to make a new data service. When I did this the php data code was generated and there were no errors. Two actionscript files were added to the valueObjects package in the project. The bin-debug folder contains the appropriate php files. The data service is visible in the data services window. Unfortunately no package was added to the services package in the source folder (scr.services). I manually refreshed the service but still no package in the services package. I attempted to generate a service call. The proper "CallResponder" was added to the declarations in the main.mxml file but the service was not added. I have also:

       

      • Refreshed the project.
      • Made minor adjustments to the php code and saved it to force an auto refresh for the data service
      • Attempted to import the service. Code completion does not work with this and building the project generates an error. It will not import because it is not in the services package.
      • Closed the project
      • Closed the project and shut down the machine
      • Deleted the data service and added another - same problem
      • Deleted the data table, php files, the data service and added a new table with a different name and added a data service with a different name.

       

      There are no errors in the My sql database or in the php file. All files are located in the proper paths. All functions for the new data service are listed in the data services tree in the data services window and the properties point to the correct php file.

       

      This is a new behavior I have not experienced before. I cannot get the wizard to add the proper service package to the src.service packages. Before today all worked fine. What am I missing. I have no code to send. It ain't there.

       

      Thanks in advance,

       

      David

        • 1. Re: Data services wizard not adding new package to the src.services package
          DrDTP Level 1

          Update ----- I am still having the problem but I noticed the icon for the services package has changed colors. It is white. When I attempt to create a data service a new package named services is created under the src package with a php file identical to the bin-debug file. Look at the picture of the explorer window. The properties of all folders look the same. What does a white package icon mean? Google search - no answer.

          Explorer.png

          • 2. Re: Data services wizard not adding new package to the src.services package
            DrDTP Level 1

            Resolved! The problem was in the php code the wizard had generated as an example and that I had edited in Dreamweaver. I had tried to start a session and set session objects in the php code. I developed if() { statements} to check the session variable before executing the function in some of my data services. Apparently the wizard does not like this. I removed all references to session. I reconfigured the input types and the return types for each service. With the code now clean the wizard created the example code and placed the proper package in the scr.services package. I still have custom php code and it executes.

             

            Things I learned:

            • If the php code stops when a session variable is not available in the if statement and the data service is refreshed, the wizard will not "look" beyond the if statement.
            • Functions downstream of a session variable misshap will show in the data services window but the functions will have a circle icon to the left of the function name and each variable to be passed to the php code will be declared as type = Object in Flashbuilder. The input types and return types will have to be reconfigured for each non-functioning function. Simply commenting out a portion of the php code and attempting a refresh will not make it work again.
            • When the wizard is unable to refresh properly because of a stop in the php code it stops working completely so additional refreshes or creation of code is not carried out.
            • I decided to create a My SQL table for user and other identifiers rather than attempting the session object again.

             

            Sorry, I did not make screen shots as I solved this problem. I hope the solution is not hard to visualize.

             

            Thanks for looking and considering how to help me. I hope my solution works for you.