It's all about the answers!

Ask a question

Linking OLSC resources within DNG


Matthew Stone (23411) | asked May 23 '17, 3:31 p.m.

I've stood up an OSLC Bugzilla server and successfully connected DNG to it as an Outbound Friend in both the server administration area and the project administration area.  Now I cannot figure out what I need to do to create a link from the DNG artifact to the Bugzilla server.

I locate the DNG resource and click the Edit button.  Then I click the create link button which pop up a view to locate the resource I want to link to.  The problem is I don't see any option to select the Bugzilla as the repository to search for links.

What am I missing?  Should I be clicking on a different button in the DNG UI?

Thanks in advance!


Comments
Matthew Stone commented Jun 01 '17, 1:11 p.m. | edited Jun 01 '17, 1:15 p.m.

Figured it out.  See my answer below.

5 answers



permanent link
Gabriel Ruelas (1.1k13) | answered May 24 '17, 11:42 a.m.

 I made it work for RDNG 6.x. The problem is that RDNG request the Bugzilla services document in application/rdf+xml and is not able to consume it ( it only consume application/xml ).

What I did is change the Eclipse Lyo library to return the Services document for the RM domain always as application/xml.  That allowed me to create links between RDNG and Bugzilla code.


Comments
Matthew Stone commented May 24 '17, 12:02 p.m. | edited May 24 '17, 12:04 p.m.

Thank you.  I'll give it a try.  Do you recall which classes you touched?  The ServiceProviderService.class or all of them?


Gabriel Ruelas commented May 24 '17, 1:50 p.m.

AbstractOslcRdfXmlProvider, Method writeTo().


Matthew Stone commented May 25 '17, 1:50 p.m.

Thanks for that.  I've set break points in both of the writeTo() method signatures in that class and the thread never stops there when I attempt to add the Bugzilla association in DNG.  I'm just prompted to authenticate over and over again.  My break point in the CredentialsFilter is called every time and authenticates successfully.  What version of  the oslc4j-jena-provider.jar are you modifying?  I'm using 3.0.0-SNAPSHOT.  Any suggestions?


Gabriel Ruelas commented May 25 '17, 3:44 p.m.

 You have to pass the authentication step. Do you have a valid/active user in Bugzilla? After it is logged the Service Document is requested.


Matthew Stone commented May 27 '17, 12:22 p.m.

Yes I have a Bugzilla account and I've verified it by logging in directly to their site. 

Now in DNG I attempt to Add the Association and I select the Bugzilla Application in the Add Association dialog. Then I'm presented a login window with content generated by the Bugzilla adapter.  I provide my credentials and I'm certain the provider authenticates successfully because I have a break point set in the provider to step through that code.  The provider responds with a 204 (No Content) status and the login window closes and then immediately reopens prompting me to enter my credentials again.  I don't see any errors to indicate what's going wrong in the client or either server hosting DNG or Bugzilla.


permanent link
Matthew Stone (23411) | answered Jun 01 '17, 1:14 p.m.
edited Jun 01 '17, 1:18 p.m.

With Jim and Gabriel's help in this thread I finally got it working.  The part about adding the Bugzilla provider to a DNG "Projet Area" as a "Friend (Outbound)" I knew already. 

Jim helped by pointing out that I had to create an "Association" to a Bugzilla service on the "Manage Project Area" UI.  Make sure you click the Save button at the top of that screen after you've created the association.

Note that I got tired of fighting with getting DNG v5 to connect.  v5 got stuck in a perpetual authentication loop in the UI every time I tried to create a Association.  So I upgraded to v6.

Gabriel helped by pointing out that DNG v6 was incapable of reading the application/rdf+xml response which contained the Delegated UI information.  And by editing the following Class' writeTo method...

o.e.l.o.p.j.AbstractOslcRdfXmlProvider
and forcing it to return application/xml would allow DNG to find and use the Delegated Ui's.  On line 147 I did this...
getSerializationLanguage(MediaType.APPLICATION_XML_TYPE);
Thanks for everyone's help!  I hope this helps someone else.

I guess the question is why doesn't DNG support the rdf+xml content-type?


permanent link
Jim Ruehlin (79114) | answered May 23 '17, 6:09 p.m.
JAZZ DEVELOPER

 Hi Matthew,


I'd need more info to determine exactly what's going on, but here are a few things to try: 

  • Make sure DNG is authenticating correctly with Bugzilla (secrets and passwords are correct)
  • Link the Bugzilla project to the DNG project. Not sure if project linking can be done with non-CLM projects but it's something to try. Go to the project area's admin web page. Select Overview > Associations > Add. Select the target application.
  • Make sure the Bugzilla OSLC server is providing a delegated UI. When you go to select a Bugzilla entry, it should be the Bugzilla app (or OSLC interface) that provides the UI that lists available bugs. I don't think Bugzilla provides this by itself, so whatever OSLC extension to Bugzilla that you're using needs to provide it.

<style type="text/css"> p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica} </style>


Comments
Matthew Stone commented May 24 '17, 8:59 a.m.

Thanks for the feedback.  The suggestion to Add the Association is definitely a step I was missing. Unfortunately I'm still stuck.  I select the Bugzilla Application in the Add Association dialog and then I'm presented a login window with content generated by the Bugzilla adapter.  I provide my credentials and I'm certain the provider authenticates successfully because I have a break point set in the provider to step through that code.  The provider responds with a 204 (No Content) status and the login window close and then immediately reopens prompting me to enter my credentials again.  I don't see any errors to indicate what's going wrong in the client or either server hosting DNG or Bugzilla.  Any ideas?

Note that I'm using a v5 DNG server.


Matthew Stone commented Jun 01 '17, 9:45 a.m.

Jim,

I upgraded to DNG 6 and can create the association to the Bugzilla adapter now.  But now I cannot figure out what to do in the DNG UI to allow me to create links to a Bugzilla artifact.  I edit an artifact in the DNG project area where I added the Bugzilla association and then I click on the "Add Link to Artifact" button.  I don't see any option to select the Bugzilla provider.  What am I missing now?

Thanks!


Matthew Stone commented Jun 01 '17, 12:10 p.m.

Okay.  So I can see Bugzilla in the list when I attempt to create a link now.  I had overlooked the Save button at the top of the Manage Project Area screen.  I suppose that's intuitive???

Anyway, the problem is now that there's no delegated UI being rendered.  I can see that the Bugzilla server sends back content in application/rdf+xml format and the response does contain delegated UI URI's.  Any ideas?

Maybe I need to go back and look at Gabriel's suggestion again.  Did you have to edit any Lyo source like he did in order to get it working?


Jim Ruehlin commented Jun 01 '17, 12:23 p.m.
JAZZ DEVELOPER

You'll have to check with the Bugzilla adapter to see if it provides a delegated UI. It looks like it might not. If that's the case you'll need to render the UI yourself (sorry!). It's a matter of displaying the list of bugs, allowing someone to select one, then establishing the link with the Bugzilla adapter. 


The delegated UI is a service that an OSLC server can optionally provide. So if the adapter you're using doesn't provide it then you need to create your own UI and establish the link in your own code.


permanent link
Jean-Luc Johnson (8125) | answered May 24 '17, 4:35 a.m.

Hi Matthew,

 

The OSLC Bugzilla application was written for Jazz 5.x. I will not be surprised that it doesn’t work for v 6.x as it has introduced configuration management concepts. There is additional configuration selection in the process.

Anyway, at this step, follow the instructions Jim has described. You definitely need to associate your Bugzilla service provider to an existing project area in DNG. Provided that your Bugzilla adapter provides a delegated UI, you will be able to create a traceability link .

I hope it helps.


permanent link
Lonnie VanZandt (88717) | answered Jun 07 '17, 11:51 a.m.

 Implementors of OSLC ServiceProviders may be able to satisfy DNG by claiming to @Produce( OslcMediaType.APPLICATION_RDF_XML) but then in the Response builder setting the entity type to MediaType.APPLICATION_XML.


This would allow them to support DNG's needs without having to alter the library version of AbstractOslcRdfXmlProvider.


Comments
Gabriel Ruelas commented Jun 09 '17, 3:40 p.m.

 Could you pls explain how to alter the Response builder? Thanks


Lonnie VanZandt commented Feb 19 '18, 5:52 p.m. | edited Feb 19 '18, 5:53 p.m.

If you are implementing your own Service controller and so can code the @Produces annotation on the REST method, you can also code the MediaType which the Response builder actually sends back.


Lonnie VanZandt commented Feb 19 '18, 5:54 p.m. | edited Feb 19 '18, 5:55 p.m.
// TODO: See https://jazz.net/jazz03/web/projects/Requirements%20Management#action=com.ibm.team.workitem.viewWorkItem&id=115412 // Jazz DNG prior to 6.0.5 requests but cannot accept rdf+xml, can only process application/xml return Optional.ofNullable( acceptType ) .filter( at -> at.contains( "application/x-oslc-cm-service-description+xml" ) ) .map( at -> responseBuilder.type( MediaType.APPLICATION_XML ) ) .orElse( responseBuilder ) .build();

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.