WCF返回XmlReader类型,总提示超时

WYPGOOD 2016-10-31 03:03:15
[OperationContract]
[WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Xml, UriTemplate = "/DeviceTree2/{uname}/{ds}", BodyStyle = WebMessageBodyStyle.Bare)]
[WebGet(UriTemplate = "DeviceTree2/{uname}/{ds}", RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Xml)]
XmlReader CreateDeviceTree2(string uname, out DataSet ds);

返回其它类型都能正常。
...全文
899 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
WYPGOOD 2016-10-31
  • 打赏
  • 举报
回复
不行,错误如下: 尝试对参数 http://tempuri.org/ 进行反序列化时出错:
  • 打赏
  • 举报
回复
改成返回Stream试试

12,166

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 Web Services
社区管理员
  • Web Services社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧