Integrating RTC with Java Application (REST)
Hi, I'm new in RTC development and I'm trying to do an integration between RTC and a java application running in a Websphere Application Server, I saw a lot of documents explaining how to manipulate workitems using curl, but I'm using java and Apache HTTPClient, I could do a login, but when a try to do a GET request to get a Json representation of a work Item, I get only the page "loading" as a result, does anyone had already done something like that? I know it should be very easy to do, but I couldn't find nothing that can help me, I will post the part of code that I'm doing the request.
Tks. GetMethod getMethod = new GetMethod("https://localhost:9443/jazz/resource/itemOid/com.ibm.team.workitem.WorkItem/_TL6WwLaXEd-U-rkh_zo9Sg?oslc_cm.properties=dc:title,rtc_cm:comments,rtc_cm:com.ibm.team.workitem.linktype.relatedworkitem.related"); getMethod.addRequestHeader(new Header("Accept","application/x-oslc-cm-change-request+json")); try { httpclient.executeMethod(getMethod); } catch (HttpException httpe) { System.out.println(httpe.getMessage()); } catch (IOException ioe) { System.out.println(ioe.getMessage()); } String responseBody = getMethod.getResponseBodyAsString(); System.out.println("The page start here: "); System.out.println(responseBody); getMethod.releaseConnection(); |
Be the first one to answer this question!
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.