...
XmlRpc
...
Component
...
Available
...
as
...
of
...
Camel
...
2.11
...
This
...
component
...
provides
...
a
...
dataformat
...
for
...
xml,
...
which
...
allows
...
serialization
...
and
...
deserialization
...
of
...
request
...
messages
...
and
...
response
...
message
...
using
...
Apache
...
XmlRpc's
...
binary dataformat.
...
You
...
can
...
also
...
invoke
...
the
...
XMLRPC
...
Service
...
through
...
the
...
camel-xmlrpc
...
producer.
...
Maven
...
users
...
will
...
need
...
to
...
add
...
the
...
following
...
dependency
...
to
...
their
...
pom.xml
...
for
...
this
...
component:
...
...
XmlRpc Overview
It's
...
a
...
...
and
...
a
...
set
...
of
...
implementations
...
that
...
allow
...
software
...
running
...
on
...
disparate
...
operating
...
systems,
...
running
...
in
...
different
...
environments
...
to
...
make
...
procedure
...
calls
...
over
...
the
...
Internet.
...
It's
...
remote
...
procedure
...
calling
...
using
...
HTTP
...
as
...
the
...
transport
...
and
...
XML
...
as
...
the
...
encoding.
...
XML-RPC
...
is
...
designed
...
to
...
be
...
as
...
simple
...
as
...
possible,
...
while
...
allowing
...
complex
...
data
...
structures
...
to
...
be
...
transmitted,
...
processed
...
and
...
returned.
...
An
...
example
...
of
...
a
...
typical
...
XML-RPC
...
request
...
would
...
be:
...
...
An example of a typical XML-RPC
...
response
...
would
...
be:
...
...
A typical XML-RPC
...
fault
...
would
...
be:
...
...
URI format
...
Options
...
Property | Default | Description |
---|---|---|
| | Sets the encoding for basic authentication, null means UTF-8 is chosen. |
| | The user name for basic authentication. |
| | The password for basic authentication. |
| | The reference id of the XmlRpcClient configurer which implement the interface of XmlRpcClientConfigurer to setup the XmlRpcClient as user wants. The value should be start with "#" such as "#myConfigurer" |
| | Set the connection timeout in milliseconds, 0 is to disable it |
| | whether a "Content-Length" header may be omitted. The XML-RPC specification demands, that such a header be present. |
| | whether the response should contain a "faultCause" element in case of errors. The "faultCause" is an exception, which the server has trapped and written into a byte stream as a serializable object. |
| | whether extensions are enabled. By default, the client or server is strictly compliant to the XML-RPC specification and extensions are disabled. |
| | Sets the requests encoding, null means UTF-8 is chosen. |
| | Whether gzip compression is being used for transmitting the request. |
| | Whether gzip compression is being used for transmitting the request. |
| | Set the reply timeout in milliseconds, 0 is to disable it. |
| | The http user agent header to set when doing xmlrpc requests |
| | Since Camel 2.14.0: The method name which would be used for the xmlrpc requests by default, if the Message header CamelXmlRpcMethodName is not set. |
Message Headers
Camel XmlRpc uses these headers.
...
Header | Description |
---|---|
| The XmlRpc method name which will be use for invoking the XmlRpc server. |
Using the XmlRpc data format
As the XmlRpc message could be request or response, when you use the XmlRpcDataFormat, you need to specify the dataformat is for request or not.
...
Invoke
...
XmlRpc
...
Service
...
from
...
Client
...
To
...
invoke
...
the
...
XmlRpc
...
service,
...
you
...
need
...
to
...
specify
...
the
...
methodName
...
on
...
the
...
message
...
header
...
and
...
put
...
the
...
parameters
...
into
...
the
...
message
...
body
...
like
...
below
...
code,
...
then
...
you
...
can
...
get
...
the
...
result
...
message
...
as
...
you
...
want.
...
If
...
the
...
fault
...
message
...
is
...
return,
...
you
...
should
...
get
...
an
...
exception
...
which
...
cause
...
if
...
XmlRpcException.
...
...
How to configure the XmlRpcClient with Java code
camel-xmlrpc
...
provides
...
a
...
pluggable
...
strategy
...
for
...
configuring
...
the
...
XmlRpcClient
...
used
...
by
...
the
...
component,
...
user
...
just
...
to
...
implement
...
the
...
XmlRpcClientConfigurer
...
interface
...
and
...
can
...
configure
...
the
...
XmlRpcClient
...
as
...
he
...
wants.
...
The
...
clientConfigure
...
instance
...
reference
...
can
...
be
...
set
...
through
...
the
...
uri
...
option
...
clientConfigure.
...
...