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.

 View Only
  • 1.  recursion on java services

    Posted Mon December 17, 2012 03:29 PM

    Hello, i would like to know if anyone knows, how to call a java service from itself
    (like a recursion of a method), i try in several way but it didn’t work. This is the service, it is simple.

    IDataCursor pipelineCursor = pipeline.getCursor();

    Integer cant = (Integer)IDataUtil.get( pipelineCursor, “entrada” );

    IDataUtil.put(pipelineCursor, “salida”, cant);

    pipelineCursor.destroy();

    the idea is to call this java service, from the same java service. Thank you.


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


  • 2.  RE: recursion on java services

    Posted Mon December 17, 2012 04:53 PM

    Put it as a static method under shared code and call it like a regular Java method.

    Some reading material from internet:
    [URL]http://danzig.jct.ac.il/java_class/recursion.html[/URL]

    Cheers,
    Akshith


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


  • 3.  RE: recursion on java services

    Posted Mon December 17, 2012 05:00 PM

    ok, i going to try like you say, and i’ll tell if it work. thank you.


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


  • 4.  RE: recursion on java services

    Posted Tue December 18, 2012 01:03 PM

    Hello, it i didn’t work, i put like you said but didn’t work i show you the service under shared code, perhaps it something wrong.

    public static int service(int x){
    IDataCursor pipelineCursor = pipeline.getCursor();
    int a=0;
    a++;
    if(a<3){

    Integer cant = (Integer)IDataUtil.get( pipelineCursor, “cant” );

    IDataUtil.put(pipelineCursor, “exit”, cant);

    pipelineCursor.destroy();
    }

    return x;
    }


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