Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lyo-dev] DoorsOauthSample

Hi,

 

Thanks for the responses folks.  I see the way Gabriel got the sample to work with DOORS 9.4 was to comment out the code that was not working.

I don’t have time to try with DOORS 9.5 at the moment, the project I am working on requires DOORS 9.4.  If the sample works fine with DOOR 9.5 then I guess we can leave it as-is without my fixes.

 

I would be interested in any explanation why the code needs to change for different releases of DOORS.  I was hoping the OSLC standard was one where we did not have to re-write or modify integrations between products with each release of the products.

 

Anyway, with my modified code I am making some progress getting information from DOORS 9.4.

I have hit a couple more issues and questions…will post those in separate messages so not to clutter up this thread.

 

Regards,

--

Peter Raymond

Principal Software Architect

Serena Software

mailto: praymond@xxxxxxxxxx

WWW: http://www.serena.com

 

From: lyo-dev-bounces@xxxxxxxxxxx [mailto:lyo-dev-bounces@xxxxxxxxxxx] On Behalf Of Maeve O Reilly
Sent: 27 June 2013 13:30
To: Lyo project developer discussions
Subject: Re: [lyo-dev] DoorsOauthSample

 

Hi Peter, Steve,

// dependent on version of DOORS
I got the sample working fine with DOORS 9.5.  It just worked.  I think we should update the doc to say 'use DOORS/DWA 9.5'.

With 9.4/DWA 1.5.0.0 I did have problems.  I got it working eventually with some help from Gabriel, attached.

Maeve

 

 


From: Steve Speicher <sspeiche@xxxxxxxxx>
To: Lyo project developer discussions <lyo-dev@xxxxxxxxxxx>
Sent: Thursday, 27 June 2013, 12:37
Subject: Re: [lyo-dev] DoorsOauthSample

 

 

On Wed, Jun 26, 2013 at 12:10 PM, Peter Raymond <praymond@xxxxxxxxxx> wrote:

Hi,

 

I have been struggling to get the sample OSLC client for DOORS to work for some time.  I think I have found several defects in the code and believe I have fixes for them.  Just wondering if anyone else got this sample to run or if maybe it is dependent on version of DOORS or some other environment or configuration difference or if this sample has not been tested.

 

The code I am trying to get running is the DoorsOauthSample.java in the package org.eclipse.lyo.client.oslc.samples.

I am using IBM DOORS 9.4 with Doors Web Access 1.5.

I am working with the latest code for the org.eclipse.lyo.client (cloned from the master branch at git://git.eclipse.org/gitroot/lyo/org.eclipse.lyo.client.git)

 

So far the problems I have found and fixed locally are:

 

1)      On line 419 in the validateTokens method the code tries to get the oauth_token and oauth_verifier query params from a URL.  But it is looking at the wrong URL, it tries to get the parameters from the URL that it sent the third GET request to…it should be looking at the URL that the third GET returned (the location sent in the 302 response to the third GET).

 

2)      There is a method called getQueryMap which tries to build a Map of name/value pairs based on the query parameters from a URL that is passed into the method.  But it will never pick up the very first query parameter correctly from the URL because it splits using ‘&’ character.  Let’s say the method is passed http://myhost/something?a=1&b=2  the map returned will contain key “http://myhost/something?a” with value “1” and another entry in the map where key is “b” and value is “2”.  

 

3)      On line 424 in the validateTokens method the POST request is being sent to the wrong URL.  It uses the variable authUrl which is still pointing to the login form.  It should instead use the URL that was returned from the third GET.

 

4)      On line 425 the code tries to set some parameters into the body of the POST request but it is doing this BEFORE setting the content type so those parameters never get set.

 

Having made those changes the sample successfully logs in to DOORS and obtains the OSLC catalogue.  But now I am running into troubles navigating the catalogues and providers to find the provider for my DOORS project.  So I suspect there are further fixes needed to the code but before I spend much more time on it was wondering if anyone has hit the same problems with the sample?

 

I have attached a patch of my modifications so far.  Should I raise a bugzilla ticket for this and get my patch submitted?

 

Hi Peter,

 

I think it would be best if you did that, there are instructions here to help guide you: http://wiki.eclipse.org/Lyo/ContributorsGettingStarted#Lyo_contribution_process

 

Let us know you get stuck and thanks for sharing this.

 

 - Steve Speicher

 

Regards,

--

Peter Raymond

Principal Software Architect

Serena Software

 


_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/lyo-dev

 


_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/lyo-dev


Back to the top