Clarity

  • 1.  Gel Script to download the File

    Posted Aug 06, 2014 06:07 PM

    Hello All,

     

    We are trying to download the file from a Remote Server using the below Gel Script. We have uploaded the file into the remote server but script fails with file does not exist error.

     

    But we have verified that the file is present on the remote server.

     

    GEL Script ::

     

    <gel:script

    xmlns:ftp="jelly:com.niku.union.gel.FTPTagLibrary"

    xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"

    xmlns:file="jelly:com.niku.union.gel.FileTagLibrary"

    xmlns:core="jelly:core"

    xmlns:sql="jelly:sql">

    <ftp:open hostName="hostname" user="userid" password="password">

    <gel:out>"Logged In"</gel:out>

    <core:catch var="exception">

    <ftp:get fileName="filename.txt" remoteDir="/outbox" localDir="/home/local/"/>

    <gel:out>"Accessed the file"</gel:out>

    <file:readFile delimiter="~" embedded="false" inputVar="${fileRecd}" var="v_csvInMem"/>

    </core:catch>

         <core:if test="${exception != null}">

        <gel:out>Caught Exception was:

        ${exception}</gel:out>

      </core:if>

    </ftp:open>

    </gel:script>

     

     

    The same above script is working fine on the E1 environment but the script is failing in E0. We have validated the access of the ids of E0 and E1 to be same.

     

    Kindly share your thoughts ..



  • 2.  Re: Gel Script to download the File

    Posted Aug 08, 2014 01:54 AM

    I would move the <core:catch var="exception"> before the <ftp:open hostName="hostname" user="userid" password="password"> to see if my E0 environment is having issues finding the hostname.

     

    I would also check if the E1 environment matches the E0 environment with regards to GEL tag restriction.

     

    V/r,

    Gene