I recently read a post on the Internet: topic: the client uses Delphi to write data, and the server uses Java to write data. Is this mode feasible?
UsersGreateWeiThe idea reminds me that xml_rpc is used for interaction between different languages. I used a Java => xml => HTTP => xml => Delphi system in a software company. I didn't use other technologies. I only used idhttp components to get XML. The only difference is that the construction process is troublesome, especially when constructing XML. Now we use XML-RPC for a component.
The implementation of the system architecture is based on the following considerations:
1. XML-RPC compared with soap: Delphi soap client has some performance problems and Java implementation of some compatibility problems, so the use of XML-RPC implementation, and XML-RPC implementation compared with SOAP implementation, performance is much better;
2. Comparison of XML-RPC with socket: using HTTP protocol can effectively penetrate different network firewalls;
3, the use of XML format to exchange data, rather than the use of XML-RPC standard format to exchange data, mainly because the XML-RPC format is relatively simple, complex data format is difficult to meet the needs, directly Using the object XML data stream is conducive to system expansion;
Today I tested Apache XML-RPC: http://ws.apache.org/xmlrpc/, with Delphi XML-RPC: http://sourceforge.net/projects/delphixml-rpc/, using Apache on the server while Delphi is used as the client. A problem found: when using the Delphi XML-RPC library, Chinese is not supported.
Through Google information, and view the source code of Delphi XML-RPC library, it is found that the XML parsing unit libxmlparser. PAS does not support Asian character set. Therefore, the idea of modifying the XML parsing unit libxmlparser. PAS was generated.
Finally, the problem is found in the following sentence:
CurContent: = CurContent + CHR (StrToIntDef ('$' + Copy (Name, 3, MaxInt), 32 ))
And CurContent: = CurContent + CHR (StrToIntDef (Copy (Name, 2, MaxInt), 32 ));
If there are multi-byte characters, there is a problem with CHR. Is to use WideChar to solve the problem.