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.
我正在通过 ServiceDescription 和 ServiceDescriptionImporter 创建(成功)动态 Web 服务。
但
如果我从 Web 服务主机得到一些错误的 xml 文档,我该如何拦截反序列化(错误:InvalidCast... 无法转换为数组)?即使阅读错误的 xml 文档对我来说也是一个谜。
是否可以替换生成的 SoapHttpClientProtocol ?还是 XmlSerializer ?
如果是这样,如何?
我不想让整个请求失败。
有人可以帮我吗 ?
最后我能够通过 IL-Emitter替换 GetWebResponse 。
虽然很难...我得到的最接近的提示是here
如果有人感兴趣,我可以展示更多代码。只需放下一条线。
感谢路过。