It's all about the answers!

Ask a question

About creating RTC WI with OSLC

pietro marella (953130) | asked May 15 '13, 4:03 p.m.
I need to create a java client that can talk with RTC (4.0.1) via OSLC, to create/read/update WI.
I started with installing the OSLC4J 1.1. project (eclipse lyo),and running the RTCFormSample provided with it.

WIs query and update work fine, but the "create" of a ChangeRequest (WI) fails.
To be more exact, it simply doesn't work, since it does not throw any exception/error.

The code in the sample is:

//Create the change request
ClientResponse creationResponse = client.createResource(
                           changeRequestCreation, changeRequest,

String changeRequestLocation = creationResponse.getHeaders().getFirst(HttpHeaders.LOCATION);

You can realize that "create" fails since the "changeRequestLocation" is null.

I have debugged a little bit the code, and I found that the ClientResponse fields "status" and "message" are respectively "403" and "forbidden".

Since I'm quite sure that credentials are correct, and they are allowed to create a WI (I've verified from RTC WUI), have you any idea what could be the problem?

Could it be the version of the OSLC libraries?

thanks in advance 

2 answers

permanent link
Oliver Siebenmarck (1111) | answered May 16 '13, 10:45 a.m.
Hi Pietro,

try to check the body of the ClientResponse. RTC usually provides additional error messages there, similar to this one:
    <oslc:message>Unexpected identifier "asdf": line 1, column 6</oslc:message>
Hope that helps,

permanent link
marina delunas (711316) | answered Oct 22 '14, 5:16 a.m.
Hi Pietro,
Did you solved the problem?


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.