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
Expand all | Collapse all

webMethods Ezine Complex Record Mapping using Java

  • 1.  webMethods Ezine Complex Record Mapping using Java

    Posted Wed March 12, 2003 08:42 PM

    Questions or comments about this webMethods Ezine article?

    Click here to read the original text.


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


  • 2.  RE: webMethods Ezine Complex Record Mapping using Java

    Posted Wed March 12, 2003 08:49 PM

    Good article. I prefer to use the IDataUtil class for
    parsing the IData object since you can retrieve the desired
    value in one line rather than two. I have also gotten into
    trouble using ‘first’ when trying to reset an existing
    pipeline variable.

    So we can replace the following two lines:

    idcItem.first(“Price”);
    String price = (String)idcItem.getValue();

    with:

    String price = IDataUtil.getString(idcItem,“Price”);

    There are other API calls for getting IData records, arrays,
    etc.

    Will


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


  • 3.  RE: webMethods Ezine Complex Record Mapping using Java

    Posted Wed March 12, 2003 08:49 PM

    Good suggestion.

    The cursor position after a first returned false was not
    defined in the initial release of IData (I believe this was
    IS 3.5). So code like:

    idcItem.first(“Price”);
    String price = (String)idcItem.getValue();

    could return unexpected results if first returns false and
    the cursor was positioned off the end of the data set or if
    it was left were it was before the first call.

    String price = null;
    if (idcItem.first(“Price”))
    price = (String)idcItem.getValue();

    force the behavior that most people expect. IDataUtil.get
    provides this behavior in one line.


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


  • 4.  RE: webMethods Ezine Complex Record Mapping using Java

    Posted Wed March 12, 2003 08:50 PM