It's all about the answers!

Ask a question

Issue writing a new REST Services using Java


1
1
Davide Dellepiane (1623) | asked Jul 21 '14, 12:02 p.m.
Hello,

I'm interested at article posted  (http://jazz.net/library/LearnItem.jsp?href=content/docs/web-ui-programming/web-ui-todo-rest.html) that exeplains how to create a new REST Service, unfortunately I cannot use the code in the article because I cannot find the package that contains the classes TeamRawService  and  AbstractService.

Could you help me to solve this issue ?

My development enviroments it's based on 4.0.1 on Windows .

Best regards,

Davide Dellepiane

6 answers



permanent link
sam detweiler (12.5k6195201) | answered Jul 21 '14, 12:47 p.m.
com.ibm.team.repository.service.AbstractService
com.ibm.team.repository.service.TeamRawService

in my plugin project, I create a user library for the files in the sdk plugins folder,
and I use the library, without trying to figure out which plugin holds what classes.
com.ibm.team.repository.service,...jar  is different than the others as the working classes are in an embedded jar.

Comments
Davide Dellepiane commented Jul 22 '14, 5:05 a.m.

Hi Sam,

thank you for your answer.

I've created the library but the com.ibm.team.repository.service... jar is still missing.

Could you help me to find this library ?

Best regards,

Davide Dellepiane



1
sam detweiler commented Jul 22 '14, 8:10 a.m.

in the sdk/plugins folder there is a folder for com.ibm.team.repository.service.??? some number..

in that folder is repository_service.jar
add that jar to the library files list


permanent link
Davide Dellepiane (1623) | answered Jul 23 '14, 10:28 a.m.
Hi,

thank you for your help,I've finally found the missing library.

Do you have any other resources (articles, sample code or even example) that could help me to start ? The article in my first question doesn't seem complete (it miss the code of the ITodo interface and TodoManager class).

Thanks for your help.

Best regards,

Davide Dellepiane



Comments
1
sam detweiler commented Jul 23 '14, 10:34 a.m.

the top of the referenced web page says

This example will be creating a REST service to work with the Todo model created in the Client Library Programming Model for Jazz Components.

and those classes are created there


permanent link
Davide Dellepiane (1623) | answered Jul 23 '14, 11:02 a.m.
Hi Sam,

it seems that I was a bit hasty...  Thanks for your help.

Best regards,

Davide Dellepiane

Comments
1
sam detweiler commented Jul 23 '14, 11:07 a.m.

no problem, can't tell u how many times I've missed the importance sentence


Davide Dellepiane commented Jul 24 '14, 12:01 p.m.

Hi,

I've another problem... I've read the article but the link to download the source code doesn't work (https://jazz.net/library/LearnItem.jsp?href=content/docs/client-library-programming/todo.zip).

Do you have the source or could you please tell me where can I find it ?

Thanks in advance.


1
sam detweiler commented Jul 24 '14, 12:06 p.m.

I see the same problem.. I don't have a copy of the files.. Maybe Ralph can help


1
Ralph Schoon commented Jul 25 '14, 3:01 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I can't either. Please open a work item with https://jazz.net/jazz02/web/projects/Community%20Feedback#action=com.ibm.team.dashboard.viewDashboard

I will try to get the file, however, please make sure to create a work item to get this fixed.


1
Ralph Schoon commented Jul 25 '14, 3:06 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The file should be there. Here a version I found: https://db.tt/VUmjyJoY


Davide Dellepiane commented Jul 25 '14, 4:21 a.m.

Hi Ralph,

as requested I've opened the WI 119633, the link works perfectly.

Thanks for your help.

Regards

showing 5 of 6 show 1 more comments

permanent link
Davide Dellepiane (1623) | answered Jul 25 '14, 11:42 a.m.
Hi,

I'm sorry but I still have problem... I followed the first part of the article and when I try to test the SimpleTest Service in the browser I receive the following answer :

"Problem accessing /jazz/service/com.example.jazz.todo.common.internal.rest.ITodoRestService. Reason:

    The request would not be processed because identity assertion was requested but the IInternalContributorService could not be loaded."

What's the cause of the error ?

Thanks.

Best regards,

Davide Dellepiane


Comments
sam detweiler commented Jul 25 '14, 12:57 p.m.

no idea myself..  never tried this.. may look at it this weekend


sam detweiler commented Jul 27 '14, 10:35 a.m.

I have no idea how you made it this far.. these articles are so woefully broken.
the todo source sets up a non-web service and client.. which I have done (without knowing this sample existed).

I don't know what that has to do with the REST service at all.


permanent link
Davide Dellepiane (1623) | answered Aug 19 '14, 6:10 a.m.
HI Sam thanks for your quick answer...

I'm sorry for the delay in the answer but I was on holiday...

permanent link
Davide Dellepiane (1623) | answered Aug 25 '14, 10:53 a.m.
Hello Sam,

I probably corrected some of the syntax error in the files but now when I try to run the example I receive the following error :

"og4j:WARN No appenders could be found for logger (com.ibm.team.repository.common.internal.util.InternalTeamPlatform).
log4j:WARN Please initialize the log4j system properly."

Could you please tell me how to solve this issue ?

Am I doing something wrong ?

Best regards,

Davide Dellepiane

Comments
sam detweiler commented Aug 25 '14, 10:59 a.m.

that is a warning, so not a failure..

I don't know how to config log4j for the server side.

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.