Sending tabular data to a web service method

Home Forum Integrating PerfectForms Sending tabular data to a web service method

Tagged: 

This topic contains 3 replies, has 0 voices, and was last updated by  Anonymous 8 years, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #491

    Anonymous

    Is it possible to link multiple table rows to a web service method parameter? I have a table that contains a list of items that I want to send to a list/collection object that is a paramter on a web service. When I tested the call to the web service, the service only retrieve the first row instnace data. it di not receive any data from the remining rows in the table.

    #5253

    ijobling
    Participant

    Have a look at what you can do with the Set Table Rows function whereby you can programa to interogate each row in a table to then fully compile your required parameter into perhaps another field on the form (that may be hidden to the users) and reference that field in your webservice action

    see here for details on this function:

    http://www.perfectforms.com/Documentation/manual/html/fl_set_table_rows.htm

    #5255

    Anonymous

    Based on your reply, I am assuming there is no way currently to support a web service parameter that contains multiple items. Is this correct? For example say that the .Net web service has a parameter as List<PoItem> and the PoItem object has ItemId, Description, Qty, and Price properties. I want to link each row in the table to create a PoItem instance and send the entire table to the web service. I am assuming that I would need to modify the parameter to something like an xml string that contains the list, build up the string, send it, and parse it that way on the other side. Or is there another way that I am not seeing to link multiple items to an array or list type web service argument. Thanks.

    #5256

    ijobling
    Participant

    Webservices can support multiple parameters, but the issue will be how you can’t automatically get all the data out of the distinct table rows. Set up a simple test where you can enter text to rows in a table, and then see how you can’t then pass the data out from all rows into another field.

    This is where you then would use the set table row function to programatically extract the data from each row into a field where you can then ‘compose’ this data into the format that is required for your webservice

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.