Another possibility to create source code is to "ask" the XML-RPC server about the available methods and generate minimal source code fragments. The fragments also contain all available information like method signature and description.
To gather this information you invoke application
Most of the XML-RPC servers support some standard methods which return information
about the available methods:
introspect --host=localhost:32000 --cpp-impl=dump.cpp --cpp-decl=dump.h
There are several options to control this application:
The most important option is the desired XML-RPC host.
Optionally you can add a resource name and a port number in standard notation.
The resource defaults
RPC2 an the standard port number is 80. Therefor
--host=localhost is the same as
This enables the gneration of the source code fragment for the declaration in a C++ class header. You can either #include this file or copy-and-paste it.
The second code fragment concerns the implementation of the member variables and is intended to be placed in a constructor list.
In case you are located behind a HTTP proxy or firewall you will need to pass the according proxy to connect to the remote server.
The generated header fragment will contain one or more blocks similar to the following:
// signature: struct system.getCapabilities(void) // purpose: Returns Structs describing available capabilities. ulxr::MethodCall system_getCapabilities;
A simplified signature of the method.
A short description.
A variable declation of this method call.
The generated implementation lists the member contructors and basically only contains the according method names:
, system_getCapabilities (ULXR_PCHAR("system.getCapabilities")) , system_listMethods (ULXR_PCHAR("system.listMethods")) , system_methodHelp (ULXR_PCHAR("system.methodHelp")) , system_methodSignature (ULXR_PCHAR("system.methodSignature"))