From: Dave Benjamin <dave@ramenlabs.com>
To: caml-list <caml-list@inria.fr>
Subject: ANN: XmlRpc-Light 0.4 - Now a server too
Date: Sun, 29 Jul 2007 10:51:17 -0700 [thread overview]
Message-ID: <46ACD395.4080609@ramenlabs.com> (raw)
I have released XmlRpc-Light 0.4, an XML-RPC library for OCaml based on
Xml-Light and Ocamlnet 2. Source, downloads, and documentation are
available here:
http://code.google.com/p/xmlrpc-light/
This version adds support for writing servers. Two methods are currently
provided: CGI (based on Netcgi2) and Netplex. The obligatory hello-world
example looks like this:
let server = new XmlRpcServer.cgi () in
server#register "demo.sayHello"
(fun _ -> `String "Hello!");
server#run ()
To build a Netplex server, just change "cgi" to "netplex". An example of
a Netplex server including the required configuration file is in the
examples/adder directory.
All servers support the "system.getCapabilities" and
"system.listMethods" introspection functions, as well as the
"system.multicall" protocol. These can be disabled if desired by calling
the "unregister" method.
Other changes and improvements:
- The default date-time functions use the format
"20070729T10:42:00-07:00". This seems to be the most common
interpretation of ISO 8601 used in XML-RPC servers. You can override
this behavior by calling the "set_datetime_encode" or
"set_datetime_decode" methods on the client or server.
- Date-time parsing errors are now wrapped in XmlRpc.Error so that
they will be relayed to clients as faults.
- Error handling adheres much closer to the XML-RPC specification and
its list of suggested fault codes and strings.
- The client now sends a "text/xml" Content-Type header in requests.
Thanks to Gerd Stolpmann for the help with Ocamlnet!
Dave
next reply other threads:[~2007-07-29 17:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-29 17:51 Dave Benjamin [this message]
[not found] ` <20070729211615.GA25630@furbychan.cocan.org>
2007-07-29 23:09 ` [Caml-list] " Dave Benjamin
[not found] ` <912A68A9-3C5A-44FC-B563-4033E4EE6235@epfl.ch>
2007-08-19 18:29 ` Dave Benjamin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46ACD395.4080609@ramenlabs.com \
--to=dave@ramenlabs.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox