Author: rfeng
Date: Mon Oct 10 21:15:45 2011
New Revision: 1181241

URL: http://svn.apache.org/viewvc?rev=1181241&view=rev
Log:
For jsonrpc 2.0, don't send null error or null result

Modified:
    
tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/protocol/JsonRpcResponse.java

Modified: 
tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/protocol/JsonRpcResponse.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/protocol/JsonRpcResponse.java?rev=1181241&r1=1181240&r2=1181241&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/protocol/JsonRpcResponse.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/protocol/JsonRpcResponse.java
 Mon Oct 10 21:15:45 2011
@@ -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;
     }
 


Reply via email to