3 Replies Latest reply on Mar 26, 2008 4:31 PM by suds123

    MXML and generated SWF files behaving differently


      My .mxml file works fine but the .swf file throws the following error.
      [MessagingError message='Destination 'category-dataservice' has no channels defined and the application does not define any default channels.']

      I will appreciate your help. Thank you !!

      I have created a flexds project in flex builder 2 and selected the option to compile in server. First issue is that Flex Builder 2.0 doesn't create a .swf file anymore.

      There are 2 ways(hacks) I create the .swf file for the flex project.

      1. Change the toolsCompile to "true" in .flexProperties file.

      <?xml version="1.0" encoding="UTF-8"?>

      <flexProperties flexServerType="2" serverContextRoot="/golf4geeks" serverRoot="C:\beawls100\user_projects\domains\golfstoredomain\autodeploy\golf4geeks" serverRootURL=" http://localhost:7183/golf4geeks" toolCompile="false" version="1"/>

      2. Run the mxmlc compiler in the command line

      C:\Adobe\FlexBuilder2Plugin\Flex SDK 2\bin>mxmlc -compiler.library-path C:\beawls100\user_projects\domains\golfstoredomain\autodeploy\golf4geeks\WEB-INF\flex\lib s C:\beawls100\user_projects\domains\golfstoredomain\autodeploy\golf4geeks\WEB-INF\flex\loc ale\en_US -- C:\beawls100\user_projects\domains\golfstoredomain\autodeploy\golf4geeks\flexclient\flexc lient.mxml

        • 1. Re: MXML and generated SWF files behaving differently
          levancho Level 3
          there most likely reason is that your swf does not know how to connect to channel, that means blazeds configuration is not compiled into your swf file,

          if you use server SDK (which I have never used yet ) I assume it will compile mxml at runtime maybe that is why flexbuilder is not compiling it anymore,
          ( I bet if you switch from server sdk to a regular local sdk it will compile swf file and if you tell it where webserver is, and context etc .. it will also compile blazeds configuration into your swf file.

          alternativly you can specify chanells in oyur mxml/as code as well.
          • 2. Re: MXML and generated SWF files behaving differently
            suds123 Level 1
            HI levancho, I appreciate your quick response. Could you please let me know how to switch from the server SDK to a regular local SDK ? Generating .swf file is not the major issue for me. I am able to generate it using the command line option. However, the .swf file is not able to connect to DataServices while the .mxml file does.

            I have tried with "Compile Application Locally in Flex Builder" option as well. Then Flex Builder shows the following error message.

            Unexpected attribute 'url' found in 'endpoint' from file: services-config.xml

            The following thread suggest that it is a know bug and there is a fix for it.

            I have been trying to get the fix from the following site since last couple days. The website is not responding.

            Anyone else experiencing these issues ??
            • 3. Re: MXML and generated SWF files behaving differently
              suds123 Level 1
              OK - I found the answers to my questions.

              Looks like you have to use the flex web-tier compiler by selecting "Compile in the Server" option when you use the FDS application. The .swf files generated otherwise ( command line client or generated automatically by FlexBuilder) doesn't work because it does not have the links to the FDS components such as messaging, remoting and data services components.

              In my case the webtier compiler was not generating the .swf because I had set the production-mode to "true" in the flex-webtier-config.xml file. After I changed the value to "false", the webtier compiler generated the .swf file and stored into the folder where the .mxml application file exists


              I spent a day and half figuring out this silly configuration. Hope my comments help others. Thank you. Sudhansu