I’m developing a WebService with a function which returns a database result, which means an MxN array. My question is, what’s the better way to define this in wsdl:
- Define a row as sequence of (string) columns, define the resultset as sequence of rows, put this resultset into a message
- Define a row as sequence of (string) columns, put a sequence of such rows into the message directly
So is it better/cleaner/nicer to wrap the rows into an own datatype and put this one into the response message or leave the own datatype and put the row-sequence directly into the message?
Thank you!
For the row you define an element which has as children elements coresponding to the columns of the result.
You then return a wrapped list of row elements.
(I’m using
row/rowshere for simplicity. You can name the element whatever you want, normally a name that reflects the what the data in the row represents).