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

DocumentList passed to Java service

  • 1.  DocumentList passed to Java service

    Posted Thu April 13, 2006 10:27 PM

    Hi,

    We have a DocumentList that is supposed to be passed to Java service and later in the java service we need to access the elements of that documentlist.

    We are getting the error as:

    not able to find a variable part[0].supplierid

    Our code is some thing like below:

    IDataCursor pipelineCursor = pipeline.getCursor();

    IData part = (IData)IDataUtil.getIDataArray( pipelineCursor, “part”);

    pipelineCursor.destroy();

    IData record = part[0];
    IDataCursor recordCursor = record.getCursor();
    String out = “”;

    if (part.length > 0 )
    out = part[0].supplierID;

    IDataCursor pipelineCursor_1 = pipeline.getCursor();

    IDataUtil.put( pipelineCursor_1, “returnValue”, out );

    pipelineCursor_1.destroy();


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


  • 2.  RE: DocumentList passed to Java service

    Posted Thu April 13, 2006 11:21 PM

    Christina,

    I’m confused… you were on the right path by defining record=part[0]; and then by creating a cursor on record, however, why would you then do part[0].supplierID? To get the supplierID, just use out=IDataUtil.getString(recordCursor, “suuplierID”);.

    HTH, Rohit


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