怎么解决这个报错( 试图创建 System.Web.Services.Protocols.SoapHttpClientProtocol 的实例时发生异常。异常为“代理类上需要 WebServi

gavinsong 2006-08-09 06:55:48
xx.asmx.cs的代码如下:

//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.2032
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------

//
// 此源代码由 wsdl, Version=1.1.4322.2032 自动生成。
//
namespace SystemManageOperator
{
using System.Diagnostics;
using System.Xml.Serialization;
using System;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Web.Services;


/// <remarks/>
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="SystemManageOperatorSoapBinding", Namespace="http://webservice.interfaces.bmcc.com")]
public class SystemManageOperatorService : System.Web.Services.Protocols.SoapHttpClientProtocol
{

/// <remarks/>
public SystemManageOperatorService()
{
this.Url = "http://localhost:9080/webserviceServer/services/SystemManageOperator";
}

/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace="http://webservice.interfaces.bmcc.com", ResponseNamespace="http://webservice.interfaces.bmcc.com", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
[return: System.Xml.Serialization.XmlElementAttribute("healthCheckReturn", IsNullable=true)]
[WebMethod]
public BizResp healthCheck([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] ReqHeader reqHeader)
{
object[] results = this.Invoke("healthCheck", new object[] {
reqHeader});
return ((BizResp)(results[0]));
}

/// <remarks/>
public System.IAsyncResult BeginhealthCheck(ReqHeader reqHeader, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("healthCheck", new object[] {
reqHeader}, callback, asyncState);
}

/// <remarks/>
public BizResp EndhealthCheck(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((BizResp)(results[0]));
}
}

/// <remarks/>
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://req.webservice.interfaces.bmcc.com")]
public class ReqHeader
{

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
public string appid;

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
public string reqno;

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
public string reqtime;

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
public string ver;
}

/// <remarks/>
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://resp.webservice.interfaces.bmcc.com")]
public class RespHeader
{

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
public string appid;

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
public string respcode;

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
public string respmsg;

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
public string respno;

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
public string resptime;

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
public string srcreqno;
}

/// <remarks/>
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://resp.webservice.interfaces.bmcc.com")]
public class BizResp
{

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
public RespHeader respheader;
}
}
--------------------------------------------------------
在最后一句[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
上说没这个方法,不能知道是什么麻烦?高手帮忙调试一下,多谢!!!!!
...全文
610 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
btlyeo 2006-08-16
  • 打赏
  • 举报
回复
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace="http://webservice.interfaces.bmcc.com", ResponseNamespace="http://webservice.interfaces.bmcc.com", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
这句错了,应该是改成创建asmx时候自动生成的那几句
kingtoo008 2006-08-12
  • 打赏
  • 举报
回复
路过...
------------------------------------------------------------------------------------
100M.Net空间+50M企业邮局=60元/年
100M.Net空间+国际顶级域名=100元/年
国际顶级域名.com.net.cn=50元/年
本站申请域名可绑定免费10M Asp.Net空间
1000M.Net空间 + 100M MsSql数据库 + 1000M企业邮局 + 顶级域名=600元/年
数据库 企业邮局 网站推广 整机租用 美国空间 网站建设 均有售
还有很多优惠套餐提供给各个用户层.
有意者可联系电话:021-64802212 传真:021-64802212
咨询信箱:info@kingtoo.com 咨询OICQ:68311305,379620139 81778640

gavinsong 2006-08-10
  • 打赏
  • 举报
回复
help!
gavinsong 2006-08-10
  • 打赏
  • 举报
回复
?

12,162

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 Web Services
社区管理员
  • Web Services社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧