請幫助如何從SAP門戶服務獲取數據。 SAP團隊給出此URL :: - http://Gateway_host:Gateway_port/sap/opu/odata/sap/ API SRV/ApplicationPendingListSet?$ filter = UserID eq'XXXXX'和用戶標識&密碼。如何在asp.net中獲取這些數據。如何使用SAP GateWay服務從SAP到ASP.net的數據
請幫忙。
請幫助如何從SAP門戶服務獲取數據。 SAP團隊給出此URL :: - http://Gateway_host:Gateway_port/sap/opu/odata/sap/ API SRV/ApplicationPendingListSet?$ filter = UserID eq'XXXXX'和用戶標識&密碼。如何在asp.net中獲取這些數據。如何使用SAP GateWay服務從SAP到ASP.net的數據
請幫忙。
string SAP_ODATA_URL = @「http://ApplicationURL」; string SAP_ODATA_QUERY =「MethodName?$ filter = Parameter eq'」+ extensionAttribute13 +「'」; string requestUrl = SAP_ODATA_URL + SAP_ODATA_QUERY; WebRequest請求= WebRequest.Create(requestUrl); request.Method = WebRequestMethods.Http.Get; request.ContentType =「application/json; charset = utf-8」; request.Credentials = new NetworkCredential(「XXX」,「XXX」); WebResponse response = request.GetResponse(); (((HttpWebResponse)響應).StatusCode == HttpStatusCode.OK) { Stream receiveStream = response.GetResponseStream(); StreamReader reader = new StreamReader(receiveStream); string responseFromServer = reader.ReadToEnd(); XmlTextReader xmlReader = new XmlTextReader(new StringReader(responseFromServer)); xmlReader.Read(); DataSet ds = new DataSet(); ds.ReadXml(xmlReader,XmlReadMode.Auto); }