It's all about the answers!

Ask a question

Is it possible to return a custom object from REST service?


Michele Pegoraro (1.8k12114102) | asked Nov 30 '12, 7:41 a.m.

Hi,

based on this article (https://jazz.net/library/LearnItem.jsp?href=content/docs/web-ui-programming/web-ui-todo-rest.html#mozTocId501066), I've created a custom REST service.
 
I'd like to return a custom object instead of a Jazz modeled object. I've seen that the calling is expecting an EObject implementation. Is there a jazz class that I can extend in order to use it as a custom object?
 
Thanks,
Michele.

2 answers



permanent link
SEC Servizi (97122652) | answered Apr 11 '16, 5:31 a.m.
edited Apr 14 '16, 5:46 a.m.
Any Jazz article or wiki page about how to implement an extension for that EObjectImpl class?

Could we use our IParameterWrapper implementation class as a returning object too?
class CustomRESTParams extends EObjectImpl implements IParameterWrapper {
Thanks in advance.
Cheers.

permanent link
Parker Dunton (4064) | answered Nov 30 '12, 7:21 p.m.
JAZZ DEVELOPER
You could try extending EObjectImpl or BasicEObjectImpl.

Your answer


Register or to post your answer.