惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 聂微东
F
Fortinet All Blogs
H
Help Net Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
D
DataBreaches.Net
MyScale Blog
MyScale Blog
B
Blog
I
InfoQ
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
GbyAI
GbyAI
Google DeepMind News
Google DeepMind News
IT之家
IT之家
The GitHub Blog
The GitHub Blog
有赞技术团队
有赞技术团队
博客园_首页
L
LangChain Blog
V
V2EX
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
The Blog of Author Tim Ferriss
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - Franky

博客园 - edobnet

phonegap 开发初探 .net C# ADC接口中DES加密算法 SQL 2005自动备份文件删除 短信猫与中国移动CMPP2。0收发短信实例 通过OSQL命令执行SQL SERVER批SQL 针对sql 2005优化的高性能分页存储过程 .net framework 2.0以上修改config配制更容易 - edobnet LinQ操作汇总(From CSharpSamples) 远程注册表读取,与多线程池的应用. 使用JAVASCRIPT控制,IFAME的内容,从而使用投票点击等功能 ADSL自动断拨号类 类拟EXCEL表格锁定的功能的实现! - edobnet - 博客园 线程,线程数控制! sql Server 2000 分区视图的运用 利用.Net 线程池提高应用程序性能. google 中国编程大赛测试题,及自己的解答 触发器在增量同步数据的运用. 进程服务编写,与启动停止控制 js异步XMLhttpPost,并带有,等待显示,防正,XMLhttpPost请求时间过来,而使浏览器死掉! - edobnet - 博客园
阿里软件接口开发基础(淘宝网) C#
edobnet · 2009-02-05 · via 博客园 - edobnet

主要开发文件见:

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();
            xmlDoc.LoadXml(reader.ReadToEnd());
            XmlNode node 
= xmlDoc.SelectSingleNode("/error_rsp/code");
            
if (node != null && node.InnerText != string.Empty)
            {
throw new ApiException(node.InnerText, xmlDoc.SelectSingleNode("/error_rsp/msg").InnerText);
            }
            
return xmlDoc;

        }

public static string HttpRequest(string data, string xPath)
        {
            XmlDocument doc 
= HttpRequest(data);
            
return doc.SelectSingleNode(xPath).InnerText;
        }
        
public static string MD5(string data)
        {
            MD5CryptoServiceProvider md5 
= new MD5CryptoServiceProvider();
            
return BitConverter.ToString(md5.ComputeHash(Encoding.UTF8.GetBytes(data))).Replace("-""");
        }

对参数进行排序类:

对参数时行排序

淘宝相关的一个操作类:

TAOBAO EXAMPLE

代码下载