xmlrpc makes an XML-RPC remote procedure call (RPC) and displays the response. xmlrpc runs an XML-RPC client.

This program is mainly useful for debugging and learning about XML-RPC servers. XML-RPC is such that the RPCs normally need to be made by a program rather than a person to be of use.

Examples


     $ xmlrpc http://localhost:8080/RPC2 sample.add i/3 i/5
       Result:
         Integer: 8


     $ xmlrpc localhost:8080 sample.add i/3 i/5
       Result:
         Integer: 8
     


     $ xmlrpc http://xmlrpc.server.net/~bryanh echostring \
         "s/This is a string"
     Result:
       String: This is a string



     $ xmlrpc http://xmlrpc.server.net/~bryanh echostring \
         "This is a string in shortcut syntax"
     Result:
       String: This is a string in shortcut syntax



     $ xmlrpc http://xmlrpc.server.net sample.add i/3 i/5 \
         transport=curl -curlinterface=eth1 -username=bryanh -password=passw0rd
       Result:
         Integer: 8
     

Overview

xmlrpc url methodName parameter ... [-transport=transportname] [-username=username -password=password] [-curlinterface={interface|host}]

parameter:

i/integer | s/string | b/{true|false|t|f} | n/ | string

Minimum unique abbreviation of option is acceptable. You may use double hyphens instead of single hyphen to denote options. You may use white space in place of the equals sign to separate an option name from its value.

Arguments

url
This is the URL of the XML-RPC server. As XML-RPC uses HTTP, this must be an HTTP url. However, if you don't specify a type ("http:") in the URL, xmlrpc assumes an "http://" prefix and a "/RPC2" suffix. RPC2 is the conventional file name for an XML-RPC responder.
methodName
The name of the XML-RPC method you want to invoke.
parameter ...
The list of parameters for the RPC. xmlrpc turns each of these arguments into an XML-RPC parameter, in the order given. You may specify no parameters if you like.

You specify the data type of the parameter with a prefix ending in a slash. Example: i/5. Here, the "i" signifies an integer data type. "5" is the value.

xmlrpc is capable of only a subset of the possible XML-RPC types, as follows by prefix:

i/
integer (<int4>)
s/
string (<string>)
b/
boolean (<boolean>)
n/
nil (<nil>)

As a shortcut, if you don't specify a prefix (i.e. your argument does not contain a slash), xmlrpc assumes string data type.

Options

-transport=transportname
This selects the XML transport facility (e.g. libwww) that xmlrpc uses to perform the RPC.

The name transportname is one that the Xmlrpc-c programming library recognizes. This is typically libwww, curl, and wininet.

By default, xmlrpc lets the Xmlrpc-c library choose.

-username=username
-password=password
These options, which must be used together, cause the client to authenticate itself to the server, if the server requires it, using HTTP Basic Authentication and the specified username and password.
-curlinterface={interface|host}
This option gives the "interface" option for a Curl XML transport.

The exact meaning of this option is up to the Curl library, and the best documentation for it is the manual for the 'curl' program that comes with the Curl library.

But essentially, it chooses the local network interface through which to send the RPC. It causes the Curl library to perform a "bind" operation on the socket it uses for the communication. It can be the name of a network interface (e.g. on Linux, "eth1") or an IP address of the interface or a host name that resolves to the IP address of the interface. Unfortunately, you can't explicitly state which form you're specifying, so there's some ambiguity.

Examples:

If the transport is not Curl, this option is worse than useless. It causes xmlrpc to pass arbitrary bits to the transport as its parameters, which the transport may interpret in an unpredictable way.

You must specify a transport with -transport if you specify this option. Ordinarily, that option must be -transport=curl.