From 8015f0d53da53876b65fdcdc712f1dc92835a9b1 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 11 Jan 2010 08:29:17 +0000 Subject: Minor fixes to server and python evaluator to get python store working. Some changes to python and scheme store test cases to simplify them a bit and make them consistent. Enabled a few more server test combinations. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@897785 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/modules/json/json.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sca-cpp/trunk/modules/json') diff --git a/sca-cpp/trunk/modules/json/json.hpp b/sca-cpp/trunk/modules/json/json.hpp index e2f036541a..fc5e512d5e 100644 --- a/sca-cpp/trunk/modules/json/json.hpp +++ b/sca-cpp/trunk/modules/json/json.hpp @@ -381,6 +381,18 @@ const failable > jsonResult(const value& id, const value& val, JSON return writeJSON(valuesToElements(mklist(mklist("id", id), mklist("result", val))), cx); } +/** + * Return a portable function name from a JSON-RPC function name. + * Strip the "system." and "Service." prefixes added by some JSON-RPC clients. + */ +const string funcName(const string& f) { + if (length(f) > 7 && find(f, "system.", 0) == 0) + return c_str(f) + 7; + if (length(f) > 8 && find(f, "Service.", 0) == 0) + return c_str(f) + 8; + return f; +} + } } -- cgit v1.2.3