It's all about the answers!

Ask a question

Can't get serviceContext (ICommonServiceContext)


Kai Nehring (3116) | asked May 16 '08, 4:31 p.m.
Hi,

I need an ICommonServiceContext to call some methods (Query, IAttribute, ...). Unfortunately the following line returns "null"

ICommonServiceContext context = (ICommonServiceContext) repo.getClientLibrary(ICommonServiceContext.class) ;

How can I get/create that context?

Thanks in advance
Kai

One answer



permanent link
Patrick Streule (4.9k21) | answered May 16 '08, 5:22 p.m.
JAZZ DEVELOPER
Hi Kai

I need an ICommonServiceContext to call some methods (Query,
IAttribute, ...). Unfortunately the following line returns
"null"

ICommonServiceContext context = (ICommonServiceContext)
repo.getClientLibrary(ICommonServiceContext.class) ;

How can I get/create that context?

ICommonServiceContext is an internal implementation detail of the
WorkItem component.

You should use repo.getClientLibrary(IQueryClient.class) or
repo.getClientLibrary(IWorkItemClient.class) to get access to the
IAttribute/Query functionality on the client.

Regards,
Patrick
Jazz Work Item Team

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.