Tagged: Web Services
This topic contains 3 replies, has 0 voices, and was last updated by Anonymous 9 years, 2 months ago.
- May 13, 2010 at 5:02 pm #491
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.May 14, 2010 at 8:51 am #5253
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:May 14, 2010 at 5:40 pm #5255
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.May 17, 2010 at 8:19 am #5256
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
You must be logged in to reply to this topic.