Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有返回字符串的 wcf 函数。
然后响应 xml 显示为:
<string>ok</string>
但我想得到这个回应
<myOwnStrName>ok</myOwnStrName>
我将如何在 WCF 中实现这一点?
您可以通过定义自己的自定义类型来做到这一点,如下所示
https://stackoverflow.com/a/1974599/1196411