usr/src/lib/libxmlrpc-c/xmlrpc.1
author Cyril Plisko <cyril.plisko@grigale.com>
Tue, 06 Apr 2010 16:00:14 +0300
changeset 11 87960ed158f9
parent 0 b34509ac961f
permissions -rw-r--r--
Import sfw build 137 Bugs Fixed ---------- 6926835 Wireshark cannot open files typed into the location bar 6930214 CVE-2010-0624: Heap-based buffer overflow in GNU Tar 6933424 Various sfw manual pages need to be adjusted to use the new OpenSolaris package names. 6937764 upgrade OpenSSL to 0.9.8n (and fix CVE-2010-0740)

'\" t
.\"
.\" CDDL HEADER START
.\"
.\" The contents of this file are subject to the terms of the
.\" Common Development and Distribution License (the "License").
.\" You may not use this file except in compliance with the License.
.\"
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
.\" or http://www.opensolaris.org/os/licensing.
.\" See the License for the specific language governing permissions
.\" and limitations under the License.
.\"
.\" When distributing Covered Code, include this CDDL HEADER in each
.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
.\" If applicable, add the following below this CDDL HEADER, with the
.\" fields enclosed by brackets "[]" replaced with your own identifying
.\" information: Portions Copyright [yyyy] [name of copyright owner]
.\"
.\" CDDL HEADER END
.\"
.\" Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
.\" Use is subject to license terms.
.\"
.\" ident	"@(#)xmlrpc.1	1.2	10/03/16 SMI"
.\"
.TH xmlrpc 1 "Feb 27 2009" "SunOS 5.11" "User Commands" 
.SH NAME
xmlrpc \- make an XML-RPC remote procedure call (RPC) and display the response
.SH SYNOPSIS
.LP
.nf
\fBxmlrpc\fR \fIurl\fR \fImethodName\fR \fIparameter\fR \fI...\fR [\fB-transport=transportname\fR] 
    [\fB-username=username -password=password\fR] 
    [\fB-curlinterface={interface|host}\fR] 
    [\fB-curlnoverifypeer\fR] [\fB-curlnoverifyhost\fR] 
.fi

.SH DESCRIPTION
.sp
.LP

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.

.SH OPERANDS
.sp
.LP

The following operands are supported:

.sp
.ne 2
.mk
.na
\fB\fIurl\fR\fR
.ad
.RS 16n
.rt
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.
.RE

.sp
.ne 2
.mk
.na
\fB\fImethodName\fR\fR
.ad
.RS 16n
.rt
The name of the XML-RPC method you want to invoke.
.RE

.sp
.ne 2
.mk
.na
\fB\fIparameter ...\fR\fR
.ad
.RS 16n
.rt
parameter:

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

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:

.sp
.ne 2
.mk
.na
\fB\fBi/\fR\fR
.ad
.RS 4n
.rt
integer (<int4>)
.RE
    
.sp
.ne 2
.mk
.na
\fB\fBs/\fR\fR
.ad
.RS 4n
.rt
string (<string>)
.RE
     
.sp
.ne 2
.mk
.na
\fB\fBb/\fR\fR
.ad
.RS 4n
.rt
boolean (<boolean>)
.RE

.sp
.ne 2
.mk
.na
\fB\fBd/\fR\fR
.ad
.RS 4n
.rt
double (<double>) (i.e. real number)
.RE

.sp
.ne 2
.mk
.na
\fB\fBn/\fR\fR
.ad
.RS 4n
.rt
nil (<nil>)
.RE

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

.SH OPTIONS
.sp
.LP
The following options are supported:

.PP
-transport=transportname
.RS 4
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. 
.RE

.PP
-username=username
-password=password
.RS 4
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.
.RE

.PP
-curlinterface={interface|host}
.RS 4
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:

    * -interface=eth1
    * -interface=64.171.19.66
    * -interface=giraffe.giraffe-data.com 

This option causes xmlrpc to default to using the Curl XML transport. You may not specify any other transport. 
.RE

.PP
-curlnoverifypeer
.RS 4
This option gives the "no_ssl_verifypeer" option for the Curl XML transport, which is essentially the CURLOPT_SSL_VERIFYPEER option of the Curl library.

See the curl_easy_setopt() man page for details on this, but essentially it means that the client does not authenticate the server's certificate of identity -- it just believes whatever the server says.

You may want to use -curlnoverifyhost as well. Since you're not authenticating the server's identity, there's not much sense in checking it.

This option causes xmlrpc to default to using the Curl XML transport. You may not specify any other transport. 
.RE

.PP
-curlnoverifyhost
.RS 4
This option gives the "no_ssl_verifyhost" option for the Curl XML transport, which is essentially the CURLOPT_SSL_VERIFYHOST option of the Curl library.

See the curl_easy_setopt() man page for details on this, but essentially it means that the client does not verify the server's identity. It just assumes that if the server answers the IP address of the server as indicated by the URL (probably via host name), then it's the intended server.

You may want to use -curlnoverifypeer as well. As long as you don't care who the server says it is, there's no point in authenticating its identity.

This option causes xmlrpc to default to using the Curl XML transport. You may not specify any other transport. 
.RE

.SH EXAMPLES
.LP
\fBExample 1 \fRViewing File Permissions
.sp
.LP
The following example shows how to display detailed information about a file.

.sp
.in +2
.nf
$ xmlrpc http://localhost:8080/RPC2 sample.add i/3 i/5
Result:
    Integer: 8
.fi
.in -2
.sp

.sp
.in +2
.nf
$ xmlrpc http://xmlrpc.server.net/~bryanh echostring \\
    "s/This is a string"
Result:
    String: This is a string
.fi
.in -2
.sp

.sp
.in +2
.nf
$ xmlrpc http://xmlrpc.server.net/~bryanh echostring \\
    "This is a string in shortcut syntax"
Result:
    String: This is a string in shortcut syntax
.fi
.in -2
.sp

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

.SH ATTRIBUTES
See
.BR attributes (5)
for descriptions of the following attributes:
.sp
.TS
box;
cbp-1 | cbp-1
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
=
Availability	library/xmlrpc-c
=
Interface Stability	Uncommitted
.TE 
.PP
.SH "SEE ALSO"
.PP
\fIhttp://xmlrpc-c\&.sourceforge\&.net\fR
.SH NOTES
.TP
Source for libxmlrpc-c is available on:
.sp
http://opensolaris.org