- call-xml-rpc-proc call-sxml proceduresprocedure
This procedure accepts as call-sxml the SXML representation of a procedure call from a client and calls it, returning its values.
This is exactly like xml-rpc-call->xml-rpc-response, except it does not construct an SXML result tree. Instead, the return values are those returned by the procedure being called. In case the procedure could not be found or if the call contains an invalid XML structure, an exception of type (exn xml-rpc) is thrown. The xml-rpc part of the condition contains a code property which contains the fault code. This is 1 in case the procedure could not be found and 2 in case the XML is bad.
(use xml-rpc-server) (call-xml-rpc-proc `(*TOP* (*PI* xml "version=\"1.0\"") (methodCall (methodName "Math.add") (params (param (value (int "1"))) (param (value (int "2"))) (param (value (int "3")))))) `((Math.add . ,+))) => 6