Announcement Announcement Module
Collapse
No announcement yet.
Null responses Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Null responses

    I have noticed that when a service is invoked that returns a null response, the null response is not returned to the channel. I had done this in a junit test on a more complex service and the junit did not get back the null response to complete. As an example if you use the hello world example and return null, the thread will not return. What happens to the Generic Message? How is this best handled? It seems the behavior is the same on all channel implementations.

  • #2
    Hi Emilio,

    The assumption is, that a null return value indicates that there actually is nothing to return. As such, no message will be created by that handler-endpoint. If it is important to pass on a message which indicates that the service returns 'nothing', I would suggest to use the Null Object pattern (return a value which by convention means 'nothing').

    Regards,
    Marius

    Comment

    Working...
    X