| Previous | Home | Next |
Introduction
XML-RPC is a Remote Procedure Calling protocol that works over the Internet. XML-RPC can be used with Java, C, C++, PHP and many other programming languages. XML-RPC protocol was created in 1998 by Dave Winer.
Actually Extensible Markup Language (XML) provides a vocabulary for describing Remote Procedure Calls (RPC) which is transmitted between computers using the Hyper Text Transfer Protocol (HTTP). XML-RPC allows two or more computers running different operating systems and programs and also that are written in different languages to share and process. For example, a Java application could written in a Perl program, which in turn can be written in Python application and so on. XML-RPC works by sending a HTTP request to a server.
Example of an xml request
<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value><string>South Delhi India </string></value>
</param>
</params>
</methodResponse>
Example of an xml response
<?xml version="1.0"?>
<methodCall>
<methodName>examples.getCountryName</methodName>
<params>
<param>
<value><int>30</int></value>
</param>
</params>
</methodCall>
XML-RPC Tag Format
| Tag | Description | Example |
| <int> | Whole Numbers and Integer | 2,-1 |
| <boolean> | False(0) or True(1) | 1 |
| <string> | String of characters | hello world |
| <double> | Double precision floating point | -12.23 |
Advantage Of XML-RPC
XML-RPC has various advantages.Some of the advantages are given below:-
- Can call remote procedures on a machine with different operating system.
- XML-RPC can be used with Java, PHP, C, C++, and many other programming languages.
- XML-RPC not only call remote procedures but allows two or more computers running different operating systems and programs written in different languages to share processing.
- Web services allow the reuse of services and components within an infrastructure.
| Previous | Home | Next |