System.InvalidOperationException : 不应有 Response xmlns=''。
生活随笔
收集整理的這篇文章主要介紹了
System.InvalidOperationException : 不应有 Response xmlns=''。
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
xml如下:
<?xml version="1.0" encoding="UTF-8"?> <Response version="2"><datacash_reference>4700203048783633</datacash_reference><information>Failed to identify the card scheme of the supplied card number</information><merchantreference>1000001</merchantreference><mode>TEST</mode><reason>Invalid card type</reason><status>21</status><time>1382512427</time> </Response>原來的Entity如下:
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")][Serializable()][System.Diagnostics.DebuggerStepThroughAttribute()][System.ComponentModel.DesignerCategoryAttribute("code")][XmlType(AnonymousType = true)][XmlRoot(Namespace = "", IsNullable = false)]解決方案需要增加ElementName = "Response",如下:
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")][Serializable()][System.Diagnostics.DebuggerStepThroughAttribute()][System.ComponentModel.DesignerCategoryAttribute("code")][XmlType(AnonymousType = true)][XmlRoot(Namespace = "", IsNullable = false, ElementName = "Response")]Done!
轉載于:https://www.cnblogs.com/vincentDr/p/3384278.html
總結
以上是生活随笔為你收集整理的System.InvalidOperationException : 不应有 Response xmlns=''。的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: js特效代码-鼠标样式
- 下一篇: Base64Util 用户名和密码Bas