It's all about the answers!

Ask a question

IProcessClientService doesn't exist?


Vince Chu (133) | asked Jan 21 '11, 11:24 a.m.
I'm trying out the code to create Work Items programmatically, and there's a piece in the plain Java that looks like

IProcessClientService processClient= (IProcessClientService)teamRepository.getClientLibrary(IProcessClientService.class);

IAuditableClient auditableClient=(IAuditableClient)teamRepository.getClientLibrary(IAuditableClient.class);
IWorkItemClient workItemClient= (IWorkItemClient)teamRepository.getClientLibrary(IWorkItemClient.class);

URI uri= URI.create(projectAreaName.replaceAll(" ", "%20"));
IProjectArea projectArea= (IProjectArea) processClient.findProcessArea(uri, null, null);


But the IProcessClientService doesn't seem to exist, I can't actually import anything. There's others that are similar to it, like IProcessRestService, IProcessService, etc. And I've tried them all, and none of them work. Any ideas?

2 answers



permanent link
Ralph Schoon (63.5k33646) | answered Feb 01 '11, 12:09 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi,

not sure what is wrong. If you are logged into the repository the service should be there. This has worked for me in the past.


try {
// Login into team repository
// TODO: This should really be something picked in the Wizard
targetRepository = TeamPlatform
.getTeamRepositoryService().getTeamRepository(
REPOSITORY_ADDRESS, monitor);
targetRepository
.registerLoginHandler(new ITeamRepository.ILoginHandler() {
public ILoginInfo challenge(ITeamRepository repository) {
return new ILoginInfo() {
public String getUserId() {
return REPOSITORY_USER;
}

public String getPassword() {
return USER_PASSWORD;
}
};
}
});
monitor.subTask("Contacting " + targetRepository.getRepositoryURI()
+ "...");
targetRepository.login(monitor);
monitor.subTask("Connected");

// Find process area and team area
// service used to find process and team area
IProcessItemService processItemService = (IProcessItemService) targetRepository
.getClientLibrary(IProcessItemService.class);




I'm trying out the code to create Work Items programmatically, and there's a piece in the plain Java that looks like

IProcessClientService processClient= (IProcessClientService)teamRepository.getClientLibrary(IProcessClientService.class);

IAuditableClient auditableClient=(IAuditableClient)teamRepository.getClientLibrary(IAuditableClient.class);
IWorkItemClient workItemClient= (IWorkItemClient)teamRepository.getClientLibrary(IWorkItemClient.class);

URI uri= URI.create(projectAreaName.replaceAll(" ", "%20"));
IProjectArea projectArea= (IProjectArea) processClient.findProcessArea(uri, null, null);


But the IProcessClientService doesn't seem to exist, I can't actually import anything. There's others that are similar to it, like IProcessRestService, IProcessService, etc. And I've tried them all, and none of them work. Any ideas?

permanent link
Martha (Ruby) Andrews (3.0k44351) | answered Feb 07 '11, 1:44 p.m.
JAZZ DEVELOPER
Hello,

Do you get any error, or does the getClientLibrary call just return null? Is there anything in the Console?

Thanks,
Martha
Jazz Developer, Process Team
Hi,

not sure what is wrong. If you are logged into the repository the service should be there. This has worked for me in the past.


try {
// Login into team repository
// TODO: This should really be something picked in the Wizard
targetRepository = TeamPlatform
.getTeamRepositoryService().getTeamRepository(
REPOSITORY_ADDRESS, monitor);
targetRepository
.registerLoginHandler(new ITeamRepository.ILoginHandler() {
public ILoginInfo challenge(ITeamRepository repository) {
return new ILoginInfo() {
public String getUserId() {
return REPOSITORY_USER;
}

public String getPassword() {
return USER_PASSWORD;
}
};
}
});
monitor.subTask("Contacting " + targetRepository.getRepositoryURI()
+ "...");
targetRepository.login(monitor);
monitor.subTask("Connected");

// Find process area and team area
// service used to find process and team area
IProcessItemService processItemService = (IProcessItemService) targetRepository
.getClientLibrary(IProcessItemService.class);




I'm trying out the code to create Work Items programmatically, and there's a piece in the plain Java that looks like

IProcessClientService processClient= (IProcessClientService)teamRepository.getClientLibrary(IProcessClientService.class);

IAuditableClient auditableClient=(IAuditableClient)teamRepository.getClientLibrary(IAuditableClient.class);
IWorkItemClient workItemClient= (IWorkItemClient)teamRepository.getClientLibrary(IWorkItemClient.class);

URI uri= URI.create(projectAreaName.replaceAll(" ", "%20"));
IProjectArea projectArea= (IProjectArea) processClient.findProcessArea(uri, null, null);


But the IProcessClientService doesn't seem to exist, I can't actually import anything. There's others that are similar to it, like IProcessRestService, IProcessService, etc. And I've tried them all, and none of them work. Any ideas?

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.