Unable to create a test plan to RQM using RQMUrlUtility
I try to create a test plan in my RQM server (in 3.0.1.1) using RQMUrlUtility but not successful. This utility is in 3.0.1.1 version as well. Can anyone help me and tell me what did I do wrong.
This is how I invoke the utility
java -jar RQMUrlUtility.jar -command PUT -user myid -password mypwd -context qm -filepath c:\\tp-61.xml -url "https://cm-rtc-qm.usca.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/PSS+QM+PILOT/testplan/tp2"
I receive this response:
RQMUrlUtility: Connected to https://cm-rtc-qm.usca.ibm.com:9443 using project "PSS+QM+PILOT"
Nov 21, 2012 12:13:09 PM org.apache.commons.httpclient.HttpMethodBase processResponseHeaders
WARNING: Cookie rejected: "$Version=0; LtpaToken2= .......; $Path=/; $Domain=.ibm.com". Domain attribute ".ibm.com" violates RFC 2109: host minus domain may not contain any dots
Nov 21, 2012 12:13:09 PM org.apache.commons.httpclient.HttpMethodDirector isRedirectNeeded
INFO: Redirect requested but followRedirects is disabled
RQMUrlUtility: Calling [ HTTP PUT ] method to upload XML from a specified file to URL
Nov 21, 2012 12:13:13 PM org.apache.commons.httpclient.HttpMethodDirector isRedirectNeeded
INFO: Redirect requested but followRedirects is disabled
RQMUrlUtility: Server Response code: 302
RQMUrlUtility: >>>>>>>>!!!put returned 302, location = https://cm-rtc-qm.usca.ibm.com:9443/qm/authenticated/identity?redirectPath=%2Fqm%2Fse
rvice%2Fcom.ibm.rqm.integration.service.IIntegrationService%2Fresources%2FPSS%2BQM%2BPILOT%2Ftestplan%2Ftp2
RQMUrlUtility: Got an IOException: org.apache.commons.httpclient.RedirectException
org.apache.commons.httpclient.RedirectException
at com.ibm.rqm.url.client.RQMUrlPUT.<init>(Unknown Source)
at com.ibm.rqm.url.UrlUtility.main(Unknown Source)
I am able to import the test plan through RQM UI using this xml file so I know the xml file is correct. The reason I want to use this utility is because I want to have the external ID associated to it. Import the test plan through UI cannot have the external id (thorugh XLSArtifiactID).
This is how I invoke the utility
java -jar RQMUrlUtility.jar -command PUT -user myid -password mypwd -context qm -filepath c:\\tp-61.xml -url "https://cm-rtc-qm.usca.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/PSS+QM+PILOT/testplan/tp2"
I receive this response:
RQMUrlUtility: Connected to https://cm-rtc-qm.usca.ibm.com:9443 using project "PSS+QM+PILOT"
Nov 21, 2012 12:13:09 PM org.apache.commons.httpclient.HttpMethodBase processResponseHeaders
WARNING: Cookie rejected: "$Version=0; LtpaToken2= .......; $Path=/; $Domain=.ibm.com". Domain attribute ".ibm.com" violates RFC 2109: host minus domain may not contain any dots
Nov 21, 2012 12:13:09 PM org.apache.commons.httpclient.HttpMethodDirector isRedirectNeeded
INFO: Redirect requested but followRedirects is disabled
RQMUrlUtility: Calling [ HTTP PUT ] method to upload XML from a specified file to URL
Nov 21, 2012 12:13:13 PM org.apache.commons.httpclient.HttpMethodDirector isRedirectNeeded
INFO: Redirect requested but followRedirects is disabled
RQMUrlUtility: Server Response code: 302
RQMUrlUtility: >>>>>>>>!!!put returned 302, location = https://cm-rtc-qm.usca.ibm.com:9443/qm/authenticated/identity?redirectPath=%2Fqm%2Fse
rvice%2Fcom.ibm.rqm.integration.service.IIntegrationService%2Fresources%2FPSS%2BQM%2BPILOT%2Ftestplan%2Ftp2
RQMUrlUtility: Got an IOException: org.apache.commons.httpclient.RedirectException
org.apache.commons.httpclient.RedirectException
at com.ibm.rqm.url.client.RQMUrlPUT.<init>(Unknown Source)
at com.ibm.rqm.url.UrlUtility.main(Unknown Source)
I am able to import the test plan through RQM UI using this xml file so I know the xml file is correct. The reason I want to use this utility is because I want to have the external ID associated to it. Import the test plan through UI cannot have the external id (thorugh XLSArtifiactID).
3 answers
Winnie,
I believe you are running into an issue that was first found in the adapter code
The adapter integration client code uses the default cookie policy, which enforces RFC 2109. Essentially, this states that if you take the value of the host, minus the value of the domain, the result may not contain any dots. So for example, if the host is "swg.usma.ibm.com" and the Domain value of a returned cookie is ".ibm.com", the result of removing the domain from the host is "swg.usma", which contains dots. The reason for this rule is so that a server cannot set cookies in a client for a domain level above the one the server resides in.
The default browser processing allows this type of cookie to be accepted.
This has been identified as a product defect and is being tracked as Jazz workitem(Defect) https://jazz.net/jazz02/web/projects/Rational%20Quality%20Manager#action=com.ibm.team.workitem.viewWorkItem&id=60376
Although the defect was entered for adapter code it notes the following
"Note that not only execution adapters are affected by this. Other client utilities like the Excel Importer, etc will fail when they encounter such an environment"
It looks as if this was addressed in version 3.0.1.3 of the utility tools