当远程服务器不响应您的请求并且连接在请求完成之前断开时,将发生此错误。要解决此问题,请首先设置一个包含QaaWsHeader和ReportBlock配置的请求,然后创建请求,最后使用ServicesSoapClient,可以使方法发送结果。
看看下面的代码,它可能会有所帮助-
Sellers.QaaWSHeader qaawsHeaderDatos = new Sellers.QaaWSHeader(); Sellers.GetReportBlock_WBS_Sellers getReportBlock = new Sellers.GetReportBlock_WBS_Sellers(); getReportBlock.login = userWS; getReportBlock.password = passWS; getReportBlock.refresh = true; getReportBlock.startRow = 0; getReportBlock.startRowSpecified = true; getReportBlock.endRow = 1000; getReportBlock.endRowSpecified = true; Sellers.GetReportBlock_WBS_Sellers_Request WSRequest = new Sellers.GetReportBlock_WBS_Sellers_Request(qaawsHeaderDatos, getReportBlock); Sellers.BIServicesSoap BiService = new Sellers.BIServicesSoapClient(); Sellers.GetReportBlock_WBS_Sellers_Response FinalResponse = BiService.GetReportBlock_WBS_Sellers(WSRequest); object[][] yourTable = FinalResponse.table;