It is well-known that Java is well ahead of its competitors, as far as networking applications are concerned due to its extremely powerful library. So, there is nothing to get surprised if we choose Java as the programming language to develop XML-RPC-based networking applications.

In this section, we shall demonstrate how to build XML-RPC client and server using Java. It describes how to build a variety of different XML-RPC clients, servers and handlers. Some of these use built-in functionality to set up XML-RPC servers and handlers, whereas others prefer handling them directly.

For this purpose, we shall use Apache XML-RPC which is a popular Java implementation of XML-RPC. The current version 3 is fully compliant with the XML-RPC specification. It includes core functionalities such as:

  • Interfaces and classes to create XML-RPC client and server quickly
  • Light-weight web server to build up XML-RPC on systems that have no web server installed in them
  • A light-weight servlet engine for efficiently servicing clients even under extremely high load

Moreover, we may also enable several vendor extensions which enhances the power of XML- RPC greatly.

  • All primitive Java types are supported, including long, byte, short, and double.
  • Calendar objects are supported. In particular, timezone may be set and time in milliseconds may be sent/received.
  • It supports transmitting of DOM nodes, or JAXB objects as well as objects implementing the io.Serializable interface.
  • Instead of default mode, which is based on large internal byte arrays, both server and client can operate in a streaming mode, which preserves resources much better

Source: Uttam Kumar Roy (2015), Advanced Java programming, Oxford University Press.

Leave a Reply

Your email address will not be published. Required fields are marked *