Changeset 14894 in project


Ignore:
Timestamp:
06/05/09 15:21:12 (10 years ago)
Author:
sjamaan
Message:

Document the client (apparently this got omitted somehow)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/3/xml-rpc

    r13621 r14894  
    2727=== Documentation
    2828
    29 
    30   [procedure] (xml-rpc:register-method NAME PROC [DOCSTRING [PATH]])
    31 
    32 Registers a remotely callable procedure PROC under NAME, which should be a string or a symbol. XML-RPC clients can now call this procedure (provided a HTTP server is started). Unhandled exceptions are returned as "fault" responses. PATH specifies the URL under which the remote procedure is available and defaults to "/RPC2". DOCSTRING specifies an optional documentation string.
    33 See define-remote-method for a simpler method of defining XML-RPC procedures.
    34 
    35   [procedure] (xml-rpc:method-documentation NAME [PATH])
     29==== Client
     30
     31Usage:
     32  (require-extension xml-rpc-client)
     33
     34<procedure>(xml-rpc:server HOST [PORT [PATH]] [user: USER] [password: PASSWORD] [attributes: ATTRIBUTES])</procedure>
     35
     36Returns a procedure that, when called with the name of a remote
     37XML-RPC method, will return a procedure that passes its arguments
     38to the XML-RPC server which is given in {{HOST}} (a string), {{PORT}}
     39(which defaults to 80) and {{PATH}} (which defaults to {{"/RPC2"}}).
     40The {{USER}} and {{PASSWORD}} keyword arguments, if given, are used
     41to perform basic authentication to the server. The {{ATTRIBUTES}}
     42argument specifies an a-list of attributes to add to the HTTP request
     43object sent to the server. If and only if {{HOST}} is a
     44properly-formatted URL using the "http" or "https" schemes, the {{PORT}},
     45{{PATH}}, {{USER}} and {{PASSWORD}} information found in the URL takes
     46precedence over the arguments with the same meaning.
     47
     48==== Server
     49
     50Usage:
     51  (require-extension xml-rpc-server)
     52<procedure>(xml-rpc:register-method NAME PROC [DOCSTRING [PATH]])</procedure>
     53
     54Registers a remotely callable procedure {{PROC}} under {{NAME}}, which should be
     55a string or a symbol. XML-RPC clients can now call this procedure (provided a HTTP
     56server is started).
     57
     58Unhandled exceptions are returned as "fault" responses. {{PATH}} specifies the URL
     59under which the remote procedure is available and defaults to {{"/RPC2"}}.
     60{{DOCSTRING}} specifies an optional documentation string. See {{define-remote-method}}
     61for a simpler method of defining XML-RPC procedures.
     62
     63<procedure>(xml-rpc:method-documentation NAME [PATH])</procedure>
    3664
    3765Returns the documentation-string of the method with the name NAME (a string) at the URL PATH (which defaults to "/RPC2").
    3866
    39   [parameter] (xml-rpc:current-method-path)
     67<parameter>(xml-rpc:current-method-path)</parameter>
    4068
    4169Contains the URL (a string) under which the currently executing method is called. Outside of the dynamic context of an XML-RPC method invocation, the value of this parameter is unspecified.
    4270
    43   [syntax] (define-remote-method (NAME VAR ... [. RVAR]) [DOCSTRING] BODY ...)
     71<macro>(define-remote-method (NAME VAR ... [. RVAR]) [DOCSTRING] BODY ...)</macro>
    4472
    4573A more convenient syntax for defining remotely callable procedures. The optional DOCSTRING can be accessed by xml-rpc:method-documentation.
     74
     75==== Type conversion
    4676
    4777The following table summarizes how XML-RPC values map to Scheme data and vice versa:
     
    120150
    121151Fetch time from xml-rpc.org:
     152
     153  (require-extension xml-rpc-client)
    122154
    123155  (define currentTime
Note: See TracChangeset for help on using the changeset viewer.