急问:读取本地wsdl文件动态实现SOAP请求,反射客户端类时失败,谢谢!
时间:2011-12-16
来源:互联网
使用framework2.0 调试时报:反射"string1"出错。把动态编译出来的客户端代码打出来一看,发现是成员变量MessageID是这个类型:
public @string MEName;
public string1 MessageID;
从代码上看,@string和string1的两个定义效果是一样的,唯一差别在于XmlTypeAttribute的定义,string1比@string多了一个属性TypeName:
@string的定义如下:
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdlWatcher", "1.0.0.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2001/XMLSchema")]
[System.Xml.Serialization.XmlRootAttribute("MEName", Namespace="http://www.chinamobile.com/IMS/MMTelAS/", IsNullable=false)]
public partial class @string : System.Web.Services.Protocols.SoapHeader
{
/// <remarks/>
[System.Xml.Serialization.XmlTextAttribute()]
public string[] Text;
}
string1的定义如下:
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdlWatcher", "1.0.0.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(TypeName="string", Namespace="http://www.w3.org/2001/XMLSchema")]
[System.Xml.Serialization.XmlRootAttribute("MessageID", Namespace="http://www.chinamobile.com/IMS/MMTelAS/", IsNullable=false)]
public partial class string1 : System.Web.Services.Protocols.SoapHeader
{
/// <remarks/>
[System.Xml.Serialization.XmlTextAttribute()]
public string[] Text;
}
搜到一个跟我有一样问题的帖子,可惜没有解决方案T_T
http://social.msdn.microsoft.com/Forums/zh-CN/vsprereleaseannouncements/thread/c2d15766-fb5c-49ff-a8bd-3b5d13fff207
public @string MEName;
public string1 MessageID;
从代码上看,@string和string1的两个定义效果是一样的,唯一差别在于XmlTypeAttribute的定义,string1比@string多了一个属性TypeName:
@string的定义如下:
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdlWatcher", "1.0.0.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.w3.org/2001/XMLSchema")]
[System.Xml.Serialization.XmlRootAttribute("MEName", Namespace="http://www.chinamobile.com/IMS/MMTelAS/", IsNullable=false)]
public partial class @string : System.Web.Services.Protocols.SoapHeader
{
/// <remarks/>
[System.Xml.Serialization.XmlTextAttribute()]
public string[] Text;
}
string1的定义如下:
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdlWatcher", "1.0.0.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(TypeName="string", Namespace="http://www.w3.org/2001/XMLSchema")]
[System.Xml.Serialization.XmlRootAttribute("MessageID", Namespace="http://www.chinamobile.com/IMS/MMTelAS/", IsNullable=false)]
public partial class string1 : System.Web.Services.Protocols.SoapHeader
{
/// <remarks/>
[System.Xml.Serialization.XmlTextAttribute()]
public string[] Text;
}
搜到一个跟我有一样问题的帖子,可惜没有解决方案T_T
http://social.msdn.microsoft.com/Forums/zh-CN/vsprereleaseannouncements/thread/c2d15766-fb5c-49ff-a8bd-3b5d13fff207
作者: indypj 发布时间: 2011-12-16
自己顶一下。
作者: indypj 发布时间: 2011-12-16
该回复于2011-12-16 15:10:05被管理员删除
- 对我有用[0]
- 丢个板砖[0]
- 引用
- 举报
- 管理
- TOP
|
#3楼 得分:0回复于:2011-12-16 15:18:10
|
作者: indypj 发布时间: 2011-12-16
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28