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

XML format for creating a testscript using REST API.

 Hello, 

My XML looks like this:
<?xml version="1.0" encoding="UTF-8"?>
	<ns4:testscript xmlns:ns4="http://jazz.net/xmlns/alm/qm/v0.1/"
	xmlns:ns1="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:ns2="http://jazz.net/xmlns/alm/qm/v0.1/executionresult/v0.1"
	xmlns:ns3="http://schema.ibm.com/vega/2008/"
	xmlns:ns5="http://jazz.net/xmlns/alm/v0.1/"
	xmlns:ns6="http://purl.org/dc/elements/1.1/"
	xmlns:ns7="http://jazz.net/xmlns/prod/jazz/process/0.6/"
	xmlns:ns8="http://purl.org/dc/terms/"
	xmlns:ns9="http://jazz.net/xmlns/alm/qm/v0.1/tsl/v0.1/"
	xmlns:ns10="http://jazz.net/xmlns/alm/qm/v0.1/testscript/v0.1/">
	<ns4:projectArea alias="Sample+Quality+Management++%28Quality+Management%29" 
	href="https://localhost:9443/qm/resource/itemOid/com.ibm.team.process.ProjectArea/_MmcaQqRVEeOKo6LKESv69g"/>
	<ns6:title>MyDocument</ns6:title>
	<ns6:description>This is a test document
	</ns6:description>
	<ns4:scripttype>com.ibm.rqm.planning.common.scripttype.manual</ns4:scripttype>
	<ns4:steps>
	<ns10:step type="execution">
	<ns10:name>This is a test document</ns10:name>
	<ns10:title>This is a test document</ns10:title>
	<ns10:description>
	<div:div xmlns:div="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">Expected result</div:div>
	</ns10:description>
	<ns10:expectedResult>
	<div:div xmlns:div="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">Expected result</div:div>
	</ns10:expectedResult>
	</ns10:step>
	</ns4:steps>
	</ns4:testscript>
And I am trying to post it using the URL: 
https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/_MmcaQqRVEeOKo6LKESv69g/testscript

I am getting HTTP 302 error. Can someone tell me whether the XML format is proper for creating testscript using REST API. Also do we need to POST it or PUT?

Thanks,
Aniketha

0 votes



2 answers

Permanent link
Hi Aniketha,

The url to POST the testscript should be
https://localhost:9443/qm/secure/service/com.ibm.rqm.integration.service.IIntegrationService/resources/ProjectAreaName/testscript/testscriptId

here testscriptId can be any value


0 votes

Comments

Also wanted to add that the xml is correct and you can use anything POST or PUT. Preferable is PUT.

 I changed my URL to :


If i do POST i get the following error:
java.lang.Exception: Error occured while posting
HTTP/1.1 302 Found

If i do PUT, no error but test script will not be created

What might be the reason?

Thanks,
Aniketha


Permanent link
here is what the HTTP Status Code means
302     Found     The resource is available at a different location. The URL is available in the Location HTTP response header
what URL do you see in the Location HTTP response header!

0 votes

Comments

Even if I post it to the above URL nothing is happening. Please help me out. 

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,937
× 479

Question asked: Mar 07 '14, 5:44 a.m.

Question was seen: 7,083 times

Last updated: Mar 10 '14, 3:21 a.m.

Confirmation Cancel Confirm