Responses from Resource Methods - 6.3

Talend ESB Service Developer Guide

EnrichVersion
6.3
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
task
Design and Development
Installation and Upgrade
EnrichPlatform
Talend ESB

The resource method may return a custom Java class, JAX-RS Response or void. JAX-RS MessageBodyWriter providers are responsible for writing the custom Java class instance to the output stream. The runtime will set the HTTP 200 status.

Returning JAX-RS Response is useful when no response message is available, the HTTP status code needs to be customized or some response HTTP headers set. Returning "void" will result in the HTTP 204 (No Content) status beiing returned to the client.