IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

pub.client.ftp:login

  • 1.  pub.client.ftp:login

    Posted Mon December 18, 2006 08:38 PM

    Hi,

    I would like to know why does pub.client.ftp:login is crashing (an error popup appears) instead of returning the details of the error into the output service.

    I try to use a do-catch sequence but it does not work. When the error occurs, the service crash and that’s it.

    If there is a work around of something I can use. It will be appreciate. I need to be able to identify which file(s) did not works.

    P.S. I’m using version 6.1 of WM.

    littlebird


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: pub.client.ftp:login

    Posted Mon December 18, 2006 09:00 PM

    The built-in FTP client does not throw a service or runtime exception. Instead it will output errors/messages to a message variable in the pipeline which you must interpret to determine whether you want to throw a runtime or service exception. Works like the WmDB adapter.

    However I would be surprised to see a FTP login crashing the IS server. :eek: Maybe if you are past the login and getting a file that is filling up memory or something?


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 3.  RE: pub.client.ftp:login

    Posted Mon December 18, 2006 09:02 PM

    I should read the message more closer next time. :o You said the login service is crashing not the IS. Still the returnmsg field should have the error embedded in it. Have you tried stepping through the service?


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: pub.client.ftp:login

    Posted Mon December 18, 2006 09:10 PM

    In 6.5 the ftp client will throw exceptions that can be caught. But you probably don’t want to upgrade from 6.1 just for that. :slight_smile:


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 5.  RE: pub.client.ftp:login

    Posted Mon December 18, 2006 09:31 PM

    Here is the popup message that I’m having.

    An error occured while tracing.
    com.wm.net.ftpCException:[ISC.0064.9005] 530 Login incorrect.

    N.B. I know that the login is incorrect. I’m using a wrong password to be able to test my service.

    I’m not able to upgrade the version of WM for now.

    Any other suggestion?


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 6.  RE: pub.client.ftp:login

    Posted Mon December 18, 2006 09:40 PM

    Actually I guess they fixed the ftp client in 6.1. That error is trappable by your catch statement. It should jump down into your catch when you hit that.

    Do you have your try/catch seq. setup like this:

    seq(success)[INDENT]seq(failure)

    [INDENT]ftp:login
    [/INDENT]seq(done)

    [INDENT]getLastError
    [/INDENT]

    [/INDENT][INDENT]

    [/INDENT]


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 7.  RE: pub.client.ftp:login

    Posted Mon December 18, 2006 09:45 PM

    Mark beat me to the same question. I just tried one of my FTP services that is set up this way and was able to catch the exception fine.

    Tim


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 8.  RE: pub.client.ftp:login

    Posted Mon December 18, 2006 10:46 PM

    I just found my mistake. For the first “do”, it was setup to “exit on failure”. I change it by “exit on done” and it works.

    do <---------------------- use exit on DONE instead of FAILURE
    try (exit on failure)
    login
    exit (signal SUCCESS)
    catch (exit on done)
    getlasterror
    exit (signal SUCCESS)

    Sorry for the inconvenient.
    littlebird


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 9.  RE: pub.client.ftp:login

    Posted Tue December 19, 2006 03:29 PM

    My two cents:

    The services in the 6.1 pub.ftp.client folder can be a little misleading. If an error occurs, one would think that the error code and error message would be returned via the output variables (ie. returncode and returnmsg.) However, many times, the services themselves will check to see if the return code is greater than 300, and if so, they throw an exception.

    This works out nicely (IMO) because you don’t need to litter your code with BRANCH statements after every FTP service call. Nevertheless, it would be nice if webMethods could document this behavior a little better so we don’t have to guess when to check the return code and when not to.

    • Percio

    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 10.  RE: pub.client.ftp:login

    Posted Tue December 19, 2006 03:32 PM

    Oh… and littlebird, I just noticed something:

    Your first SEQUENCE should be EXIT ON SUCCESS not DONE. If you use EXIT ON DONE for the parent SEQUENCE, then both your try and catch SEQUENCEs will always be executed.

    • Percio

    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 11.  RE: pub.client.ftp:login

    Posted Tue December 19, 2006 03:38 PM

    Here is the way I’ve done to know if the login part is working or not.

    I have made a service for the login part. At the beginning of the service, I set a field to 500 (it means error for me). After that, I’m trying to do the login command. If it fails, I still have the 500. If it works, I’m looking if the return code is 200. If it is the case I change the 500 by a 200. This way, it is easy to know if it works or not.

    When I will upgrade my WM version, the ftp login service will continue to work.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB