It's all about the answers!

Ask a question

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


Michele Pegoraro (1.8k14118103) | 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
Parker Dunton (4064) | answered Nov 30 '12, 7:21 p.m.
JAZZ DEVELOPER
You could try extending EObjectImpl or BasicEObjectImpl.

permanent link
SEC Servizi (97123559) | 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.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.