怎么使用httpclient post接收xml文件
2个回答
2015-08-01 · 知道合伙人互联网行家
关注
展开全部
现在sql2005可以直接接受xml数据,只要你逻辑层,把表示层数据构造好xml文件,直接提交到相应的xml字段就可以
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Net;
using System.Web;
namespace Deerchao.Utility
{
public class HttpClient
{
#region fields
private bool keepContext;
private string defaultLanguage = "zh-CN";
private Encoding defaultEncoding = Encoding.UTF8;
private string accept = "*/*";
private string userAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)";
private HttpVerb verb = HttpVerb.GET;
private HttpClientContext context;
private readonly List<HttpUploadingFile> files = new List<HttpUploadingFile>();
private readonly Dictionary<string, string> postingData = new Dictionary<string, string>();
private string url;
private WebHeaderCollection responseHeaders;
private int startPoint;
private int endPoint;
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Net;
using System.Web;
namespace Deerchao.Utility
{
public class HttpClient
{
#region fields
private bool keepContext;
private string defaultLanguage = "zh-CN";
private Encoding defaultEncoding = Encoding.UTF8;
private string accept = "*/*";
private string userAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)";
private HttpVerb verb = HttpVerb.GET;
private HttpClientContext context;
private readonly List<HttpUploadingFile> files = new List<HttpUploadingFile>();
private readonly Dictionary<string, string> postingData = new Dictionary<string, string>();
private string url;
private WebHeaderCollection responseHeaders;
private int startPoint;
private int endPoint;
#endregion
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询