![]() |
![]()
| ![]() |
![]()
NAME
LIBRARYPDEL Library (libpdel, -lpdel) SYNOPSIS
struct http_servlet *
DESCRIPTION
The arg is an opaque user cookie. When the
servlet is destroyed, if destroy is not
struct http_servlet_xmlrpc_method { const char *name; /* method name */ http_servlet_xmlrpc_handler_t *handler; /* method handler */ const struct structs_type **ptypes; /* parameter types */ u_int min_params; /* min # params */ u_int max_params; /* max # params */ }; struct http_servlet_xmlrpc_info { const struct http_servlet_xmlrpc_method *methods; /* methods */ http_logger_t *logger; /* loggging function */ }; The methods field points to the method
descriptor array, which is terminated with an entry having a
The logger is a logging function whose type is defined in http_server(3). Each element in the methods array describes one supported XML-RPC method: name is the method name; min_params and max_params specify the minimum and maximum number of parameters allowed for the method (the servlet itself enforces these limits); and ptypes points to an array of structs(3) types that has length max_params, one for each possible parameter. The handler is a pointer to the user function that implements the XML-RPC method. The function must be of this type: typedef void *http_servlet_xmlrpc_handler_t(void *arg, const char *method, struct http_request *req, u_int nparams, const void **params, const char *mtype, const struct structs_type **rtypep, int *faulted) The arg is
the opqaue cookie supplied to
If successful,
Since it's running as a servlet, the thread
executing
Returning FaultsIf
Working With Raw XML-RPCIn some cases, the types of the XML-RPC parameters are not known
ahead of time, or it may be inconvenient to have to provide a
structs(3)
type for the returned value. In these situations,
If ptypes is
If
Finally, if the method names themselves are not known ahead of time, a name equal to the empty string will match all method names. Such an entry acts as a “catch all” and must be last in the methods list. RETURN VALUESOn failure, SEE ALSOhttp_request(3), http_response(3), http_server(3), http_servlet(3), http_servlet_xml(3), http_xml(3), libpdel(3), structs(3), structs_xmlrpc(3), typed_mem(3) XML-RPC Home Page, http://www.xmlrpc.org/. HISTORYThe PDEL library was developed at Packet Design, LLC.
AUTHORSArchie Cobbs ⟨archie@freebsd.org⟩ BUGS
|