用WSE接收附件的webservice在调用时出现这种错误,请问是怎么回事?

hcsunjun 2004-10-21 03:30:39
“/GovEx”应用程序中的服务器错误。
--------------------------------------------------------------------------------

System.Web.Services.Protocols.SoapException: 服务器发现请求内容类型为“application/dime”,但应该是“text/xml”。 at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters() at System.Web.Services.Protocols.WebServiceHandler.Invoke() at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: 服务器发现请求内容类型为“application/dime”,但应该是“text/xml”。 at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters() at System.Web.Services.Protocols.WebServiceHandler.Invoke() at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()

源错误:


行 35: [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://jh0101.com/services/HelloWorld", RequestNamespace="http://jh0101.com/services/", ResponseNamespace="http://jh0101.com/services/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
行 36: public string HelloWorld() {
行 37: object[] results = this.Invoke("HelloWorld", new object[0]);
行 38: return ((string)(results[0]));
行 39: }


源文件: e:\ioa\govex\web references\webservice\reference.cs 行: 37

堆栈跟踪:


[SoapException: System.Web.Services.Protocols.SoapException: 服务器发现请求内容类型为“application/dime”,但应该是“text/xml”。
at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
at System.Web.Services.Protocols.WebServiceHandler.Invoke()
at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
GovEx.WebService.Gov.HelloWorld() in e:\ioa\govex\web references\webservice\reference.cs:37
GovEx.GovExChange.SendDocument.Send(String GovID, String UserID, String Pwd, String Url) in e:\ioa\govex\govexchange\senddocument.aspx.cs:162
GovEx.GovExChange.SendDocument.OK_Click(Object sender, EventArgs e) in e:\ioa\govex\govexchange\senddocument.aspx.cs:248
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()




--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:1.1.4322.573; ASP.NET 版本:1.1.4322.573
...全文
800 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
guoyan19811021 2004-11-05
  • 打赏
  • 举报
回复
public class 你的代理类: Microsoft.Web.Services.WebServicesClientProtocol {
Rossetti 2004-10-29
  • 打赏
  • 举报
回复
http://dev.csdn.net/article/40/40589.shtm
hcsunjun 2004-10-27
  • 打赏
  • 举报
回复
不是类型的错误,现在已经搞定了,是其他方面的错误,.net提供的错误总是莫名其妙的,经常与实际出错的地方无关。
tongcheng 2004-10-25
  • 打赏
  • 举报
回复
看看。。。
风轻扬 2004-10-24
  • 打赏
  • 举报
回复
还是上传文件的类型不对吧。
happyjun2000 2004-10-24
  • 打赏
  • 举报
回复
xiaohutushen 2004-10-21
  • 打赏
  • 举报
回复
是类型错误吧。
服务器发现请求内容类型为“application/dime”,但应该是“text/xml”
你在看一下你上传文件的类型设置是否正确
hcsunjun 2004-10-21
  • 打赏
  • 举报
回复
应该在services中怎么写才不会出现此错误

12,162

社区成员

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

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