Rally Software

Expand all | Collapse all

Problem accessing /slm/webservice/v2.0null. Reason: Could not determine Web Services Version from \'\'.

  • 1.  Problem accessing /slm/webservice/v2.0null. Reason: Could not determine Web Services Version from \'\'.

    Posted 11-02-2017 12:47 PM

    I am trying to use the Rally REST API using the Rally Node Module. I am running NodeJS v6.11.2, request module v2.74.0, and rally module v2.1.2. My token is valid.

     

    When trying to connect, I am getting a 404 error with the following html body:

     

    [ 'null: 404! body=<html>\n<head>\n<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>\n<title>Error 404 Could not determine Web Services Version from \'\'.</title>\n</head>\n<body><h2>HTTP ERROR 404</h2>\n<p>Problem accessing /slm/webservice/v2.0null. Reason:\n<pre>    Could not determine Web Services Version from \'\'.</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/> :

     

    Any ideas?



  • 2.  Re: Problem accessing /slm/webservice/v2.0null. Reason: Could not determine Web Services Version from \'\'.

    Posted 11-02-2017 03:08 PM

    Hi Mike,

     

    Can you please show a snippet of your nodeJS code that shows the connection setup? Please do not include passwords, APIKeys, or security tokens.

     

    -Sean Davis



  • 3.  Re: Problem accessing /slm/webservice/v2.0null. Reason: Could not determine Web Services Version from \'\'.

    Posted 11-02-2017 03:22 PM

    #!/usr/bin/env node

    var request = require('request');

    var rally = require('rally');

    var queryUtils = rally.util.query;

    var refUtils = rally.util.ref;

     

    var rallyRestApi = rally(

    //any additional request options (proxy options, timeouts, etc.)

    }

    });

     

    function testit(){

    var q = {

    type: 'PortfolioItem/L2RoadmapItem', //the type to query

    start: 1, //the 1-based start index, defaults to 1

    pageSize: 200, //the page size (1-200, defaults to 200)

    limit: 10, //the maximum number of results to return- enables auto paging

    order: 'Rank', //how to sort the results

    fetch: , //the fields to retrieve

    query: queryUtils.where('DirectChildrenCount', '>', 0), //optional filter

    scope: {

    workspace: '/workspace/1111111', //specify to query entire workspace

    project: '/project/1111111',

    up: false, //true to include parent project results, false otherwise

    down: true //true to include child project results, false otherwise

    },

    requestOptions: {} //optional additional options to pass through to request

    };

    rallyRestApi.get(q, function(err, resp){

    if (err) console.log(err);

    else console.log(resp);

    });

     

    }

     

    testit();



  • 4.  Re: Problem accessing /slm/webservice/v2.0null. Reason: Could not determine Web Services Version from \'\'.

    Posted 11-04-2017 05:04 PM

    I already sent this on Nov2 3:21pm Eastern time.

    Thanks

    Mike



  • 5.  Re: Problem accessing /slm/webservice/v2.0null. Reason: Could not determine Web Services Version from \'\'.

    Posted 11-02-2017 03:53 PM

    Hi Mike,

    Try making your rallyRestApi variable look like this:

     

    var rally = require('rally'),    
    restApi = rally({
            user: 'userName', //required if no api key, defaults to process.env.RALLY_USERNAME
            pass: 'password', //required if no api key, defaults to process.env.RALLY_PASSWORD
            apiKey: '_12fj83fjk...', //preferred, required if no user/pass, defaults to process.env.RALLY_API_KEY
            apiVersion: 'v2.0', //this is the default and may be omitted
            server: 'https://rally1.rallydev.com'//this is the default and may be omitted
            requestOptions: {
                 headers: {
                     'X-RallyIntegrationName': 'My cool node.js program'//while optional, it is good practice to
                    'X-RallyIntegrationVendor': 'My company',             //provide this header information
                    'X-RallyIntegrationVersion': '1.0'
                   }
                 //any additional request options (proxy options, timeouts, etc.)
        
            }
         });

    Here is a link to the user guide that contains this example.

     

    Let me know if that helps,

    Sean



  • 6.  Re: Problem accessing /slm/webservice/v2.0null. Reason: Could not determine Web Services Version from \'\'.

    Posted 11-02-2017 04:08 PM

    I changed the code, per your reference, replaced with my own token, and get the exact same error and html body.

    -Mike



  • 7.  Re: Problem accessing /slm/webservice/v2.0null. Reason: Could not determine Web Services Version from \'\'.

    Posted 11-02-2017 07:00 PM

    Can you post the full "var rallyRestApi = rally(" changing confidential information instead of removing it all?

     

    Thanks,

    Sean