我有一个简单的操作合同,例如:
[OperationContract]
XmlDocument GetDepartmentTree2(string node, string id);
在客户端我想使用 XmlDocument,但 WCF 返回一个对象数组。
这就是它的工作原理(除了丑陋之外):
[OperationContract, XmlSerializerFormat]
XmlDocument GetDepartmentTree2(string node, string id);