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
  • 1.  Ansynchronous FTP in webmethods

    Posted Thu January 27, 2005 07:28 PM

    IS it possible to do an ansynchronous ftp in webMethods?

    The issue is that we use web methods ftp API to put file to an external
    server. The thread stalls until the ftp process completes. This hangs the clients session until the ftp completes. We want to prevent this by making the ftp asynchronous. If this possible please let me know how to.


    #Integration-Server-and-ESB
    #webMethods
    #webmethods-Protocol-and-Transport


  • 2.  RE: Ansynchronous FTP in webmethods

    Posted Fri January 28, 2005 12:51 AM

    Hi Ketan - If your requirements allow for it, you can use the publish/subscribe mechanism to make the FTP asynchronous.


    #webMethods
    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport


  • 3.  RE: Ansynchronous FTP in webmethods

    Posted Fri January 28, 2005 04:25 AM

    Hi Ketan.
    Yes it is very much possible.

    1. Create a FTP service using the webMethods FTP services available at pub.client.ftp:*

    2. You can read the ftp parameters from custom config file or hardcode or put in extended profile or in delivery methods.

    3. In FTP custom service read these information and do the FTP.

    4. In processing rule use the 2nd option “Perfom the following option”

    5. Select your FTP service.

    6. Select the Asynchronous option.

    If you are using the delivery methods of TN to do FTP there is a option of queue the delivery by selecting the option “Deliver Document by”. and Schedule delivery. See more details on that.

    Hope it will help…

    Bibek


    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport
    #webMethods


  • 4.  RE: Ansynchronous FTP in webmethods

    Posted Fri January 28, 2005 10:03 PM

    As Rajesh suggested, it would be fairly straight forward to turn this into a pub/sub solution. I’m assuming the client you are referring to is external to webMethods. The publish interface(flow service) within webMethods would accept the incoming request and do any formatting into a common structure and then publish the document to the webMethods broker. At that point your client is done. Although you might want to return a friendly “I got the request message” back to the client. You then need to build a subscribing service that will handle the ftp duties. This service will subscribe to the document you publish, handle any data formatting needed for the target system and ftp it.

    So the external client is not blocking and waiting for a response to the ftp tasks. Plus you can add other subscribers later if needed as well as additional publishers. None of which are tied to each other resulting in a less brittle architecture.

    markg
    http://darth.homelinux.net


    #webMethods
    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport


  • 5.  RE: Ansynchronous FTP in webmethods

    Posted Fri January 28, 2005 10:19 PM

    I agree with Mark.

    Especially the less brittle architecture part!


    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB
    #webMethods


  • 6.  RE: Ansynchronous FTP in webmethods

    Posted Mon January 31, 2005 03:04 AM

    Interesting. I just read this thread ([url=“wmusers.com”]wmusers.com) – which had a debate on using TN v/s Enterprise… and then came across this thread.

    I think both approaches mentioned above - pub/sub & TN delivery - would work. It just depends on the architecture that Ketan has… whether he has TN, or Enterprise, or doesn’t have either, but just uses IS. In the latter case, I think a Java service would be needed.


    #webmethods-Protocol-and-Transport
    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: Ansynchronous FTP in webmethods

    Posted Thu October 13, 2011 04:03 PM

    Hello,
    I’ve developed a java service that invoke a flow service with Service.doThreadInvoke, that executes it in another thread.
    This flow service have an input that contains a file sent by ftp and executes a flat file parsing.

    I have a problem with the object that contains the file, it is obtained from the pipeline with the variable contentStream, and arrives empty to the thread, and return an exception Unable to find input delimeters too short.

    I’ve tried some things: sending directly the IData pipeline of the variable that receives the invocation of the java service (it doesn’t work), or creating a new IData input, where I store the content of the pipeline…

    This is the code

    public static final void updateRefSEDA(IData pipeline)
    throws ServiceException {

    IDataCursor pipelineCursor = pipeline.getCursor();
    Object file = IDataUtil.get(pipelineCursor, “contentStream”);

    // input
    IData input = IDataFactory.create();
    IDataCursor inputCursor = input.getCursor();
    IDataUtil.put( inputCursor, “contentStream”, file );
    inputCursor.destroy();
    pipelineCursor.destroy();

    try{
    ServiceThread st = null;
    st = Service.doThreadInvoke ( “com.lda.qyr.seda”,“updateIdRefSEDA”, input, 2000);
    }catch( ISRuntimeException e){

    }
    }

    Another option is sending the pipeline directly

    st = Service.doThreadInvoke ( “com.lda.qyr.seda”,“updateIdRefSEDA”, pipeline, 2000);

    Do you know why the content goes empty to the thread?

    Thanks


    #webMethods
    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB