Missing root services.
Hi,
I am trying to use Resource Oriented API version 2.0 (https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2).
Two feautures I need are
1) to retrieve list of work items from RTC server,
2) to create work item.
But In my root services I have no services mentioned in documentation:
- oslc_cm:simpleQuery
- oslc_cm:factory
However I can create comment using OSLC like this:
my root services are:
How can I reach my goals?
edit:
My software versions are:
Jazz Foundation - Jazz Team Server version: 1.0.0.2 iFix 3 build: I20100602-1000
Rational Team Concert version: 2.0.0.2 iFix 3 build: I20100602-1000
I am trying to use Resource Oriented API version 2.0 (https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2).
Two feautures I need are
1) to retrieve list of work items from RTC server,
2) to create work item.
But In my root services I have no services mentioned in documentation:
- oslc_cm:simpleQuery
- oslc_cm:factory
However I can create comment using OSLC like this:
curl -D - $opts -H \"Content-Type: application/x-oslc-cm-change-request+json\" -H \"Accept: text/json\" -X POST -d \"{\\\"dc:description\\\":\\\"My new comment 4th edition\\\"}\" $host/oslc/workitems/$workItemNumber/rtc_cm:comments
my root services are:
<?xml version="1.0"?>
<rdf:Description
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/terms/"
xmlns:jfs="http://jazz.net/xmlns/prod/jazz/jfs/1.0/"
xmlns:jd="http://jazz.net/xmlns/prod/jazz/discovery/1.0/"
xmlns:jp06="http://jazz.net/xmlns/prod/jazz/process/0.6/"
rdf:about="https://myserver.com:9080/jazz/rootservices">
<!--
Default root service registry document for an RTC server.
Contains contributions for core JFS services and components
and OSLC Change Management.
Specification is available at https://jazz.net/wiki/bin/view/Main/RootServicesSpec
-->
<!-- Add descriptive title here -->
<dc:title xml:lang="en">Rational Team Concert</dc:title>
<!-- List of friends (applications known to this application) -->
<jd:friends
xmlns:jd="http://jazz.net/xmlns/prod/jazz/discovery/1.0/"
rdf:resource="https://myserver.com:9080/jazz/friends" />
<!-- Viewlet-related properties -->
<jd:viewletServiceRoot
rdf:resource="https://myserver.com:9080/jazz" />
<jd:viewletWebUIRoot
rdf:resource="https://myserver.com:9080/jazz" />
<!-- Default root service registry document for a JFS server. -->
<jfs:oauthRequestTokenUrl
rdf:resource="https://myserver.com:9080/jazz/oauth-request-token" />
<jfs:oauthAccessTokenUrl
rdf:resource="https://myserver.com:9080/jazz/oauth-access-token" />
<jfs:oauthRealmName>Jazz</jfs:oauthRealmName>
<jfs:oauthDomain>https://myserver.com:9080/jazz</jfs:oauthDomain>
<jfs:oauthUserAuthorizationUrl
rdf:resource="https://myserver.com:9080/jazz/oauth-authorize" />
<jfs:oauthRequestConsumerKeyUrl
rdf:resource="https://myserver.com:9080/jazz/oauth-request-consumer" />
<jfs:oauthApprovalModuleUrl
rdf:resource="https://myserver.com:9080/jazz/_ajax-modules/com.ibm.team.repository.AuthorizeOAuth" />
<!-- service for finding users and getting user info -->
<jfs:users
rdf:resource="https://myserver.com:9080/jazz/users" />
<!-- Service to redirect to the resource that represents the authenticated user -->
<jfs:currentUser
rdf:resource="https://myserver.com:9080/jazz/whoami" />
<!-- JFS storage service -->
<jfs:storage
rdf:resource="https://myserver.com:9080/jazz/storage" />
<!-- JFS SPARQL query service -->
<jfs:query
rdf:resource="https://myserver.com:9080/jazz/query" />
<!-- Put RTC changes in here, so we do not have to merge all the time : START -->
<!-- Change Management service catalog -->
<oslc_cm:cmServiceProviders
xmlns:oslc_cm="http://open-services.net/xmlns/cm/1.0/"
rdf:resource="https://myserver.com:9080/jazz/oslc/workitems/catalog" />
<!-- Put RTC changes in here, so we do not have to merge all the time : END -->
<!-- JFS indexing service -->
<jfs:indexing
rdf:resource="https://myserver.com:9080/jazz/indexing" />
<!-- JFS revisions and history of storage resources -->
<jfs:history
rdf:resource="https://myserver.com:9080/jazz/history" />
<!-- JFS full text search -->
<jfs:search
rdf:resource="https://myserver.com:9080/jazz/search" />
<!-- JFS baseline service -->
<jfs:baselines
rdf:resource="https://myserver.com:9080/jazz/baselines" />
<!-- JFS mailer service -->
<jfs:mailer
rdf:resource="https://myserver.com:9080/jazz/mailer" />
<!-- Project areas service. This service is provisional and may change in the next release. -->
<jp06:projectAreas
rdf:resource="https://myserver.com:9080/jazz/process/project-areas" />
<!-- Process templates service. This service is provisional and may change in the next release. -->
<jp06:processTemplates
rdf:resource="https://myserver.com:9080/jazz/process/templates" />
<!-- Process security service. This service is provisional and may change in the next release. -->
<jp06:processSecurity
rdf:resource="https://myserver.com:9080/jazz/process-security"/>
</rdf:Description>
How can I reach my goals?
edit:
My software versions are:
Jazz Foundation - Jazz Team Server version: 1.0.0.2 iFix 3 build: I20100602-1000
Rational Team Concert version: 2.0.0.2 iFix 3 build: I20100602-1000
3 answers
You need to grab this URl from oslc_cm:cmServiceProviders and it will lead you to the ServiceProviderCatalog resource, which can then get the ServiceProvider element, which has a URI to fetch it. From there, you'll find it.
This article should be helpful in explaining how to traverse the service discovery chain of documents http://jazz.net/library/article/352
This article should be helpful in explaining how to traverse the service discovery chain of documents http://jazz.net/library/article/352
I am writing an application, using the api documented in the referenced document. I am using the non-ssl urls, as my server rejects self signed certificates, with no workaround available.
I successfully get the serviceprovider entry from the root services document.
but when I request that document (open that url) via my program, I get a 302 'moved' response, to an authorization service.
when I do this in the browser I am requested to logon with my jazz userid/pw... but I my application is not a browser. I supplied the basic auth credential header on the request for the catalog (service provider link), but I only get back the authentication request..
get , http://xx.xx.xx.xx:9080/jazz/oslc/workitems/catalog
response, 302
http://xx.xx.xx.x:9080/jazz/authenticated/identity?redirectPath=%2Fjazz%2Foslc%2Fworkitems%2Fcatalog
that document returns the html & javascript to invoke the logon panel.
...
<body class="tundra">
<noscript><div id="net-jazz-ajax-NoScriptMessage">Javascript is either disabled or not available in your Browser</div></noscript>
<div id="net-jazz-ajax-InitialLoadMessage">Loading...</div>
<div id="net-jazz-ajax-WorkbenchRoot"></div>
what did I miss?
the document at https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2#Discovery also does not document any requirement to 'login' as part of the discovery sequence.
thanks
Sam
I successfully get the serviceprovider entry from the root services document.
but when I request that document (open that url) via my program, I get a 302 'moved' response, to an authorization service.
when I do this in the browser I am requested to logon with my jazz userid/pw... but I my application is not a browser. I supplied the basic auth credential header on the request for the catalog (service provider link), but I only get back the authentication request..
get , http://xx.xx.xx.xx:9080/jazz/oslc/workitems/catalog
response, 302
http://xx.xx.xx.x:9080/jazz/authenticated/identity?redirectPath=%2Fjazz%2Foslc%2Fworkitems%2Fcatalog
that document returns the html & javascript to invoke the logon panel.
...
<body class="tundra">
<noscript><div id="net-jazz-ajax-NoScriptMessage">Javascript is either disabled or not available in your Browser</div></noscript>
<div id="net-jazz-ajax-InitialLoadMessage">Loading...</div>
<div id="net-jazz-ajax-WorkbenchRoot"></div>
what did I miss?
the document at https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2#Discovery also does not document any requirement to 'login' as part of the discovery sequence.
thanks
Sam