




















主要开发文件见:
http://wiki.isv.alisoft.com/index.php?tracelog=doc_from_home
当前JAVA例子比较多,C#比较少,
下面提供本人开发一些例子:
向服务器发送请求类:
public static XmlDocument HttpRequest(string data)
{
//ASCIIEncoding encoding = new ASCIIEncoding();
byte[] postdata = System.Text.Encoding.UTF8.GetBytes(data);//所有要传参数拼装
// Prepare web request
//目前阿里软件的服务集成平台(SIP)的接口测试地址是:http://sipdev.alisoft.com/sip/rest,生产环境地址是:http://sip.alisoft.com/sip/rest,
//这里使用测试接口先,到正式上线时需要做切换
string url = System.Configuration.ConfigurationManager.AppSettings["APPURL"];
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(url);
myRequest.Method = "POST";
myRequest.ContentType = "application/x-www-form-urlencoded";
myRequest.ContentLength = postdata.Length;
Stream newStream = myRequest.GetRequestStream();
// Send the data.
newStream.Write(postdata, 0, postdata.Length);
newStream.Close();
// Get response
HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
StreamReader reader = new StreamReader(myResponse.GetResponseStream(), System.Text.Encoding.UTF8);
XmlDocument xmlDoc
= new XmlDocument();}
public static string HttpRequest(string data, string xPath)对参数进行排序类:
对参数时行排序
淘宝相关的一个操作类:
TAOBAO EXAMPLE
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。