当前位置: 首页 > 工具软件 > XML-RPC.NET > 使用案例 >

XML-RPC.NET

寿嘉悦
2023-12-01

XML-RPC.NET,最近在用的一个DLL,用起来不错,几个代码就可以对远程的XML-RPC数据进行交换了。对XML-RPC不太懂的可以看看本网站的Xml-rpc类别。
我用这个是用来与远程的PHP网站来进行数据交换。相比WebServices这个大块头来说,xml-rpc就是小菜一碟了。不过这小菜下下酒还是不错的。
Overview
XML-RPC.NET is a library for implementing XML-RPC Services and clients in the .NET environment, supporting versions 1.0, 1.1, and 2.0 of the .NET runtime. The library has been in development since March 2001 and is used in many open-source and business applications. Its features include:

interface based definition of XML-RPC servers and clients
code generation of type-safe client proxies
support for .NET Remoting on both client and server
ASP.NET Web Services which support both XML-RPC and SOAP
client support for asynchronous calls
client support for various XML encodings and XML indentation styles (some other XML-RPC server implementations incorrectly only accept certain indentation styles)
built-in support for XML-RPC Introspection API on server
dynamic generation of documentation page at URL of XML-RPC end-point
support for mapping XML-RPC method and struct member names to .NET-compatible names
support for Unicode XML-RPC strings in both client and server
support for optional struct members when mapping between .NET and XML-RPC types
The XML-RPC.NET library is CLS-compliant and so can be called from any CLS-compliant language, the main examples being C# and VB.NET.

个人觉得美中不足的地方是只是使用WebRequest来提供一个Http Proxy功能,想在上边实现一个Socket代理。

其实这个功能好像微软也是没有提供的,微软的WebRequest也是只有一个WebProxy提供,没有提供一个Socket5Proxy。刚开始的时候想法就是分别对待,对于WebProxy,就给用户一个WebRequest;而对于Socket5Proxy,就给用户一个自己重新定义的Socket,连接到Proxy服务器,然后向它发送请求(这里是Web请求)。
后来又看了看XML-RPC.NET的代码,发现实现这个比重新实现一个WebRequest来得更复杂,而且是特别龌龊。所以就此,先向简单的出发,实现Socket5Proxy,再向WebProxy实现。

花了两天,了解了一下之后,大致的代码已经成功了。也在codeproject上找到了一个MyWebRequest的类似WebRequest的实现代码。

另外一点:XML-RPC.NET的X509Certificates如何使用呢?要练习一下才行。

转载于:https://www.cnblogs.com/HeroBeast/archive/2010/04/25/1720721.html

 类似资料: