It's all about the answers!

Ask a question

RTC OSLC API's not working


Rakesh S (113) | asked Sep 14 '17, 10:54 a.m.

I am getting error for RTC OSLC APIs for Defect .
This is the issue: Unable to convert OSLC response to ChangeRequest model object. Struck with the following error

AbstractConnection:167 - url - https://sdp.web.att.com/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/269847
2017-08-31 17:12:35 ERROR AbstractConnection:173 - Unknown error
java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy8.getAcceptableMediaTypes(Unknown Source)
at org.eclipse.lyo.oslc4j.provider.jena.AbstractOslcRdfXmlProvider.determineErrorMediaType(AbstractOslcRdfXmlProvider.java:391)
at org.eclipse.lyo.oslc4j.provider.jena.AbstractOslcRdfXmlProvider.buildBadRequestResponse(AbstractOslcRdfXmlProvider.java:368)
at org.eclipse.lyo.oslc4j.provider.jena.AbstractOslcRdfXmlProvider.readFrom(AbstractOslcRdfXmlProvider.java:358)
at org.eclipse.lyo.oslc4j.provider.jena.OslcRdfXmlProvider.readFrom(OslcRdfXmlProvider.java:270)
at org.apache.wink.client.internal.handlers.ClientResponseImpl.readEntity(ClientResponseImpl.java:126)
at org.apache.wink.client.internal.handlers.ClientResponseImpl.getEntity(ClientResponseImpl.java:65)
at org.apache.wink.client.internal.handlers.ClientResponseImpl.getEntity(ClientResponseImpl.java:52)
at com.tta.att.connection.AbstractConnection.getResource(AbstractConnection.java:169)
at com.att.tta.itriagebatch.serviceimpl.UpdateTDPComment.updateCommentToTDP(UpdateTDPComment.java:102)



Can any one help me with this..??

One answer



permanent link
Kevin Ramer (4.5k6174191) | answered Sep 14 '17, 11:07 a.m.
edited Sep 14 '17, 11:08 a.m.

W/o Accept: header a URI in that format will return HTML.  I.e. try shooting that URL using RESTClient plugin. You'll get back something like:

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html>
  3. <head>
  4. <title>Redirecting to Jazz.</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
  6. <meta http-equiv="refresh" content="0;url=https://rtp-rtc2:9443/jazz/web/projects/SMU%20Automation%20and%20SA%20Distributed#action=com.ibm.team.workitem.viewWorkItem&amp;id=43868">
  7. </head>
  8. <body>
  9. <p>Click <a href="https://rtp-rtc2:9443/jazz/web/projects/Automationaction=com.ibm.team.workitem.viewWorkItem&amp;id=43868">here</a> if you are not automatically redirected.</p>
  10. </body>
  11. </html>
Add an Accept: text/xml
header and you'll get back xml.

Your answer


Register or to post your answer.