Skip to Content
0
Former Member
Jul 01, 2009 at 09:45 PM

How do you loop nested nodes from a web service call?

96 Views

Hi Experts,

I'm stuck in trying to access data from a web service call made with an Adaptive Web Service model.

Here is what the model context looks like, I'll put the cardinality next to each one.


Root
   Request_SearchQuery (0..n)
      Response (0..1)
         SearchQueryReturn (0..1)
            Record (0..n)
               Record1 (1..1)
                  Field (0..n)
                     Field1 (0..1)
                        stringValue (valuedata; contains data pertaining to field name)
                  stringName (metadata; contains field name)
      SearchQuery (0..1)

SearchQuery (0..1) takes the initial values to execute the query.

Record (0..n) contains how many rows in the table

Field (0..n) contains how many fields in a row

stringName is the name of the field (ie table column name)

stringValue is the data value for the particular field.

I am having severe trouble looping the fields and records as I do not know what methods to use out of the web dynpro API.

I need to loop through all fields in one record (table row) and then move to the next record and loop all the fields etc. The weird thing is the webservice returns the field name under node Field, and the field value under node Field1.

Please help.

M