Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

authentication problem when using RQMUrlUtility

I tried to use RQMUrlUtility to GET a list of test cases, but seems it couldn't pass authentication. I provided my user name and password correctly in command line argument, but all I got was the HTML code from user login page. Could anyone help me to solve this problem?

I downloaded RQMUrlUtility 3.0.1 and RQM version is also 3.0.1

The command I issued is:

java -jar RQMUrlUtility.jar -command GET -user bobwang@ca.ibm.com -password xxxxxxxx -context qm -filepath d:\\listc.xml -url https://ecdclm.ottawa.ibm.com:9445/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/WebSphere+Commerce+(Quality+Management)/testcase

the standard output is:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<<<<<RQMUrlUtility>>>>>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

RQMUrlUtility: Connected to https://ecdclm.ottawa.ibm.com:9445 using project "We
bSphere+Commerce+(Quality+Management)"
Oct 7, 2011 11:22:01 AM org.apache.commons.httpclient.HttpMethodDirector isRedir
ectNeeded
INFO: Redirect requested but followRedirects is disabled
RQMUrlUtility: Calling method to retrieve XML from a specified URL
RQMUrlUtility: Server Response code: 200
Oct 7, 2011 11:22:01 AM org.apache.commons.httpclient.HttpMethodBase getResponse
Body
WARNING: Going to buffer response body of large or unknown size. Using getRespon
seBodyAsStream instead is recommended.
RQMUrlUtility: XML string retrieved from URL : "https://ecdclm.ottawa
.ibm.com:9445/qm/secure/service/com.ibm.rqm.integration.service.IIntegrationServ
ice/resources/WebSphere+Commerce+(Quality+Management)/testcase " is written to f
ile located at -: " d:\\listc.xml "


looks like everything is fine except "INFO: Redirect requested but followRedirects is disabled", not sure if this is an issue.

And when I opened file d:\listc.xml, I found all I get was the HTML file from the user login page.

<!DOCTYPE html>

<!--

Licensed Materials - Property of IBM
(c) Copyright IBM Corporation 2005-2010. All Rights Reserved.

Note to U.S. Government Users Restricted Rights:
Use, duplication or disclosure restricted by GSA ADP Schedule
Contract with IBM Corp.

-->

<html >

<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=8">
<title></title>

<link type="text/css" rel="stylesheet" href="/qm/web/_style/?include=A~&etag=suwYll5R_en_US&_proxyURL=%2Fqm">
<link rel="shortcut icon" href="/qm/web/net.jazz.ajax/jazz.ico">

<style type="text/css">
#net-jazz-ajax-NoScriptMessage {
width: 100%;
color: #D0D0D0;
font-size: 2em;
text-align: center;
position: absolute;
top: 1%;
z-index: 999;
}
</style>

</head>

<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>

<script type="text/javascript">
djConfig = {
isDebug: false,
usePlainJson: true,
baseUrl: "/qm/web/dojo/",
locale: "en-us",
localizationComplete: true
};
/*null*/
net = {jazz: {ajax: {}}};
net.jazz.ajax._contextRoot = "/qm";
net.jazz.ajax._webuiPrefix = "/web/";
</script>

<script type="text/javascript" src="/qm/web/_js/?include=A~&etag=suwYll5R_en_US"></script>


<script type="text/javascript">
/* <!;
net.jazz.ajax._rootServices = 'https://ecdclm.ottawa.ibm.com:9445/qm/rootservices';
net.jazz.ajax._storageService = 'https://ecdclm.ottawa.ibm.com:9445/qm/storage';
net.jazz.ajax._queryService = 'https://ecdclm.ottawa.ibm.com:9445/qm/query';
net.jazz.ajax._infoCenterRoot = 'https://ecdclm.ottawa.ibm.com:9445/qm/../clmhelp';
net.jazz.ajax._oauthRealmName = 'Jazz';
net.jazz.ajax._viewletServiceRoot = 'https://ecdclm.ottawa.ibm.com:9445/qm';
net.jazz.ajax._viewletWebUIRoot = 'https://ecdclm.ottawa.ibm.com:9445/qm';
net.jazz.ajax._hasLocalRepository = true;
net.jazz.ajax._proxyLegacyMode = false;
net.jazz.ajax._oauthDomains = ;
net.jazz.ajax._friendDomains = ;

/* ]]> */
</script>

<script type="text/javascript">
/* <!]> */
</script>
</body>
</html>


0 votes

Comments

Could anyone help me with it?

I had the same problem. Does RQMURlUtility support only basic authentication ?

Can you log into RQM with the same username/password? Does your test case have any requirements?

Note, "INFO: Redirect requested but followRedirects is disabled" is not an error/warning, but an informational message that the HTTP client has disabled followRedirects, which should not be an issue.

I had the same problem. Does RQMURlUtility support only basic authentication ?



Yes, form-based authentication.


See the questions in the previous post.

Can you log into RQM with the same username/password? Does your test case have any requirements?



Yes, I can login with the same id (my intranet id) and password in UI without any problem. I don't think the test cases have any requirements.

I'm not sure since the JavaScript does not provide much information.

My best guess is that you are using the wrong URL (web UI URL versus integration service URL) to make the request and the RQM URL Utility is attempting to log into the web UI. Can you post your RQM URL Utility parameters?

Thanks for the response Paules,

I am not sure if I 'can' post the command I'm using as it might disclose the url and it's a fairly private url.
But I am indeed using the UI URL (this is the URL that I would use on the browser).

I wasn't aware that I should use a dfferent one...
Is there some way of deriving the integration service URL from the UI URL ?


I'm not sure since the JavaScript does not provide much information.

My best guess is that you are using the wrong URL (web UI URL versus integration service URL) to make the request and the RQM URL Utility is attempting to log into the web UI. Can you post your RQM URL Utility parameters?

showing 5 of 7 show 2 more comments


3 answers

Permanent link
Can you log into the UI and use https://jazz.net/wiki/bin/view/Main/RQMUsingPoster to GET the following URL:

https://ecdclm.ottawa.ibm.com:9445/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/WebSphere+Commerce+(Quality+Management)/testcase?abbreviate=false&calmlinks=true

See https://jazz.net/wiki/bin/view/Main/RqmApi#Read for more details (including headers/etc.).

Also, check the server logs for any errors (https://jazz.net/wiki/bin/view/Main/RqmApi#Troubleshooting).

If you want to add me (paules@ca.ibm.com) as a user, I can try myself.

0 votes

Comments

Yes, I can manually log into the UI and then use Poster to GET the feed.

However, if I logout RQM and input the same user and password in Poster's User Auth form, I got exactly the same problem - get HTML code for login page.

I tried to look at the system log in https://ecdclm.ottawa.ibm.com:9445/qm/service/com.ibm.team.repository.common.internal.IFeedService?category=SystemLog, but it is empty. I guess I have to ask the admin to enable the logs for me.

I guess it is just an authentication problem, do you have any idea what might caused it?

Can you log into the UI and use https://jazz.net/wiki/bin/view/Main/RQMUsingPoster to GET the following URL:

https://ecdclm.ottawa.ibm.com:9445/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/WebSphere+Commerce+(Quality+Management)/testcase?abbreviate=false&calmlinks=true

See https://jazz.net/wiki/bin/view/Main/RqmApi#Read for more details (including headers/etc.).

Also, check the server logs for any errors (https://jazz.net/wiki/bin/view/Main/RqmApi#Troubleshooting).

If you want to add me (paules@ca.ibm.com) as a user, I can try myself.


Permanent link
Bob, this appears to be a defect with the URL Utility. Note, authentication using Poster does not always work as expected with RQM.

Before opening a defect (https://jazz.net/jazz02/web/projects/Rational%20Quality%20Manager#action=com.ibm.team.workitem.newWorkItem - include an custom configuration to the RQM install), can you try the RQM 3.0.1.1 version of the RQM Utility (contains several fixes):

https://jazz.net/downloads/rational-quality-manager/releases/3.0.1.1?p=allDownloads

As a work-around, please use Poster.

I would be interested in getting access to the machine to debug further.

0 votes

Comments

Thanks Paul, I tried the new version (3.0.1.1) of the RQM Utility, and now it works fine.

Bob, this appears to be a defect with the URL Utility. Note, authentication using Poster does not always work as expected with RQM.


Before opening a defect (https://jazz.net/jazz02/web/projects/Rational%20Quality%20Manager#action=com.ibm.team.workitem.newWorkItem - include an custom configuration to the RQM install), can you try the RQM 3.0.1.1 version of the RQM Utility (contains several fixes):

https://jazz.net/downloads/rational-quality-manager/releases/3.0.1.1?p=allDownloads

As a work-around, please use Poster.

I would be interested in getting access to the machine to debug further.

I tried this and I get

<body>
<noscript><div>Javascript is either disabled or not available in your Browser</div></noscript>
<div>Loading...</div>
<div></div>

<script>
djConfig = {
isDebug: false,
usePlainJson: true,
baseUrl: "/jazz/web/dojo/",
locale: "en-us",
localizationComplete: true
};
/null/
net = {jazz: {ajax: {}}};
net.jazz.ajax._contextRoot = "/jazz";
net.jazz.ajax._webuiPrefix = "/web/";
</script>

<script></script>


<script>
/ <CDATA> /
</script>

<script>
/ <CDATA> /
</script>
</body>

Has this been re-introduced or is this Javascript error a problem that is fixed by something else - because I get the same error when I use curl.


Thanks Paul, I tried the new version (3.0.1.1) of the RQM Utility, and now it works fine.

Bob, this appears to be a defect with the URL Utility. Note, authentication using Poster does not always work as expected with RQM.


Before opening a defect (https://jazz.net/jazz02/web/projects/Rational%20Quality%20Manager#action=com.ibm.team.workitem.newWorkItem - include an custom configuration to the RQM install), can you try the RQM 3.0.1.1 version of the RQM Utility (contains several fixes):

https://jazz.net/downloads/rational-quality-manager/releases/3.0.1.1?p=allDownloads

As a work-around, please use Poster.

I would be interested in getting access to the machine to debug further.

As mentioned in https://jazz.net/wiki/bin/view/Main/RQMURLUtility, you use https://jazz.net/wiki/bin/view/Main/RqmApi#resourceUrl_for_interaction_with.


You can post proprietary URLs by masking the host/port/etc.

Thanks

Ok so the URL I can access via the Browser (UI) is:
(with host and port masked out)
https://swgjazz.ibm.com:8023/jazz/web/console/AC#action=com.ibm.rqm.planning.home.actionDispatcher&subAction=viewTestCase&id=6702

I am checking the second url you supply below (first one seems to be broken) here for how to translate that:..
But if you can help that would be great.


As mentioned in https://jazz.net/wiki/bin/view/Main/RQMURLUtility, you use https://jazz.net/wiki/bin/view/Main/RqmApi#resourceUrl_for_interaction_with.


You can post proprietary URLs by masking the host/port/etc.


Permanent link
This correct URL is:

https://jazz.net/wiki/bin/view/Main/RQMURLUtility

The comma was appended to the URL.

Please follow the usage examples:

https://jazz.net/wiki/bin/view/Main/RQMURLUtility#Sample_command_line_arguments

0 votes

Comments

 I tried this and get 


<body> 
<noscript><div>Javascript is either disabled or not available in your Browser</div></noscript> 
<div>Loading...</div> 
<div></div>

same error.
I am using QTP Call Rest API and response feed is display as per above error

  But Call API using Poster Not get any error 

You're getting the HTML content, so the "Accept" request header is not correctly set.

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Oct 07 '11, 11:33 a.m.

Question was seen: 10,803 times

Last updated: Jan 12 '16, 1:40 a.m.

Confirmation Cancel Confirm