diff options
Diffstat (limited to 'sca-java-1.x/trunk/modules/binding-jsonp-runtime/src/main')
-rw-r--r-- | sca-java-1.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPServlet.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sca-java-1.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPServlet.java b/sca-java-1.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPServlet.java index a86446c734..99879eb145 100644 --- a/sca-java-1.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPServlet.java +++ b/sca-java-1.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPServlet.java @@ -70,9 +70,12 @@ public class JSONPServlet extends GenericServlet { @Override
public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException {
Object[] args = getJSONRequestStringArray(servletRequest);
- Object response = invokeService(args);
- String jsonResponse = getJSONResponseAsString(servletRequest, response);
- servletResponse.getOutputStream().println(jsonResponse);
+ Object response = invokeService(args);
+
+ if (response != null){
+ String jsonResponse = getJSONResponseAsString(servletRequest, response);
+ servletResponse.getOutputStream().println(jsonResponse);
+ }
}
/**
|