/// <summary> /// 上传到SME /// </summary> /// <param name="data_path"></param> /// <returns></returns> public async Task <string> UploadToSME(string data_path) { using (StreamReader reader = new StreamReader(data_path)) { try { string xmlStr = await reader.ReadToEndAsync(); WebConnector webconnector = new WebConnector(); StringBuilder sb = new StringBuilder(); string session_id = webconnector.GetSessionId(); webconnector.SendXml(session_id, xmlStr, sb); return(sb.ToString()); } catch (Exception ex) { return(ex.Message); } } }