Web服务中的数据集序列化 [英] Dataset Serialization in web service

查看:165
本文介绍了Web服务中的数据集序列化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的webservice(.net 2.0)返回数据集.在soap消息传输中,使用xml序列化.

我可以对DataSet对象使用二进制序列化,以便它可以作为二进制数据在网络上传输.

注意:我的客户端和Web服务应用程序都在.net框架中.

My webservice(.net 2.0) is returning dataset. In soap message transmission xml serialization is used.

Can I use Binary serialization for DataSet object, so that it can be transmitted across network as a binary data.

Note: My both client and web service application are in .net framework.

推荐答案

您的Web服务适用于SOAP协议,并且SOAP协议要求SOAP消息格式的请求和响应. br/>
SOAP消息本身是XML,而XML是字符串.因此,如果要使用SOAP协议,则需要将所有内容都转换为XML.除此之外,我只知道一种方法,那就是通过附件

请参阅我对此类问题的答案(其中还包含有关如何使用SOAP的链接):
如何将文件嵌入XML而不使用Base64编码? [> http://drdobbs.com/web-development/184405969?queryText=soap压缩
http://www.4guysfromrolla.com/articles/012104-1.aspx [ ^ ]
your webservice works on SOAP protocol and SOAP protocol requieres SOAP message format requests and responses.

The SOAP message itself is an XML and XML is a string. So everything needs to be converted to XML if you want to use SOAP protocol. Other than this there is only 1 way I know and that is via attachments

see my answer for such question (it also contains links on how to attch to SOAP):
How to embed file in XML without using Base64 encoding?[^]

Hope this wil help.

Thanks,
Hemant

Edit 1:
you can also use SOAP message compression technique:

http://drdobbs.com/web-development/184405969?queryText=soap compression
http://www.4guysfromrolla.com/articles/012104-1.aspx[^]


这篇关于Web服务中的数据集序列化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆