Please help me to correct Atom feed below for execution result for bulk upload
Please help me to correct Atom feed below for execution result for bulk upload:
Its giving me 400 exception saying: The uploaded content does not consist of well-formed XML or does not match the XML schema for executionresult:
but what i had done was i first did GET for following execution result feed and then on the basis of same feed, i made following XML:
------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title type="text">executionresult ATOM feed for project area Next Generation AMT (Quality Management)</title>
<entry xmlns="http://www.w3.org/2005/Atom">
<updated>2019-04-05T10:12:22.578Z</updated>
<title type="text"></title>
<summary type="text"></summary>
<content type="application/xml">
<ns2:executionresult xmlns:ns2="http://jazz.net/xmlns/alm/qm/v0.1/" xmlns:ns1="http://schema.ibm.com/vega/2008/" xmlns:ns10="http://open-services.net/ns/core#" xmlns:ns11="http://open-services.net/ns/qm#" xmlns:ns12="http://jazz.net/xmlns/prod/jazz/rqm/process/1.0/" xmlns:ns13="http://www.w3.org/2002/07/owl#" xmlns:ns14="http://jazz.net/xmlns/alm/qm/qmadapter/v0.1" xmlns:ns15="http://jazz.net/xmlns/alm/qm/qmadapter/task/v0.1" xmlns:ns16="http://jazz.net/xmlns/alm/qm/v0.1/executionresult/v0.1" xmlns:ns17="http://jazz.net/xmlns/alm/qm/v0.1/catalog/v0.1" xmlns:ns18="http://jazz.net/xmlns/alm/qm/v0.1/tsl/v0.1/" xmlns:ns20="http://jazz.net/xmlns/alm/qm/styleinfo/v0.1/" xmlns:ns21="http://www.w3.org/1999/XSL/Transform" xmlns:ns3="http://purl.org/dc/elements/1.1/" xmlns:ns4="http://jazz.net/xmlns/prod/jazz/process/0.6/" xmlns:ns5="http://jazz.net/xmlns/alm/v0.1/" xmlns:ns6="http://purl.org/dc/terms/" xmlns:ns7="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ns8="http://jazz.net/xmlns/alm/qm/v0.1/testscript/v0.1/" xmlns:ns9="http://jazz.net/xmlns/alm/qm/v0.1/executionworkitem/v0.1">
<ns2:projectArea alias="Next+Generation+AMT+%28Quality+Management%29" href="https://loutcsvrtcp01.napa.ad.etn.com:9443/qm/resource/itemOid/com.ibm.team.process.ProjectArea/_Iy9nUhKPEeS1eLwSK31KuQ"/>
<ns3:identifier>https://loutcsvrtcp01.napa.ad.etn.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Next+Generation+AMT+%28Quality+Management%29/executionresult/slugdfLdoEDAEempKbD7Em-XLw</ns3:identifier>
<ns2:webId>83390</ns2:webId>
<ns3:title>myNewTestCase</ns3:title>
<ns2:creationDate>2019-03-07T10:04:56.873Z</ns2:creationDate>
<ns5:updated>2019-03-07T10:04:57.108Z</ns5:updated>
<ns5:state>com.ibm.rqm.execution.common.state.failed</ns5:state>
<ns3:creator ns7:resource="https://loutcsvrtcp01.napa.ad.etn.com:9443/jts/resource/itemName/com.ibm.team.repository.Contributor/E5251914">E5251914</ns3:creator>
<ns5:owner ns7:resource="https://loutcsvrtcp01.napa.ad.etn.com:9443/jts/resource/itemName/com.ibm.team.repository.Contributor/E5251914">E5251914</ns5:owner>
<ns2:locked>false</ns2:locked>
<ns16:approvalstate ns7:resource="https://loutcsvrtcp01.napa.ad.etn.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/process-info/_Iy9nUhKPEeS1eLwSK31KuQ/workflowstate/com.ibm.rqm.process.testcaseresult.workflow/com.ibm.rqm.planning.common.new">com.ibm.rqm.planning.common.new</ns16:approvalstate>
<ns2:variables>
<ns2:variable>
<ns2:name>TASK_IDENTIFIER</ns2:name>
</ns2:variable>
</ns2:variables>
<ns16:iterations>1</ns16:iterations>
<ns16:starttime>2019-03-07T09:56:40.482Z</ns16:starttime>
<ns16:endtime>2019-03-07T10:04:56.264Z</ns16:endtime>
<ns16:weight>1</ns16:weight>
<ns16:pointspassed>0</ns16:pointspassed>
<ns16:pointsfailed>1</ns16:pointsfailed>
<ns16:pointsattempted>1</ns16:pointsattempted>
<ns16:pointsblocked>0</ns16:pointsblocked>
<ns16:pointsinconclusive>0</ns16:pointsinconclusive>
<ns2:stateid>_diwWJkDAEempKbD7Em-XLw</ns2:stateid>
<ns2:pointspermfailed>0</ns2:pointspermfailed>
<ns2:pointsdeferred>0</ns2:pointsdeferred>
<ns16:isCurrent>false</ns16:isCurrent>
<ns16:testcasestateatexecution ns7:resource="https://loutcsvrtcp01.napa.ad.etn.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/process-info/_Iy9nUhKPEeS1eLwSK31KuQ/workflowstate/com.ibm.rqm.process.testcase.workflow/com.ibm.rqm.planning.common.approved">com.ibm.rqm.planning.common.approved</ns16:testcasestateatexecution>
<ns16:testscriptstateatexecution ns7:resource="https://loutcsvrtcp01.napa.ad.etn.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/process-info/_Iy9nUhKPEeS1eLwSK31KuQ/workflowstate/com.ibm.rqm.process.testscript.workflow/com.ibm.rqm.planning.common.approved">com.ibm.rqm.planning.common.approved</ns16:testscriptstateatexecution>
<ns16:testedby>
<ns16:tester ns7:resource="https://loutcsvrtcp01.napa.ad.etn.com:9443/jts/resource/itemName/com.ibm.team.repository.Contributor/E5251914">E5251914</ns16:tester>
</ns16:testedby>
<ns16:stepResults>
<ns16:stepResult endTime="2019-03-07T10:04:56.264Z" href="https://loutcsvrtcp01.napa.ad.etn.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Next+Generation+AMT+%28Quality+Management%29/executionelementresult/_diwWEUDAEempKbD7Em-XLw" ns1:id="_diwWEUDAEempKbD7Em-XLw" result="com.ibm.rqm.execution.common.state.failed" startTime="2019-03-07T09:56:40.482Z" stepIndex="1">
<ns16:startTime>2019-03-07T09:56:40.482Z</ns16:startTime>
<ns16:endTime>2019-03-07T10:04:56.264Z</ns16:endTime>
<ns16:result>com.ibm.rqm.execution.common.state.failed</ns16:result>
<ns16:stepType>com.ibm.rqm.execution.common.elementtype.execution</ns16:stepType>
<ns16:tester ns7:resource="https://loutcsvrtcp01.napa.ad.etn.com:9443/jts/resource/itemName/com.ibm.team.repository.Contributor/E5251914">E5251914</ns16:tester>
<ns16:comment/>
<ns16:compare/>
</ns16:stepResult>
</ns16:stepResults>
<ns2:labresource href="https://loutcsvrtcp01.napa.ad.etn.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Next+Generation+AMT+%28Quality+Management%29/labresource/urn:com.ibm.rqm:labresource:2"/>
<ns2:executionworkitem href="https://loutcsvrtcp01.napa.ad.etn.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Next+Generation+AMT+%28Quality+Management%29/executionworkitem/urn:com.ibm.rqm:executionworkitem:37173"/>
<ns2:contribution href="file://galmisfs03/labdata/TRN0181_NG_HD_AMT/2018/ETAS" name="TestResultLocation2"/>
<ns2:alias type="string">urn:com.ibm.rqm:executionresult:83390</ns2:alias>
<details xmlns="http://jazz.net/xmlns/alm/qm/v0.1/executionresult/v0.1">
<div xmlns="http://www.w3.org/1999/xhtml">
<xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:a="http://www.w3.org/2005/Atom" xmlns:abdera="http://incubator.apache.org/abdera" xmlns:alm="http://jazz.net/xmlns/alm/v0.1/" xmlns:app="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:qm="http://jazz.net/xmlns/alm/qm/v0.1/" xmlns:qmadapter="http://jazz.net/xmlns/alm/qm/qmadapter/v0.1" xmlns:qmresult="http://jazz.net/xmlns/alm/qm/v0.1/executionresult/v0.1" xmlns:qmtask="http://jazz.net/xmlns/alm/qm/qmadapter/task/v0.1" xmlns:qmtestscript="http://jazz.net/xmlns/alm/qm/v0.1/testscript/v0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rqm="http://schema.ibm.com/rqm/2007#executionresult" xmlns:rqmprop="http://jazz.net/xmlns/alm/rqm/common" xmlns:rqmversion="http://jazz.net/xmlns/prod/jazz/rqm/qm/1.0/">
file:\galmisfs03\labdata\TRN0181_NG_HD_AMT\2018\ETAS.<br/>
</xhtml:div>
</div>
</details>
<adapterId xmlns="http://jazz.net/xmlns/alm/qm/qmadapter/v0.1">10</adapterId>
</ns2:executionresult>
<ns2:executionresult xmlns:ns2="http://jazz.net/xmlns/alm/qm/v0.1/" xmlns:ns1="http://schema.ibm.com/vega/2008/" xmlns:ns10="http://open-services.net/ns/core#" xmlns:ns11="http://open-services.net/ns/qm#" xmlns:ns12="http://jazz.net/xmlns/prod/jazz/rqm/process/1.0/" xmlns:ns13="http://www.w3.org/2002/07/owl#" xmlns:ns14="http://jazz.net/xmlns/alm/qm/qmadapter/v0.1" xmlns:ns15="http://jazz.net/xmlns/alm/qm/qmadapter/task/v0.1" xmlns:ns16="http://jazz.net/xmlns/alm/qm/v0.1/executionresult/v0.1" xmlns:ns17="http://jazz.net/xmlns/alm/qm/v0.1/catalog/v0.1" xmlns:ns18="http://jazz.net/xmlns/alm/qm/v0.1/tsl/v0.1/" xmlns:ns20="http://jazz.net/xmlns/alm/qm/styleinfo/v0.1/" xmlns:ns21="http://www.w3.org/1999/XSL/Transform" xmlns:ns3="http://purl.org/dc/elements/1.1/" xmlns:ns4="http://jazz.net/xmlns/prod/jazz/process/0.6/" xmlns:ns5="http://jazz.net/xmlns/alm/v0.1/" xmlns:ns6="http://purl.org/dc/terms/" xmlns:ns7="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ns8="http://jazz.net/xmlns/alm/qm/v0.1/testscript/v0.1/" xmlns:ns9="http://jazz.net/xmlns/alm/qm/v0.1/executionworkitem/v0.1">
<ns2:projectArea alias="Next+Generation+AMT+%28Quality+Management%29" href="https://loutcsvrtcp01.napa.ad.etn.com:9443/qm/resource/itemOid/com.ibm.team.process.ProjectArea/_Iy9nUhKPEeS1eLwSK31KuQ"/>
<ns3:identifier>https://loutcsvrtcp01.napa.ad.etn.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Next+Generation+AMT+%28Quality+Management%29/executionresult/slugdfLdoEDAEempKbD7Em-XLw</ns3:identifier>
<ns2:webId></ns2:webId>
<ns3:title>myNewTestCase1</ns3:title>
<ns2:creationDate>2019-03-07T10:04:56.873Z</ns2:creationDate>
<ns5:updated>2019-03-07T10:04:57.108Z</ns5:updated>
<ns5:state>com.ibm.rqm.execution.common.state.passed</ns5:state>
<ns3:creator ns7:resource="https://loutcsvrtcp01.napa.ad.etn.com:9443/jts/resource/itemName/com.ibm.team.repository.Contributor/E5251914">E5251914</ns3:creator>
<ns5:owner ns7:resource="https://loutcsvrtcp01.napa.ad.etn.com:9443/jts/resource/itemName/com.ibm.team.repository.Contributor/E5251914">E5251914</ns5:owner>
<ns2:locked>false</ns2:locked>
<ns16:approvalstate ns7:resource="https://loutcsvrtcp01.napa.ad.etn.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/process-info/_Iy9nUhKPEeS1eLwSK31KuQ/workflowstate/com.ibm.rqm.process.testcaseresult.workflow/com.ibm.rqm.planning.common.new">com.ibm.rqm.planning.common.new</ns16:approvalstate>
<ns2:variables>
<ns2:variable>
<ns2:name>TASK_IDENTIFIER</ns2:name>
</ns2:variable>
</ns2:variables>
<ns16:iterations>1</ns16:iterations>
<ns16:starttime>2019-03-07T09:56:40.482Z</ns16:starttime>
<ns16:endtime>2019-03-07T10:04:56.264Z</ns16:endtime>
<ns16:weight>1</ns16:weight>
<ns16:pointspassed>0</ns16:pointspassed>
<ns16:pointsfailed>1</ns16:pointsfailed>
<ns16:pointsattempted>1</ns16:pointsattempted>
<ns16:pointsblocked>0</ns16:pointsblocked>
<ns16:pointsinconclusive>0</ns16:pointsinconclusive>
<ns2:stateid>_diwWJkDAEempKbD7Em-XLw</ns2:stateid>
<ns2:pointspermfailed>0</ns2:pointspermfailed>
<ns2:pointsdeferred>0</ns2:pointsdeferred>
<ns16:isCurrent>false</ns16:isCurrent>
<ns16:testcasestateatexecution ns7:resource="https://loutcsvrtcp01.napa.ad.etn.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/process-info/_Iy9nUhKPEeS1eLwSK31KuQ/workflowstate/com.ibm.rqm.process.testcase.workflow/com.ibm.rqm.planning.common.approved">com.ibm.rqm.planning.common.approved</ns16:testcasestateatexecution>
<ns16:testscriptstateatexecution ns7:resource="https://loutcsvrtcp01.napa.ad.etn.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/process-info/_Iy9nUhKPEeS1eLwSK31KuQ/workflowstate/com.ibm.rqm.process.testscript.workflow/com.ibm.rqm.planning.common.approved">com.ibm.rqm.planning.common.approved</ns16:testscriptstateatexecution>
<ns16:testedby>
<ns16:tester ns7:resource="https://loutcsvrtcp01.napa.ad.etn.com:9443/jts/resource/itemName/com.ibm.team.repository.Contributor/E5251914">E5251914</ns16:tester>
</ns16:testedby>
<ns16:stepResults>
<ns16:stepResult endTime="2019-03-07T10:04:56.264Z" href="https://loutcsvrtcp01.napa.ad.etn.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Next+Generation+AMT+%28Quality+Management%29/executionelementresult/_diwWEUDAEempKbD7Em-XLw" ns1:id="_diwWEUDAEempKbD7Em-XLw" result="com.ibm.rqm.execution.common.state.failed" startTime="2019-03-07T09:56:40.482Z" stepIndex="1">
<ns16:startTime>2019-03-07T09:56:40.482Z</ns16:startTime>
<ns16:endTime>2019-03-07T10:04:56.264Z</ns16:endTime>
<ns16:result>com.ibm.rqm.execution.common.state.failed</ns16:result>
<ns16:stepType>com.ibm.rqm.execution.common.elementtype.execution</ns16:stepType>
<ns16:tester ns7:resource="https://loutcsvrtcp01.napa.ad.etn.com:9443/jts/resource/itemName/com.ibm.team.repository.Contributor/E5251914">E5251914</ns16:tester>
<ns16:comment/>
<ns16:compare/>
</ns16:stepResult>
</ns16:stepResults>
<ns2:labresource href="https://loutcsvrtcp01.napa.ad.etn.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Next+Generation+AMT+%28Quality+Management%29/labresource/urn:com.ibm.rqm:labresource:2"/>
<ns2:executionworkitem href="https://loutcsvrtcp01.napa.ad.etn.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Next+Generation+AMT+%28Quality+Management%29/executionworkitem/urn:com.ibm.rqm:executionworkitem:37172"/>
<ns2:contribution href="file://galmisfs03/labdata/TRN0181_NG_HD_AMT/2018/ETAS" name="TestResultLocation2"/>
<ns2:alias type="string"></ns2:alias>
<details xmlns="http://jazz.net/xmlns/alm/qm/v0.1/executionresult/v0.1">
<div xmlns="http://www.w3.org/1999/xhtml">
<xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:a="http://www.w3.org/2005/Atom" xmlns:abdera="http://incubator.apache.org/abdera" xmlns:alm="http://jazz.net/xmlns/alm/v0.1/" xmlns:app="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:qm="http://jazz.net/xmlns/alm/qm/v0.1/" xmlns:qmadapter="http://jazz.net/xmlns/alm/qm/qmadapter/v0.1" xmlns:qmresult="http://jazz.net/xmlns/alm/qm/v0.1/executionresult/v0.1" xmlns:qmtask="http://jazz.net/xmlns/alm/qm/qmadapter/task/v0.1" xmlns:qmtestscript="http://jazz.net/xmlns/alm/qm/v0.1/testscript/v0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rqm="http://schema.ibm.com/rqm/2007#executionresult" xmlns:rqmprop="http://jazz.net/xmlns/alm/rqm/common" xmlns:rqmversion="http://jazz.net/xmlns/prod/jazz/rqm/qm/1.0/">
file:\galmisfs03\labdata\TRN0181_NG_HD_AMT\2018\ETAS.<br/>
</xhtml:div>
</div>
</details>
<adapterId xmlns="http://jazz.net/xmlns/alm/qm/qmadapter/v0.1">10</adapterId>
</ns2:executionresult>
</content>
</entry>
</feed>
Accepted answer
You have multiple executionresult elements in one content element. You should have:
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<entry>
<id>resource ID</id>
<content>
resource XML
</content>
</entry>
<entry>
<id>resource ID</id>
<content>
resource XML
</content>
</entry>
</feed>