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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  2D String array to DocumentRecord

    Posted 03/12/03 06:15 PM

    Hi All,
    I have a java service that returns a 2-D (18-Cols & n-rows)
    String array of data. How do I get it as a Document/Record?

    NOTE: I am using IS 6.0. The pub.table:stringTableToTable
    and pub.table:tableToRecordList services are deprecated.

    TIA
    RK


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


  • 2.  RE: 2D String array to DocumentRecord

    Posted 03/12/03 06:15 PM

    You’ll need to get all of your arrays of Strings inside an
    array of Documents.

    Here’s sample code that can do this (indents excluded ;D):

    //fake input as I don’t know how you get it
    String input = new String[3][2];
    input[0][0] = “as”;
    input[0][1] = “df”;
    input[1][0] = “gh”;
    input[1][1] = “jk”;
    input[2][0] = “lz”;
    input[2][1] = “xc”;

    //iterate through the array of arrays and put on pipeline
    IDataCursor pipelineCursor = pipeline.getCursor();
    IData stringArrays = new IData[input.length];
    IDataCursor stringArraysCursor;
    for(int i = 0; i < input.length; i++)
    {
    stringArrays[i] = IDataFactory.create();
    stringArraysCursor = stringArrays[i].getCursor();
    IDataUtil.put(stringArraysCursor, “strings”, input[i]);
    stringArraysCursor.destroy();
    }
    IDataUtil.put(pipelineCursor, “stringArrays”, stringArrays);
    pipelineCursor.destroy();


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


  • 3.  RE: 2D String array to DocumentRecord

    Posted 03/12/03 06:16 PM

    Thanx Brigt…
    I could get it in a record now…


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