You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Collin Tedlock (Updated) (JIRA)" <de...@tuscany.apache.org> on 2012/02/29 20:33:57 UTC

[jira] [Updated] (TUSCANY-4021) JSON-RPC OVER SCA HTTP BINDING DOES NOT RETURN A JSON OBJECT AFTER AN EXCEPTION

     [ https://issues.apache.org/jira/browse/TUSCANY-4021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Collin Tedlock updated TUSCANY-4021:
------------------------------------

    Description: 
JSON-RPC over SCA HTTP binding does not return a JSON object after an exception.

The spec indicates a well formed JSON object should be returned in case of an error: http://json-rpc.org/wiki/specification

But while creating a fault message in JSONRPCWireFormatInterceptor.createJSONFaultMessage the body is simply set to the throwable:
	private Message createJSONFaultMessage(Throwable throwable) {
        Message jsonFaultMessage = messageFactory.createMessage();
        
        jsonFaultMessage.setBody(throwable);
        
        return jsonFaultMessage;
    }

  was:JSON-RPC over SCA HTTP binding does not return a JSON object after an exception.

    
> JSON-RPC OVER SCA HTTP BINDING DOES NOT RETURN A JSON OBJECT AFTER AN EXCEPTION
> -------------------------------------------------------------------------------
>
>                 Key: TUSCANY-4021
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-4021
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA HTTP Binding
>            Reporter: Collin Tedlock
>
> JSON-RPC over SCA HTTP binding does not return a JSON object after an exception.
> The spec indicates a well formed JSON object should be returned in case of an error: http://json-rpc.org/wiki/specification
> But while creating a fault message in JSONRPCWireFormatInterceptor.createJSONFaultMessage the body is simply set to the throwable:
> 	private Message createJSONFaultMessage(Throwable throwable) {
>         Message jsonFaultMessage = messageFactory.createMessage();
>         
>         jsonFaultMessage.setBody(throwable);
>         
>         return jsonFaultMessage;
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira