1 Reply Latest reply: Mar 4, 2013 2:23 AM by Frank Nimphius-Oracle RSS

    call web service each row view object display result table

    966801
      i have a requirement where i need to call a web service for each record of a read only SQL based view object. i need to pass some input to this webservice from row. i need to capture the output of web service and i need to populate it in a new column in table in which i am populating data from all rows of sql based read only view object. how should i implement this requirement at high level.
      jdev 11 1 1 6
        • 1. Re: call web service each row view object display result table
          Frank Nimphius-Oracle
          Hi,

          i have a requirement where i need to call a web service for each record of a read only SQL based view object.

          Note that per row WS access is expensive in that it may wrestle performance down. What you can do is

          1. Create a WS proxy client to access the remote WS
          2. Override ViewObjectImpl::executeForCollection
          3. Before caling super.executeForCollection, iterate the collection for the rows

          Rows[] rws = ((QueryCollection) qc).getRowSetImpl().getAllRowsInRange();

          for(...,...,...){

          //call proxy class for row

          }

          Another option is to create a RowImpl class and override the getter method of one of the queried attributes (ideally the one you need to pass to the WS as an argument. This way the WS is called when the rows are populated

          Frank