Connecting to XML-RPC services

Using XML-RPC to call commands remotely from Tcl is trivial. A new Tcl command will be created for each method, which makes invoking remote functions almost the same as invoking local commands.

As mentioned earlier, invoking any XML-RPC command requires knowing the available remote methods and their definitions. We also need to know the address of the remote service.

Invoking a command using XML-RPC will look similar to:

Connecting to XML-RPC services

All requests are sent over HTTP or HTTPS to the remote application, building an XML-RPC message and sending it in the request. The response is also XML-RPC content and is then parsed by the XMLRPC

Get Tcl 8.5 Network Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.