1 Reply Latest reply on Jan 31, 2012 7:20 PM by drkstr_1

    Web services not loading with Ant Build

    sankarpeddi

      Hi,

       

      I am working on a flex application, Where i am trying to build the application with custom ANT script. The application is loading properly with Ant script, However web services are not working, I am using WSDL's and .Net is my backend. I will really appreciate your help on this. Below is my application details

       

      Flex SDK: 4.5.1

      O.S: Windows 7

       

      Error:

      ----------------------------------------------

      wsdl loading error: [RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"]

       

      build.xml

      ----------------------------------------------

      <project name="" default="build" basedir="C:/Project/Main/Client/">

       

       

                <property name="FLEX_HOME" value="C:/Program Files (x86)/Adobe/Adobe Flash Builder 4.6/sdks/4.6.0"/>

                <property name="SDK_VERSION" value="4.6.0.23201"/>

       

       

                <taskdef name="mxmlc" classname="flex.ant.MxmlcTask" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>

                <taskdef name="compc" classname="flex.ant.CompcTask" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>

                <taskdef name="html-wrapper" classname="flex.ant.HtmlWrapperTask" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>

                <taskdef name="asdoc" classname="flex.ant.AsDocTask" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>

       

       

                <property name="PROJECT_DIR" value="C:/Project/Main/Client/"/>

                <property name="SOURCE_DIR" value="${PROJECT_DIR}/src"/>

                <property name="OUTPUT_DIR" value="${basedir}/Client"/>

                <property name="LOCALE" value="en_US"/>

                <property name="DEBUG" value="flase"/>

                <property name="OPTIMIZE" value="true"/>

                <property name="LIBS_DIR" value="${PROJECT_DIR}/libs"/>

                <property name="FLEX_LICENSE" value="xxxx-xxxx-xxxx-xxxx-xxxx-xxxx"/>

       

       

                <target name="build">

                          <antcall target="clean"/>

                          <antcall target="compile"/>

                          <antcall target="build-modules"/>

                          <antcall target="build-assets"/>

                          <antcall target="wrapper"/>

       

                </target>

       

       

                <target name="clean">

                          <delete includeemptydirs="true">

                                    <fileset dir="${OUTPUT_DIR}" includes="**/*"/>

                          </delete>

                </target>

       

       

                <target name="compile">

                          <mxmlc

                                    file="${SOURCE_DIR}/CustomerMainApp.mxml"

                                    output="${OUTPUT_DIR}/CustomerMainApp.swf"

                                    locale="${LOCALE}"

                                    debug="${DEBUG}"

                                    optimize="${OPTIMIZE}"

                                    static-rsls="false">

                                    <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>

                                    <source-path path-element="${SOURCE_DIR}"/>

       

       

       

       

       

                                    <runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/framework.swc">

                                              <url rsl-url="http://fpdownload.adobe.com/pub/swz/flex/${SDK_VERSION}/framework_${SDK_VERSION}.swz"

                                                                  policy-file-url="http://fpdownload.adobe.com/pub/swz/crossdomain.xml"/>

                                              <url rsl-url="framework_${SDK_VERSION}.swz" policy-file-url=""/>

                                    </runtime-shared-library-path>

                                    <runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/textLayout.swc">

                                              <url rsl-url="http://fpdownload.adobe.com/pub/swz/tlf/2.0.0.232/textLayout_2.0.0.232.swz" policy-file-url="http://fpdownload.adobe.com/pub/swz/crossdomain.xml"/>

                                              <url rsl-url="textLayout_2.0.0.232.swz" policy-file-url=""/>

                                    </runtime-shared-library-path>

                                    <runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/osmf.swc">

                                              <url rsl-url="http://fpdownload.adobe.com/pub/swz/flex/${SDK_VERSION}/osmf_1.0.0.16316.swz" policy-file-url="http://fpdownload.adobe.com/pub/swz/crossdomain.xml"/>

                                              <url rsl-url="osmf_1.0.0.16316.swz" policy-file-url=""/>

                                    </runtime-shared-library-path>

                                    <runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/mx/mx.swc">

                                              <url rsl-url="http://fpdownload.adobe.com/pub/swz/flex/${SDK_VERSION}/mx_${SDK_VERSION}.swz" policy-file-url="http://fpdownload.adobe.com/pub/swz/crossdomain.xml"/>

                                              <url rsl-url="mx_${SDK_VERSION}.swz" policy-file-url=""/>

                                    </runtime-shared-library-path>

                                    <runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/rpc.swc">

                                              <url rsl-url="http://fpdownload.adobe.com/pub/swz/flex/${SDK_VERSION}/rpc_${SDK_VERSION}.swz" policy-file-url="http://fpdownload.adobe.com/pub/swz/crossdomain.xml"/>

                                              <url rsl-url="rpc_${SDK_VERSION}.swz" policy-file-url=""/>

                                    </runtime-shared-library-path>

                                    <runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/charts.swc">

                                              <url rsl-url="http://fpdownload.adobe.com/pub/swz/flex/${SDK_VERSION}/charts_${SDK_VERSION}.swz" policy-file-url="http://fpdownload.adobe.com/pub/swz/crossdomain.xml"/>

                                              <url rsl-url="charts_${SDK_VERSION}.swz" policy-file-url=""/>

                                    </runtime-shared-library-path>

                                    <library-path file="${FLEX_HOME}/frameworks/libs/flash-integration.swc" append="true"/>

                                    <runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/spark.swc">

                                              <url rsl-url="http://fpdownload.adobe.com/pub/swz/flex/${SDK_VERSION}/spark_${SDK_VERSION}.swz" policy-file-url="http://fpdownload.adobe.com/pub/swz/crossdomain.xml"/>

                                              <url rsl-url="spark_${SDK_VERSION}.swz" policy-file-url=""/>

                                    </runtime-shared-library-path>

                                    <runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/advancedgrids.swc">

                                              <url rsl-url="http://fpdownload.adobe.com/pub/swz/flex/${SDK_VERSION}/advancedgrids_${SDK_VERSION}.swz" policy-file-url="http://fpdownload.adobe.com/pub/swz/crossdomain.xml"/>

                                              <url rsl-url="advancedgrids_${SDK_VERSION}.swz" policy-file-url=""/>

                                    </runtime-shared-library-path>

                                    <library-path file="${FLEX_HOME}/frameworks/libs/authoringsupport.swc" append="true"/>

                                    <runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/sparkskins.swc">

                                              <url rsl-url="http://fpdownload.adobe.com/pub/swz/flex/${SDK_VERSION}/sparkskins_${SDK_VERSION}.swz" policy-file-url="http://fpdownload.adobe.com/pub/swz/crossdomain.xml"/>

                                              <url rsl-url="sparkskins_${SDK_VERSION}.swz" policy-file-url=""/>

                                    </runtime-shared-library-path>

                                    <runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/spark_dmv.swc">

                                              <url rsl-url="http://fpdownload.adobe.com/pub/swz/flex/${SDK_VERSION}/spark_dmv_${SDK_VERSION}.swz" policy-file-url="http://fpdownload.adobe.com/pub/swz/crossdomain.xml"/>

                                              <url rsl-url="spark_dmv_${SDK_VERSION}.swz" policy-file-url=""/>

                                    </runtime-shared-library-path>

                                    <library-path file="${FLEX_HOME}/frameworks/locale/${LOCALE}" append="true"/>

                                    <library-path file="${PROJECT_DIR}/libs" append="true"/>

       

       

                                    <external-library-path file="${FLEX_HOME}/frameworks/libs/player/10.3/playerglobal.swc" append="true"/>

                                    <library-path file="${FLEX_HOME}/frameworks/libs/flash-integration.swc" append="true"/>

                                    <library-path file="${FLEX_HOME}/frameworks/libs/authoringsupport.swc" append="true"/>

                                    <external-library-path file="${FLEX_HOME}/frameworks/libs/player/10.3/playerglobal.swc" append="true"/>

       

       

                                    <library-path dir="${FLEX_HOME}/frameworks/locale/${LOCALE}" includes="*" append="true"/>

                                    <library-path dir="${PROJECT_DIR}/libs" includes="*" append="true"/>

       

       

                                    <define name="CONFIG::DEBUG" value="false"/>

                          </mxmlc>

       

       

                          <copy file="${FLEX_HOME}/frameworks/rsls/spark_${SDK_VERSION}.swz" tofile="${OUTPUT_DIR}/spark_${SDK_VERSION}.swz"/>

                          <copy file="${FLEX_HOME}/frameworks/rsls/osmf_1.0.0.16316.swz" tofile="${OUTPUT_DIR}/osmf_1.0.0.16316.swz"/>

                          <copy file="${FLEX_HOME}/frameworks/rsls/charts_${SDK_VERSION}.swz" tofile="${OUTPUT_DIR}/charts_${SDK_VERSION}.swz"/>

                          <copy file="${FLEX_HOME}/frameworks/rsls/sparkskins_${SDK_VERSION}.swz" tofile="${OUTPUT_DIR}/sparkskins_${SDK_VERSION}.swz"/>

                          <copy file="${FLEX_HOME}/frameworks/rsls/framework_${SDK_VERSION}.swz" tofile="${OUTPUT_DIR}/framework_${SDK_VERSION}.swz"/>

                          <copy file="${FLEX_HOME}/frameworks/rsls/mx_${SDK_VERSION}.swz" tofile="${OUTPUT_DIR}/mx_${SDK_VERSION}.swz"/>

                          <copy file="${FLEX_HOME}/frameworks/rsls/textLayout_2.0.0.232.swz" tofile="${OUTPUT_DIR}/textLayout_2.0.0.232.swz"/>

                          <copy file="${FLEX_HOME}/frameworks/rsls/spark_dmv_${SDK_VERSION}.swz" tofile="${OUTPUT_DIR}/spark_dmv_${SDK_VERSION}.swz"/>

                          <copy file="${FLEX_HOME}/frameworks/rsls/advancedgrids_${SDK_VERSION}.swz" tofile="${OUTPUT_DIR}/advancedgrids_${SDK_VERSION}.swz"/>

                          <copy file="${FLEX_HOME}/frameworks/rsls/rpc_${SDK_VERSION}.swz" tofile="${OUTPUT_DIR}/rpc_${SDK_VERSION}.swz"/>

       

                          </target>

      <!--  build and output single module

        -->

                <target name="build-module">

                          <mxmlc

                                              file="${SOURCE_DIR}/${module.mxml}" output="${OUTPUT_DIR}/${module.out}" keep-generated-actionscript="false"

                                              locale="${LOCALE}"

                                              debug="${DEBUG}"

                                              optimize="${OPTIMIZE}"

                                              static-rsls="false">

                                              <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>

                                              <source-path path-element="${SOURCE_DIR}"/>

       

       

       

       

       

                                              <runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/framework.swc">

                                                        <url rsl-url="http://fpdownload.adobe.com/pub/swz/flex/${SDK_VERSION}/framework_${SDK_VERSION}.swz"

                                                                            policy-file-url="http://fpdownload.adobe.com/pub/swz/crossdomain.xml"/>

                                                        <url rsl-url="framework_${SDK_VERSION}.swz" policy-file-url=""/>

                                              </runtime-shared-library-path>

                                              <runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/textLayout.swc">

                                                        <url rsl-url="http://fpdownload.adobe.com/pub/swz/tlf/2.0.0.232/textLayout_2.0.0.232.swz" policy-file-url="http://fpdownload.adobe.com/pub/swz/crossdomain.xml"/>

                                                        <url rsl-url="textLayout_2.0.0.232.swz" policy-file-url=""/>

                                              </runtime-shared-library-path>

                                              <runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/osmf.swc">

                                                        <url rsl-url="http://fpdownload.adobe.com/pub/swz/flex/${SDK_VERSION}/osmf_1.0.0.16316.swz" policy-file-url="http://fpdownload.adobe.com/pub/swz/crossdomain.xml"/>

                                                        <url rsl-url="osmf_1.0.0.16316.swz" policy-file-url=""/>

                                              </runtime-shared-library-path>

                                              <runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/mx/mx.swc">

                                                        <url rsl-url="http://fpdownload.adobe.com/pub/swz/flex/${SDK_VERSION}/mx_${SDK_VERSION}.swz" policy-file-url="http://fpdownload.adobe.com/pub/swz/crossdomain.xml"/>

                                                        <url rsl-url="mx_${SDK_VERSION}.swz" policy-file-url=""/>

                                              </runtime-shared-library-path>

                                              <runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/rpc.swc">

                                                        <url rsl-url="http://fpdownload.adobe.com/pub/swz/flex/${SDK_VERSION}/rpc_${SDK_VERSION}.swz" policy-file-url="http://fpdownload.adobe.com/pub/swz/crossdomain.xml"/>

                                                        <url rsl-url="rpc_${SDK_VERSION}.swz" policy-file-url=""/>

                                              </runtime-shared-library-path>

                                              <runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/charts.swc">

                                                        <url rsl-url="http://fpdownload.adobe.com/pub/swz/flex/${SDK_VERSION}/charts_${SDK_VERSION}.swz" policy-file-url="http://fpdownload.adobe.com/pub/swz/crossdomain.xml"/>

                                                        <url rsl-url="charts_${SDK_VERSION}.swz" policy-file-url=""/>

                                              </runtime-shared-library-path>

                                              <library-path file="${FLEX_HOME}/frameworks/libs/flash-integration.swc" append="true"/>

                                              <runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/spark.swc">

                                                        <url rsl-url="http://fpdownload.adobe.com/pub/swz/flex/${SDK_VERSION}/spark_${SDK_VERSION}.swz" policy-file-url="http://fpdownload.adobe.com/pub/swz/crossdomain.xml"/>

                                                        <url rsl-url="spark_${SDK_VERSION}.swz" policy-file-url=""/>

                                              </runtime-shared-library-path>

                                              <runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/advancedgrids.swc">

                                                        <url rsl-url="http://fpdownload.adobe.com/pub/swz/flex/${SDK_VERSION}/advancedgrids_${SDK_VERSION}.swz" policy-file-url="http://fpdownload.adobe.com/pub/swz/crossdomain.xml"/>

                                                        <url rsl-url="advancedgrids_${SDK_VERSION}.swz" policy-file-url=""/>

                                              </runtime-shared-library-path>

                                              <library-path file="${FLEX_HOME}/frameworks/libs/authoringsupport.swc" append="true"/>

                                              <runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/sparkskins.swc">

                                                        <url rsl-url="http://fpdownload.adobe.com/pub/swz/flex/${SDK_VERSION}/sparkskins_${SDK_VERSION}.swz" policy-file-url="http://fpdownload.adobe.com/pub/swz/crossdomain.xml"/>

                                                        <url rsl-url="sparkskins_${SDK_VERSION}.swz" policy-file-url=""/>

                                              </runtime-shared-library-path>

                                              <runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/spark_dmv.swc">

                                                        <url rsl-url="http://fpdownload.adobe.com/pub/swz/flex/${SDK_VERSION}/spark_dmv_${SDK_VERSION}.swz" policy-file-url="http://fpdownload.adobe.com/pub/swz/crossdomain.xml"/>

                                                        <url rsl-url="spark_dmv_${SDK_VERSION}.swz" policy-file-url=""/>

                                              </runtime-shared-library-path>

                                              <library-path file="${FLEX_HOME}/frameworks/locale/${LOCALE}" append="true"/>

                                              <library-path file="${PROJECT_DIR}/libs" append="true"/>

       

       

                                              <external-library-path file="${FLEX_HOME}/frameworks/libs/player/10.3/playerglobal.swc" append="true"/>

                                              <library-path file="${FLEX_HOME}/frameworks/libs/flash-integration.swc" append="true"/>

                                              <library-path file="${FLEX_HOME}/frameworks/libs/authoringsupport.swc" append="true"/>

                                              <external-library-path file="${FLEX_HOME}/frameworks/libs/player/10.3/playerglobal.swc" append="true"/>

       

       

                                              <library-path dir="${FLEX_HOME}/frameworks/locale/${LOCALE}" includes="*" append="true"/>

                                              <library-path dir="${PROJECT_DIR}/libs" includes="*" append="true"/>

       

       

                                              <define name="CONFIG::DEBUG" value="false"/>

                                    </mxmlc>

                </target>

      <!--  build all modules

        -->

      <target name="build-modules">

      <antcall target="build-module">

        <param name="module.mxml" value="com/hrblock/TaxProLive/modules/user/userModule.mxml" />

        <param name="module.out" value="com/hrblock/TaxProLive/modules/user/userModule.swf" />

        </antcall>

      <antcall target="build-module">

        <param name="module.mxml" value="com/hrblock/TaxProLive/modules/taxdocuments/TaxDocumentModule.mxml" />

        <param name="module.out" value="com/hrblock/TaxProLive/modules/taxdocuments/TaxDocumentModule.swf" />

        </antcall>

      <antcall target="build-module">

        <param name="module.mxml" value="com/hrblock/TaxProLive/modules/howitworks/howitworks.mxml" />

        <param name="module.out" value="com/hrblock/TaxProLive/modules/howitworks/howitworks.swf" />

        </antcall>

      <antcall target="build-module">

        <param name="module.mxml" value="com/hrblock/TaxProLive/modules/findalltaxpros/FindAllTaxProsModule.mxml" />

        <param name="module.out" value="com/hrblock/TaxProLive/modules/findalltaxpros/FindAllTaxProsModule.swf" />

        </antcall>

      <antcall target="build-module">

        <param name="module.mxml" value="com/hrblock/TaxProLive/modules/support/SupportModule.mxml" />

        <param name="module.out" value="com/hrblock/TaxProLive/modules/support/SupportModule.swf" />

        </antcall>

      <antcall target="build-module">

        <param name="module.mxml" value="com/hrblock/TaxProLive/modules/ScheduleAppointment/ScheduleAppointmentModule.mxml" />

        <param name="module.out" value="com/hrblock/TaxProLive/modules/ScheduleAppointment/ScheduleAppointmentModule.swf" />

        </antcall>

      <antcall target="build-module">

        <param name="module.mxml" value="com/hrblock/TaxProLive/modules/search/SearchModule.mxml" />

        <param name="module.out" value="com/hrblock/TaxProLive/modules/search/SearchModule.swf" />

        </antcall>

      <antcall target="build-module">

        <param name="module.mxml" value="com/hrblock/TaxProLive/modules/login/LoginModule.mxml" />

        <param name="module.out" value="com/hrblock/TaxProLive/modules/login/LoginModule.swf" />

        </antcall>

      <antcall target="build-module">

        <param name="module.mxml" value="com/hrblock/TaxProLive/modules/createaccount/CreateAccountModule.mxml" />

        <param name="module.out" value="com/hrblock/TaxProLive/modules/createaccount/CreateAccountModule.swf" />

        </antcall>

      <antcall target="build-module">

        <param name="module.mxml" value="com/hrblock/TaxProLive/modules/initiallanding/InitialLandingModule.mxml" />

        <param name="module.out" value="com/hrblock/TaxProLive/modules/initiallanding/InitialLandingModule.swf" />

        </antcall>

      <antcall target="build-module">

        <param name="module.mxml" value="com/hrblock/TaxProLive/modules/Payment/PaymentModule.mxml" />

        <param name="module.out" value="com/hrblock/TaxProLive/modules/Payment/PaymentModule.swf" />

        </antcall>

      <antcall target="build-module">

        <param name="module.mxml" value="com/hrblock/TaxProLive/modules/findtaxpro/FindTaxProModule.mxml" />

        <param name="module.out" value="com/hrblock/TaxProLive/modules/findtaxpro/FindTaxProModule.swf" />

        </antcall>

      <antcall target="build-module">

        <param name="module.mxml" value="com/hrblock/TaxProLive/modules/communicationhub/CommunicationHubModule.mxml" />

        <param name="module.out" value="com/hrblock/TaxProLive/modules/communicationhub/CommunicationHubModule.swf" />

        </antcall>

      <antcall target="build-module">

        <param name="module.mxml" value="com/hrblock/TaxProLive/modules/taxproprofile/TaxProProfileModule.mxml" />

        <param name="module.out" value="com/hrblock/TaxProLive/modules/taxproprofile/TaxProProfileModule.swf" />

        </antcall>

      <antcall target="build-module">

        <param name="module.mxml" value="com/hrblock/TaxProLive/modules/taxreturn/TaxReturnModule.mxml" />

        <param name="module.out" value="com/hrblock/TaxProLive/modules/taxreturn/TaxReturnModule.swf" />

        </antcall>

      <antcall target="build-module">

        <param name="module.mxml" value="com/hrblock/TaxProLive/modules/personalinfo/PersonalInfoModule.mxml" />

        <param name="module.out" value="com/hrblock/TaxProLive/modules/personalinfo/PersonalInfoModule.swf" />

        </antcall>

      <antcall target="build-module">

        <param name="module.mxml" value="com/hrblock/TaxProLive/modules/clientcommunicationhub/ClientCommunicationHubModule .mxml" />

        <param name="module.out" value="com/hrblock/TaxProLive/modules/clientcommunicationhub/ClientCommunicationHubModule .swf" />

        </antcall>

        </target>

      <!--  copy assets

        -->

      <target name="build-assets">

        <mkdir dir="${OUTPUT_DIR}/assets" />

        <mkdir dir="${OUTPUT_DIR}/assets/CoverSheets" />

        <mkdir dir="${OUTPUT_DIR}/assets/fonts" />

        <mkdir dir="${OUTPUT_DIR}/assets/images" />

        <mkdir dir="${OUTPUT_DIR}/assets/js" />

        <mkdir dir="${OUTPUT_DIR}/assets/pdf" />

        <mkdir dir="${OUTPUT_DIR}/assets/styles" />

        <mkdir dir="${OUTPUT_DIR}/assets/swf" />

        <mkdir dir="${OUTPUT_DIR}/assets/xml" />

      <copy todir="${OUTPUT_DIR}/assets">

        <fileset dir="${SOURCE_DIR}/assets" />

        </copy>

        </target>

                <target name="wrapper">

                                    <html-wrapper

                                              output="${OUTPUT_DIR}"

                                              file="CustomerMainApp.html"

                                              swf="CustomerMainApp"

                                              history="true"

                                              express-install="true"

                                              version-detection="true"

                                              version-major="10"

                                              version-minor="3"

                                              version-revision="181"

                                              height="100%"

                                              width="100%"

                                              title="Block Live"

                                              bgcolor="white"

                                    />

                          </target>

      <!--  creates html file associated to the application 

        -->

        </project>