Topic
3 replies Latest Post - ‏2011-09-15T14:30:00Z by zacv
izhd
izhd
27 Posts
ACCEPTED ANSWER

Pinned topic Error handling implementation.widget & binding.http

‏2011-09-12T19:01:48Z |
Hello,

We have SCA service with http binding and client SCA implemented as html page (implementation.widget)
When service throws exception, client doesn't receive proper object although it supposed to according to JSON-RPC implementation

from http://json-rpc.org/wiki/specification
" 1.2 Response

When the method invocation completes, the service must reply with a response. The response is a single object serialized using JSON.

It has three properties:

result - The Object that was returned by the invoked method. This must be null in case there was an error invoking the method.
error - An Error object if there was an error invoking the method. It must be null if there was no error.
id - This must be the same id as the request it is responding to.
"

In reality SCA service returns exception in plain text instead of object

If we take sample from RAD tutorial scaNewsService and add code to org.example.news.NewsComponentImpl::search

if ("exception".equals(keyword)){
throw new RuntimeException("Exception test");
}

When testing /scaNewsServiceClient/NewsComponentHttp.html enter "exception"

In Firebug we can see that POST has plain text "java.lang.RuntimeException: Exception test" in response.
The error handler in dojo code doesn't kick in.

Please advise if I should throw some particular exception or the propagating of exceptions is not implemented and the PMR should be opened.

Regards,
Igor
Updated on 2011-09-15T14:30:00Z at 2011-09-15T14:30:00Z by zacv
  • bhdaniel
    bhdaniel
    7 Posts
    ACCEPTED ANSWER

    Re: Error handling implementation.widget & binding.http

    ‏2011-09-13T13:59:16Z  in response to izhd
    Hi Igor,

    I think this is a bug. You can open a PMR to get it fixed.

    Brent
    • izhd
      izhd
      27 Posts
      ACCEPTED ANSWER

      Re: Error handling implementation.widget & binding.http

      ‏2011-09-13T17:23:51Z  in response to bhdaniel
      PMR #110913-000019 created
      • zacv
        zacv
        1 Post
        ACCEPTED ANSWER

        Re: Error handling implementation.widget & binding.http

        ‏2011-09-15T14:30:00Z  in response to izhd
        Hi Igor, sorry for the confusion - that's the PSN number (#110913-000019).
        The PMR is 81984,756,000.