Can't get serviceContext (ICommonServiceContext)

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
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

Hi Kai
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
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