It's all about the answers!

Ask a question

[RPE] xsd for printing data from 3rd party application


Chidambaram L (2343770) | asked Sep 21 '21, 12:30 a.m.

I wanted to print data from a 3rd party application in RPE. Nodes defined in the xsd are available in RPE.


<?xml version="1.0" encoding="UTF-8"?>


<xs:import namespace="http://www.w3.org/1999/02/22-rdf-syntax-ns#" schemaLocation="rdf.xsd"/>
<xs:import namespace="http://purl.org/dc/terms/" schemaLocation="dcterms.xsd"/>
<xs:import namespace="http://open-services.net/ns/core#" schemaLocation="oslc.xsd"/>

<xs:element name="RDF" type="RDF"/>

<xs:complexType name="RDF">
<xs:sequence>
<xs:element name="Description" type="TestCase" maxOccurs="1" minOccurs="1"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="TestCase">
<xs:sequence>
<xs:element ref="oslc:serviceProvider"/>
<xs:element ref="dcterms:title"/>
<xs:element ref="dcterms:description"/>
<xs:element ref="rdf:type"/>
<xs:element ref="oslc:shortId"/>
<xs:element ref="oslc:validatesRequirement"
maxOccurs="unbounded" minOccurs="1">
</xs:element>
<xs:element name="extension" type="xs:int"/>
<xs:element name="version" type="xs:int"/>
<xs:element ref="duke:td_prereq"/>
<xs:element ref="dcterms:identifier"/>
<xs:element ref="dcterms:created"/>
<xs:element ref="dcterms:contributor"/>
<xs:element ref="oslc:instanceShape"/>

<xs:element name="DUKE" type="DUKE"/>
</xs:sequence>
<xs:attribute ref="rdf:about"/>
</xs:complexType>

<xs:complexType name="DUKE">
<xs:sequence>
<xs:element name="TestScript" type="TestScript" maxOccurs="1" minOccurs="1"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="TestScript">
<xs:sequence>
<xs:element name="TestSteps" maxOccurs="unbounded" minOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="ts_title" type="xs:string"/>
<xs:element name="ts_sequenceNumber" type="xs:int"/>
<xs:element name="ts_type" type="xs:string"/>
<xs:element name="ts_desc" type="xs:string"/>
<xs:element name="ts_eResult" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>


xml of the end point referred by RPE reads

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<rdf:RDF
    xmlns:acp="http://jazz.net/ns/acp#"
    xmlns:process="http://jazz.net/ns/process#"
    xmlns:dcterms="http://purl.org/dc/terms/"
    xmlns:oslc_config="http://open-services.net/ns/config#"
    xmlns:oslc_cm="http://open-services.net/ns/cm#"
    xmlns:oslc_qm="http://open-services.net/ns/qm#"
    xmlns:oslc_rm="http://open-services.net/ns/rm#"
    xmlns:foaf="http://xmlns.com/foaf/0.1/"
    xmlns:oslc_auto="http://open-services.net/ns/auto#"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
    
  <dcterms:title rdf:datatype="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral">Staubprüfung [V1]</dcterms:title>
  <oslc:shortTitle rdf:datatype="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral">Staubprüfung [V1]</oslc:shortTitle>
  <dcterms:description rdf:datatype="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"> XHTML description
</dcterms:description>
  <rdf:type rdf:resource="http://open-services.net/ns/qm#TestCase"/>

  <duke:extension>30927</duke:extension>
  <duke:version>1</duke:version>
</duke:td_prereq>
  
 <duke:TestScript>
  <duke:TestSteps>
<duke:ts_sequenceNumber>1</duke:ts_sequenceNumber>
<duke:ts_title>Title 1</duke:ts_title>
  </duke:TestSteps>
  <duke:TestSteps>
<duke:ts_sequenceNumber>2</duke:ts_sequenceNumber>
<duke:ts_title>Title 2</duke:ts_title>
  </duke:TestSteps>
  <duke:TestSteps>
  <duke:ts_sequenceNumber>3</duke:ts_sequenceNumber>
<duke:ts_title>Title 3</duke:ts_title>
  </duke:TestSteps>
 </duke:TestScript> 

 
 </rdf:Description>

  
</rdf:RDF>


DataSource reflects the schema correctly. But the RPE report does not get into the TestScript Container itself.
DataSource

One answer



permanent link
Subramanya Prasad Pilar (4.6k14) | answered Sep 21 '21, 12:56 a.m.

You can try setting "Accept header" value to "application/rdf+xml" (insted of "application/xml") when you configure the data source.


Comments
Chidambaram L commented Sep 21 '21, 2:14 a.m.

Dear Prasad,

I have a problem only with TestSteps node. Other attributes in the rdf/xml is printed correctly.
I did not use a Data Source Reconfiguration in my template that I am using for Testing. I a testing this with a flat file, instead of connecting to an end point. I using the standard DNG_Module.dta to add the custom queries.

Your answer


Register or to post your answer.