1

So I want to request RTC 3.X work itmes with LYo 2.1, but I can not extract them from the stream: Where client is OslcOAuthClient.

ClientResponse response = client.getResource(resultsUrl, CT_RDF); ChangeRequest req = response.getEntity(ChangeRequest.class);

I am wondering what is the right resource object is it ChangeRequest or it is another? My in my stream there is (when I use String.class):

  <rdf:RDF
    xmlns:dcterms="http://purl.org/dc/terms/"
    xmlns:oslc_cm="http://open-services.net/ns/cm#"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:rtc_ext="http://jazz.net/xmlns/prod/jazz/rtc/ext/1.0/"
    xmlns:oslc_cmx="http://open-services.net/ns/cm-x#"
    xmlns:process="http://jazz.net/ns/process#"
    xmlns:acp="http://jazz.net/ns/acp#"
    xmlns:acc="http://open-services.net/ns/core/acc#"
    xmlns:rtc_cm="http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/"
    xmlns:oslc="http://open-services.net/ns/core#"
    xmlns:oslc_pl="http://open-services.net/ns/pl#" > 
  <rdf:Description rdf:about="https://10.0.2.79:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/27?useEnumLabel=true">
    <oslc_cmx:severity rdf:resource="https://10.0.2.79:9443/ccm/oslc/enumerations/_moQdkFrdEeWQIIEAtKgWEg/severity/severity.literal.l3"/>
    <oslc:instanceShape rdf:resource="https://10.0.2.79:9443/ccm/oslc/shapes/workitems/_oFcxBlxhEeWQIIEAtKgWEg"/>
    <rtc_cm:modifiedBy rdf:resource="https://10.0.2.79:9443/jts/users/Admin"/>
    <rtc_ext:archived rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</rtc_ext:archived>
    <rtc_cm:type rdf:resource="https://10.0.2.79:9443/ccm/oslc/types/_moQdkFrdEeWQIIEAtKgWEg/myId"/>
    <acc:accessContext rdf:resource="https://10.0.2.79:9443/ccm/acclist#_moQdkFrdEeWQIIEAtKgWEg"/>
    <rtc_cm:timeSheet rdf:resource="https://10.0.2.79:9443/ccm/oslc/workitems/_oFcxBlxhEeWQIIEAtKgWEg/rtc_cm:timeSheet"/>
    <oslc:shortId rdf:datatype="http://www.w3.org/2001/XMLSchema#string">27</oslc:shortId>
    <oslc_cm:status rdf:datatype="http://www.w3.org/2001/XMLSchema#string">In Progress</oslc_cm:status>
    <dcterms:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">27</dcterms:identifier>
    <process:projectArea rdf:resource="https://10.0.2.79:9443/ccm/process/project-areas/_moQdkFrdEeWQIIEAtKgWEg"/>
    <acp:accessControl rdf:resource="https://10.0.2.79:9443/ccm/oslc/access-control/_moQdkFrdEeWQIIEAtKgWEg"/>
    <oslc:discussedBy rdf:resource="https://10.0.2.79:9443/ccm/oslc/workitems/_oFcxBlxhEeWQIIEAtKgWEg/rtc_cm:comments"/>
    <oslc_cm:inprogress rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</oslc_cm:inprogress>
    <dcterms:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2015-09-16T10:57:56.600Z</dcterms:modified>
    <rtc_cm:state rdf:resource="https://10.0.2.79:9443/ccm/oslc/workflows/_moQdkFrdEeWQIIEAtKgWEg/states/bugzillaWorkflow/2"/>
    <dcterms:description rdf:parseType="Literal">text</dcterms:description>
    <oslc_cm:fixed rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</oslc_cm:fixed>
    <rdf:type rdf:resource="http://open-services.net/ns/cm#ChangeRequest"/>
    <dcterms:contributor rdf:resource="https://10.0.2.79:9443/jts/users/unassigned"/>
    <rtc_cm:repository rdf:resource="https://10.0.2.79:9443/ccm/oslc/repository"/>
    <rtc_cm:filedAgainst rdf:resource="https://10.0.2.79:9443/ccm/resource/itemOid/com.ibm.team.workitem.Category/_ns_RCFrdEeWQIIEAtKgWEg"/>
    <oslc_cm:closed rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</oslc_cm:closed>
    <dcterms:type rdf:datatype="http://www.w3.org/2001/XMLSchema#string">MyType</dcterms:type>
    <dcterms:title rdf:parseType="Literal">WorkItemFromCustomEnumerationType</dcterms:title>
    <oslc_cm:approved rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</oslc_cm:approved>
    <oslc_cmx:project rdf:resource="https://10.0.2.79:9443/ccm/oslc/projectareas/_moQdkFrdEeWQIIEAtKgWEg"/>
    <oslc_cm:verified rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</oslc_cm:verified>
    <rtc_cm:progressTracking rdf:resource="https://10.0.2.79:9443/ccm/oslc/workitems/_oFcxBlxhEeWQIIEAtKgWEg/progressTracking"/>
    <oslc_pl:schedule rdf:resource="https://10.0.2.79:9443/ccm/oslc/workitems/_oFcxBlxhEeWQIIEAtKgWEg/schedule"/>
    <dcterms:subject rdf:datatype="http://www.w3.org/2001/XMLSchema#string">mytype</dcterms:subject>
    <oslc_cm:reviewed rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</oslc_cm:reviewed>
    <rtc_ext:contextId>_moQdkFrdEeWQIIEAtKgWEg</rtc_ext:contextId>
    <dcterms:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2015-09-16T10:57:24.636Z</dcterms:created>
    <oslc:serviceProvider rdf:resource="https://10.0.2.79:9443/ccm/oslc/contexts/_moQdkFrdEeWQIIEAtKgWEg/workitems/services"/>
    <process:teamArea rdf:resource="https://10.0.2.79:9443/ccm/process/team-areas/_moQdkFrdEeWQIIEAtKgWEg"/>
    <oslc:shortTitle rdf:parseType="Literal">MyType 27</oslc:shortTitle>
    <rtc_cm:subscribers rdf:resource="https://10.0.2.79:9443/jts/users/Admin"/>
    <rtc_cm:resolvedBy rdf:resource="https://10.0.2.79:9443/jts/users/unassigned"/>
    <dcterms:creator rdf:resource="https://10.0.2.79:9443/jts/users/Admin"/>
    <oslc_cmx:priority rdf:resource="https://10.0.2.79:9443/ccm/oslc/enumerations/_moQdkFrdEeWQIIEAtKgWEg/priority/priority.literal.l1"/>
  </rdf:Description>
</rdf:RDF>

1 Answer 1

0

RTC3 was the first version of RTC that supported OSLC2, so it supports both OSLC1 and OSLC2. By default, RTC3 returns results as specified in OSLC1. So your problem may be that OSLC4J is expecting an OSLC2 result but getting an OSLC1 result.

You should set the OSLC-Core-Version header to 2.0 when you send a request. That should cause RTC3 to respond with a result compatible with the OSLC2 spec.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.