Fortunately, I just need to read the data. There won't be anything writing back to the database.

Important to say, this is intended for development purposes only. We need a way to build automated processes faster. So, instead of manually populate the couple dozens Globals we would need to in order to test a simple scenario, we would use would development databases to capture this data.

So, with the same data we use when testing; business-rules and, consequently, interfaces, we can build the automated tests way faster.

Alex, hi!

Thank you very much for your answer! I got back to this issue just now, and I would like to check some things with you.

While I understand your explanation on how to solve the mismatching or missing elements, I'm unable to generate the same errors regarding property as you did while using the reader.SAXFlags=$$$SAXVALIDATIONSCHEMAFULLCHECKING . I'm probably missing something trivial when correlating the file with the classes.

So far, we have three scenarios.

Scenario 1 - Code:

	kill reader
	;
	set file="C:\_jasper\basicTemplate.jrxml"
	;
	set reader=##class(%XML.Reader).%New()
	set reader.SSLConfiguration=("SSLPadraoCSW")
	set reader.SAXFlags=$$$SAXVALIDATIONSCHEMAFULLCHECKING
	;
	set schemaComp="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd"
	set schemaRoot="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd"
	Set reader.SAXSchemaSpec=schemaRoot_","_schemaComp
	;
	set status=reader.OpenFile(file)
	;
	w !,"status | "_$System.Status.DisplayError(status) ,!
	;
	do reader.CorrelateRoot("br.com.consistem.comp.jasper.jasperReport.v01.jasperReport")
	do reader.Next(.object,.status)
	;
	w !,"status | "_$System.Status.DisplayError(status) ,!

Scenario 1 error:

It roughly translates to "XML entry is not in the appropriate format for the tag ' (ending at line 4, character 440).

Checking the file where it is indicated by the error message, it is right after the xsi:schemaLocation property.


Scenario 2
Basically the same thing, but using .Correlate instead of CorrelateRoot.

	kill reader
	;
	set file="C:\_jasper\basicTemplate.jrxml"
	;
	set reader=##class(%XML.Reader).%New()
	set reader.SSLConfiguration=("SSLPadraoCSW")
	set reader.SAXFlags=$$$SAXVALIDATIONSCHEMAFULLCHECKING
	;
	set schemaComp="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd"
	set schemaRoot="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd"
	Set reader.SAXSchemaSpec=schemaRoot_","_schemaComp
	;
	set status=reader.OpenFile(file)
	;
	w !,"status | "_$System.Status.DisplayError(status) ,!
	;
	do reader.Correlate("jasperReport","br.com.consistem.comp.jasper.jasperReport.v01.jasperReport")
	do reader.Next(.object,.status)
	;
	w !,"status | "_$System.Status.DisplayError(status) ,!

This prompts no error on the openFile or Correlate, but it doesn't correlate to anything. Checking the .Next method, I found that it iterates through several i%Node, but is unable to set the "element" and "type" variable.

So it doesn't populate any oref.

Scenario 3

If I remove the set reader.SAXFlags=$$$SAXVALIDATIONSCHEMAFULLCHECKING flag, I'm able to get the same error as you did, on the OpenFile() method.

But this error differs from yours, and the correlate continues to not generate an object.

Since the error happens before the correlate method is called, so I don't see how this relates to the method you used to find and fix the missing configurations on the classes.

Also, if I try to add a property called "table" on any class, it prompts an error informing that "table" is a SQL reserved word, therefore cannot be used. So I'm not sure how you were able to "set Property table As c.table;".

Please, if you see it, enlighten me on what I'm missing.

Thank you in advance!