Uploading Attachments Using RQMURLUtility
I am trying to use the RQMurlutility for uploading attachments to RQM.
I used following command:
java -jar RQMUrlUtility.jar -command POST -user test -password test -filepath C:\TD Codes\tewst\NewTextDocument.txt -url https://xxx.xxx.xxx.xxx:9443/jazz/secure/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality%20Manager/attachment/NewTextDocument.txt
Where NewTextDocument.txt is the document to upload.
However this is giving me error invalid command line options.
Can anyone let me know what am i doing wrong or if can give me sample code to upload attachments.
Second part to the question even if we successfully upload the attachment can we link it with a test case directly?
9 answers
Solved the first part of the problem. The error occured because of an space in the -filepath argument. C:\TD Codes\tewst\NewTextDocument.txt
However i am still not sure of the second problem of linking the uploaded attachment to a test case?
Also the attachments uploading using the tool in RQM is not visible using UI. So i cant even manually link the attchments. Any help towards this would be highly appreciated.
Regards.
-Mahavir
Thanks for your promt response. However we cannot upload attachments using PUT method. PUT is used for uploading test artifacts (e.g: testcase) where the filepath contains the xml feed.
Still i tried using the put method as follows:
java -jar RQMUrlUtility.jar -command PUT -user test -password test -filepath C:\test\NewTextDocument.txt -url https://*:9443/jazz/secure/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality%20Manager/testcase/urn:com.ibm.rqm:testcase:32
But it gave me following message:
RQMUrlUtility: Connected to *:9443 using project "Quality+Manager"
Oct 6, 2009 1:19:09 PM org.apache.commons.httpclient.HttpMethodDirector isRedirectNeeded
INFO: Redirect requested but followRedirects is disabled
RQMUrlUtility: Calling method to upload XML from a specified file to URL
RQMUrlUtility: Server Response code: 406
I tried to replace PUT by POST in above call, however it gave me following error:
RQMUrlUtility: Connected to *:9443 using project "Quality+Manager"
Oct 6, 2009 1:24:20 PM org.apache.commons.httpclient.HttpMethodDirector isRedirectNeeded
INFO: Redirect requested but followRedirects is disabled
RQMUrlUtility: Calling method to upload ATTACHMENT to Attachment Feed
RQMUrlUtility: Server Response code: 413
Let me know your analysis on the above.
Thanks and Regards,
Mahavir
The attachment size is just 1KB. What i think might be the area of issue is that i am trying to upload the attachment to 'testcase' folder in the url and associate it with testcase id 32.
-url https://*:9443/jazz/secure/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality%20Manager/
Instaed if try to upload to attachment feed, it gets uploaded successfully with server response 201.
-url https://usmumnsarkar3:9443/jazz/secure/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality%20Manager/
Howver if we upload attachments in the attachment folder as above, it is not getting associated with test case id 32 and there is no way we can see this attachment using the UI.
So even though the attachment is present in the rqm repository, we cannot associate it with any test case.
Regards,
Mahavir
I also faced with the same error that you described.
Once I looked through RQM server side console, some INFO message shown up.
As you can see, it shows about encoding error.
Does this happen with Non-english OS? (My environment is Japanese OS)
22:02:06,721 INFO com.ibm.rqm.planning - Failed to parse XML for PUT request https://*:9443/j
azz/secure/service/com.ibm.rqm.integration.service.IIntegrationService/resources/ClassicsProject/testcase/urn:com.ibm.rqm:testcase:10
javax.xml.bind.UnmarshalException
- with linked exception:
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:315)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:502)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:207)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:176)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:194)
at com.ibm.rqm.xml.service.internal.JAXBContextService.unmarshalReader(JAXBContextService.java:75)
at sun.reflect.GeneratedMethodAccessor511.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:378)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:364)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
Operações de crédito sejam transferidas para prejuízo utilizando a regra correta. Operações em risco H, a mais de 180 dias, e tem mais 180 dias de inadimplencia, serao transferidas para prejuízo
Ordem de execucao dos scripts:
OBS: O script 17119 deve ser executado em cooperativa (AG0370) e Banco (AG0100) e o script 17124 deve ser executado somente em banco (AG0100).
Script: 17119 - SIRET - Risco - Provisao Mensal - Rodar a Provisao Mensal Versao Anterior Validando Operacoes de credito – Positivo
Credit transactions are transferred to injury using the correct rule. H operations at risk, more than 180 days, and has over 180 days of default, will be transferred to prejudice
Order of execution of the scripts:
NOTE: The script must be run on 17119 cooperative (AG0370) and Bank (AG0100) and 17124 script should only be run on the bank (AG0100).
Script: 17119 - SIRET - Risk - Monthly Allowance - Allowance Monthly Rotate Version Previous Operations Validating credit - Positive