From 507fff6345ac0955e656683aebed44f3d49a94ed Mon Sep 17 00:00:00 2001 From: rfeng Date: Mon, 10 Oct 2011 21:15:45 +0000 Subject: For jsonrpc 2.0, don't send null error or null result git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1181241 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tuscany/sca/binding/jsonrpc/protocol/JsonRpcResponse.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sca-java-2.x/trunk/modules/binding-jsonrpc-runtime') diff --git a/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/protocol/JsonRpcResponse.java b/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/protocol/JsonRpcResponse.java index 7d50cd772f..8186d89030 100644 --- a/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/protocol/JsonRpcResponse.java +++ b/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/protocol/JsonRpcResponse.java @@ -54,7 +54,7 @@ public abstract class JsonRpcResponse { super(); ObjectNode response = JsonNodeFactory.instance.objectNode(); response.put("id", id); - response.put("result", JsonNodeFactory.instance.nullNode()); + // response.put("result", JsonNodeFactory.instance.nullNode()); response.put("error", mapError(t)); this.jsonNode = response; } @@ -64,7 +64,7 @@ public abstract class JsonRpcResponse { ObjectNode response = JsonNodeFactory.instance.objectNode(); response.put("id", id); response.put("result", result); - response.put("error", JsonNodeFactory.instance.nullNode()); + // response.put("error", JsonNodeFactory.instance.nullNode()); this.jsonNode = response; } -- cgit v1.2.3