Consuming Web Service in C# application (SAP)

SAP HANASAPSAP Basis

This error occurs when remote server doesn’t provide a response to your request and connection is broken before request is complete. To fix this issue, first setup a request that includes QaaWsHeader and ReportBlock configuration, then create the Request and in last using ServicesSoapClient, you can make method to send results.

Check out the below code and it may help −

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;
raja
Published on 06-Dec-2017 19:37:40
Advertisements