0 Replies Latest reply on May 19, 2010 10:52 PM by athiroy

    using ant flex compilation

    athiroy

      hi

      i have use ant to compile flex file.

      my project containts four mxml files

      1.HomePage.mxml

      2.FirstPage.mxml

      3.SecondPage.mxml

      4.ThirdPage.mxml

       

            The Home Page displays the link of 1,2nd,3rd page.

           These threepages uses the destination camp.

      the remote-config.xml have the destination

       

      <destination id="camp">
          <properties>
              <source>example.UserServiceDAO</source>
                  </properties>
          </destination>

      the three pages i have use remoteobject

       

      <s:RemoteObject id="c1" destination="camp"  fault="Alert.show(event.fault.faultString), 'Error'" >
              <s:method name="getUsers" fault="faultHandler(event)" result="getContactsResultHandler(event)"/>
              <s:method name="insertData1" fault="faultHandler(event)" result="getInsertResultHandler(event)"/>
              <s:method name="pincodeData" fault="faultHandler(event)" result="getPincodeResultHandler(event)"/>
          </s:RemoteObject>

       

       

      The ant compilation is

       

      <target name="appcompile" depends="install">
        <mxmlc file="${flexsrc.home}/HomePage.mxml" context-root="/Reg" keep-generated-actionscript="true" services="${web.home}/WEB-INF/flex/services-config.xml" output="${catalina.home}/webapps/${app.name}/HomePage.swf">
         <compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
          <include name="${web.home}/WEB-INF/lib/" />
          <include name="${flexsrc.home}/example/" />
         </compiler.library-path>
         <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
         <source-path path-element="${FLEX_HOME}/frameworks" />
        </mxmlc>

       

      </target>

       

      <target name="createHtmlWrapper" depends="appcompile">
        <html-wrapper application="${APP_ROOT}/HomePage.mxml" height="1000" width="1000"  output="${catalina.home}/webapps/${app.name}" swf="HomePage" />

      </target>

       

      after execute the build.xml file

      build is successfully

       

      [MessagingError message='Destination 'camp' either does not exist or the destination has no channels defined (and the application does not define any default channels.)']