final JSONResponse response = new JSONResponse(json); jsonMsg = response; } else if (JSONRpc.isRequest(json)) {
/** * Invoke a method on an object. * * @param destination * the destination * @param request * A request in JSON-RPC format * @param requestParams * Optional request parameters * @param auth * the auth * @return the string * @throws IOException * Signals that an I/O exception has occurred. */ public static String invoke(final Object destination, final String request, final RequestParams requestParams, final Authorizor auth) throws IOException { JSONRequest jsonRequest = null; JSONResponse jsonResponse = null; try { jsonRequest = new JSONRequest(request); jsonResponse = invoke(destination, jsonRequest, requestParams, auth); } catch (final JSONRPCException err) { jsonResponse = new JSONResponse(err); } return jsonResponse.toString(); }
LOG.log(Level.WARNING, "Exception in receiving message", jsonError); if (id != null){ final JSONResponse response = new JSONResponse(jsonError); response.setId(id); return response;
final JSONRequest request, final RequestParams requestParams, final Authorizor auth) { final JSONResponse resp = new JSONResponse(request.getId(), null); try { final CallTuple tuple = NamespaceUtil.get(destination,