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.  Mapping a record to recordlist

    Posted Fri January 10, 2003 11:07 AM

    Hi All,
    In Integrator—
    I had incoming and outgoing record as RecordList.
    When I pass more than 1 record it works, but if I am sending 1 record it converts incoming recordlist into a record, so actually in mapping it tries to map a record with recordlist.
    Then it fails to map the values.

    What should I do to overcome this problem.
    Thanks.


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


  • 2.  RE: Mapping a record to recordlist

    Posted Fri January 10, 2003 01:54 PM

    Prasanna,
    Try this thread.
    [url=“wmusers.com”]wmusers.com

    I also encounted this before.
    One solution is to test the size of the list with put.list.sizeOfList. If its 1 then code for a record if not loop thru the recordList.

    HTH


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


  • 3.  RE: Mapping a record to recordlist

    Posted Fri January 10, 2003 02:26 PM

    Even i had similar problem…so i had to write a small java Service as below

    public static final void checkAndConvertToRecordList( IData pipeline ) throws ServiceException
    {
    IDataCursor idcPipeline = pipeline.getCursor();
    IData inputList = IDataUtil.getIDataArray( idcPipeline, “input” );
    if(inputList==null){
    inputList = new IData[1];
    inputList[0] = IDataUtil.getIData( idcPipeline, “input” );
    }
    IDataUtil.put(idcPipeline,“input”,inputList);
    }


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