应该从 Web 服务而不是数据表返回什么?数据表、而不是、Web

由网友(俗雅无味)分享简介:我创建了一个 Web 服务,我需要在其中从一个函数返回多个记录.为此,我使用了数据表,但发现它无法序列化.所以我们不能使用它.所以我使用数据集而不是数据表.我的服务将在 PHP 中使用.我不确定他们(PHP 开发人员)是否能够从我的数据集(从我的网络服务函数返回)中获取数据.I have created a web...

我创建了一个 Web 服务,我需要在其中从一个函数返回多个记录.为此,我使用了数据表,但发现它无法序列化.所以我们不能使用它.所以我使用数据集而不是数据表.我的服务将在 PHP 中使用.我不确定他们(PHP 开发人员)是否能够从我的数据集(从我的网络服务函数返回)中获取数据.

I have created a web service in which i need to return multiple records from a function. For that I used datatable, but found that as it cannot be serialized. So we can't use it. So I used dataset instead of datatable. My service is going to be used in PHP. I am not sure that they (PHP developers) will be able to get data from my dataset (returned from my webservice's function) or not.

请建议我应该返回什么.数据集还是有其他更好的选择?

Please suggest me what I should return. Dataset or is there any other better option available?

谢谢.

推荐答案

我会创建一个可序列化的类,它可以表示数据集中的每条记录,然后返回它的集合.

I would create a serializable class that can represent each record in the data set and then return a collection of that.

阅读全文

相关推荐

最新文章