Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lyo-dev] Querying requirements in a DOORS module using Lyo?

Peter,

It's looking for a resource with URI

/dwa/rm/oslc/query/urn:rational:ers-390465871f686086:1-390465871f686086-M-00000cc0/view:0000000e

But what is coming back is

/dwa/rm/oslc/query

This is why the result is empty. You might need to contact the DOORS team to understand why the response doesn't match the query capability URI. It could be a problem in the DOORS provider.

Does it work if you hard-code this query URL?

http://st3958vm:9090/dwa/rm/oslc/query?urn=urn:rational:ers-390465871f686086:1-390465871f686086-M-00000cc0&view=0000000e

--
Samuel Padgett | IBM Rational | spadgett@xxxxxxxxxx


Inactive hide details for Peter Raymond ---07/03/2013 09:16:36 AM---Hi, Last question for today...I promise :)Peter Raymond ---07/03/2013 09:16:36 AM---Hi, Last question for today...I promise :)


    From:

Peter Raymond <praymond@xxxxxxxxxx>

    To:

"lyo-dev@xxxxxxxxxxx" <lyo-dev@xxxxxxxxxxx>

    Date:

07/03/2013 09:16 AM

    Subject:

[lyo-dev] Querying requirements in a DOORS module using Lyo?

    Sent by:

lyo-dev-bounces@xxxxxxxxxxx




Hi,
 
Last question for today…I promise J
 
Kind of related to my previous thread on finding requirements in a DOORS baseline using OSLC, I thought I would try a different approach.
I decided to query all the requirements in the module that has been baselined and see if there is some property of the requirements that might indicate which baselines they are contained in.
 
But my OslcQuery is returning no results for my query, even tho when I sniff the network traffic I can see lots of requirements data coming back.
 
I have my URL for the OSLC Service Provider for my module:
 
http://mydwaserver:mydwaport/dwa/rm/discovery/service/urn:rational:ers-390465871f686086:1-390465871f686086-M-00000cc0
 
I get the query URL using the code:
 
    String queryCapability = client.lookupQueryCapability(serviceProviderUrl,
      OSLCConstants.OSLC_RM_V2,
      OSLCConstants.RM_REQUIREMENT_TYPE);
 
Then I try to query all requirements that were created today or earlier (all of them).
I do that using the following Lyo code:
 
    OslcQueryParameters queryParams = new OslcQueryParameters();
    queryParams.setPrefix("dcterms=<http://purl.org/dc/terms/>");
    queryParams.setWhere("dcterms:created<=2013-07-03");
    OslcQuery query = new OslcQuery(client, queryCapability, 10, queryParams);
    OslcQueryResult result = query.submit();
     
    String requirementURL = null;
    // Get the returned requirements
    if ( result != null ) {
        int resultsSize = result.getMembersUrls().length;
     
        if (resultsSize>0) {                       
           String [] returnedURLS = result.getMembersUrls();
           // Do some stuff with the requirements :)
                   
But resultsSize is always zero.
 
Any ideas why the API is returning no objects when the HTTP response seems to have some good data in it?
Is there something else I need to specify when creating my OslcQuery object (perhaps some special attribute I must select for inclusion in the query results)?
 
If I enable a network sniffer I see the following network traffic. Which all looks good, there are lots of requirements coming back.
   
 
Regards,
--
Peter Raymond
Principal Software Architect
Serena Software
mailto: praymond@xxxxxxxxxx
WWW: http://www.serena.com
 _______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/lyo-dev


GIF image

GIF image


Back to the top