WebService方法调用出错 [英] Error with WebService method call

查看:228
本文介绍了WebService方法调用出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我引用其中一个在MFP设备上运行的网站,并调用其中一个功能。我收到以下错误:
System.InvalidOperationException未被用户代码处理
消息="客户端找到响应内容类型'text / plain; charset = utf-8',但预期'text / xml'。\\\\ n请求失败,并显示错误消息:\ r \ n - \\\\ nIndex超出了数组的范围。 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ SoapHttpClientProtocol.ReadResponse(SoapClientMessage消息,WebResponse响应,Stream responseStream,布尔asyncCall)

I reference one of the webservicces running on a MFP device and call one of it functionality. I get the following error:
System.InvalidOperationException was unhandled by user code
  Message="Client found response content type of 'text/plain; charset=utf-8', but expected 'text/xml'.\r\nThe request failed with the error message:\r\n--\r\nIndex was outside the bounds of the array.\r\n\r\n--."
  Source="System.Web.Services"
  StackTrace:
       at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)

推荐答案

您确定它是一个SOAP Web服务吗?
Are you sure it is a SOAP web service? 
soap web服务不应该返回text / plain的HTTP头。
A soap web service should not return HTTP header of text/plain.


这篇关于WebService方法调用出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆