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

Uploading Attachments Using RQMURLUtility

Hi,

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?

0 votes



9 answers

Permanent link
Hi All,

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

0 votes


Permanent link
Try using "PUT" instead of "POST".
You can then set the attachment reference of your TestCase to the URL that you PUT the attachment to.

That should get you what you need.

Regards,
John

0 votes


Permanent link
Hi John,

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

0 votes


Permanent link
Mahavir,
Hmmm - response code 413 is "Request Entity Too Large", per: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Are you trying to add a very large attachment? Can you try with a smaller file?

Regards,
John

0 votes


Permanent link
Hi John,

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/testcase/urn:com.ibm.rqm:testcase:32


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/attachment/urn:com.ibm.rqm:testcase:32

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

0 votes


Permanent link
Hi,

Any updates on this??

We need to migrate 1000 test cases to RQM and each one of them have an attachment. Is there any alternate and quick way of uploading the attachment with the test cases directly in RQM?

Regards,
Mahavir

0 votes


Permanent link
Hi ALL,

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)

0 votes


Permanent link
I am also facing this exact issue, has there been a resolution?


Hi,

Any updates on this??

We need to migrate 1000 test cases to RQM and each one of them have an attachment. Is there any alternate and quick way of uploading the attachment with the test cases directly in RQM?

Regards,
Mahavir

0 votes


Permanent link
 i see the following when i try to upload a file onto the test case.

an internal error occurred.

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

0 votes

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
× 10,938
× 343

Question asked: Oct 05 '09, 5:12 a.m.

Question was seen: 12,090 times

Last updated: Sep 27 '13, 2:15 p.m.

Confirmation Cancel Confirm