webMethods

webMethods

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.  Adapter Service and Cursors

    Posted Fri September 23, 2005 05:53 AM

    Hi,

    I searched the forum and couldn’t find the exact match to my question. I found [url=“wmusers.com”]wmusers.com little close yet not what I am looking for.

    I have a stored procedure which has IN/OUT parameter as a multi column Cursor. I am able to figure out how to read the result set in the Stored Procedure Adapter Service. However, the input looks like a document. How do I pass the multi row, multi column input parameter to the Adapter Service to pass the Stored Procedure.

    Help would be appreciated.


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


  • 2.  RE: Adapter Service and Cursors

    Posted Fri September 23, 2005 05:50 PM

    Hello,
    Do you want to pass something like a StringTable to the SP? If you already have the data (in whatever cast and format), you may want to cast it to an object and try passing that in. You may want to make a java service that takes in your first type and gives an object (not array or list form). Good day.

    Yemi Bedu


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


  • 3.  RE: Adapter Service and Cursors

    Posted Thu September 29, 2005 12:43 AM

    Thanks Yemi.
    Could anybody tell me if an Oracle Stored Procedure outputs a “Table of Record” can I read it directly into record set of a SP Adapter Service or I need to pass it as REF CURSOR to the adapter service?


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


  • 4.  RE: Adapter Service and Cursors

    Posted Fri September 30, 2005 03:42 AM

    I have CAST the table of records into a cursor.
    However, now when I try to invoke the SP I get an error “Ref cursor is invalid”.

    My Stored Procedure gives out a cursor (its type is declared in the package).

    In my Adapter service I have defined the recordset and also defined OracleCursor as output.

    Anybody has any ideas why I am getting this error?

    Thanks


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


  • 5.  RE: Adapter Service and Cursors

    Posted Mon October 24, 2005 08:54 AM

    Adrienne,

    To handle a resultset from a cursor
    1)you have to first write the SQL in REF CURSOR
    2) Use database driver specific OracleTypes.CURSOR for Classes12.jar.

    Below link is quite explanatory.
    [url=“http://andrej.racchvs.com/archives/2003/10/29/using-oracle-ref-cursors-in-java/”]http://andrej.racchvs.com/archives/2003/10/29/using-oracle-ref-cursors-in-java/[/url]


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


  • 6.  RE: Adapter Service and Cursors

    Posted Mon October 24, 2005 08:55 AM

    Adrienne,

    To handle a resultset from a cursor
    1)you have to first write the SQL in REF CURSOR
    2) Use database driver specific OracleTypes.CURSOR for Classes12.jar.

    Below link is quite explanatory.
    [url=“http://andrej.racchvs.com/archives/2003/10/29/using-oracle-ref-cursors-in-java/”]http://andrej.racchvs.com/archives/2003/10/29/using-oracle-ref-cursors-in-java/[/url]


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