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
" 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
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.
Pinned topic Error handling implementation.widget & binding.http
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2011-09-15T14:30:00Z at 2011-09-15T14:30:00Z by zacv
zacv 0600000FRH1 Post
Re: Error handling implementation.widget & binding.http2011-09-15T14:30:00ZThis is the accepted answer. This is the accepted answer.
- izhd 120000GXD1
The PMR is 81984,756,000.