EagleML Validation Stream

EagleML Validation stream allows the user to check if the content and structure of certain EagleML data files follow the EagleML XSD.

In this page

Getting Ready to Validate

1. First of all, copy/move the EagleML files you want to test to a folder in the environment you are going to use.

2. Make up a control message to start validation

 Click to see an example of CM
<EagleML
 xmlns="http://www.eagleinvsys.com/2011/EagleML-2-0"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:type="RunTaskRequest"
 eaglemlVersion="2-0"
 xsi:schemaLocation="http://www.eagleinvsys.com/2011/EagleML-2-0 eagleml-main-2-0.xsd"
 eaglemlType="RunTaskRequest">
	<header>
		<messageId>B80KIP64IJ7WGOQX</messageId>
		<sentBy>http://www.eagleinvsys.com</sentBy>
		<sendTo>http://www.eagleinvsys.com</sendTo>
	</header>
	<taskIdentifier>
		<correlationId>XSD_validation</correlationId>
		<businessTaskId>XSD_VALIDATION</businessTaskId>
		<sequenceNumber/>
	</taskIdentifier>
	<taskTypeEnum>LOAD</taskTypeEnum>
	<synchronousExecution>no</synchronousExecution>
	<taskParameters>
		<taskParameter>
			<name>StreamName</name>
			<dataType>S</dataType>
			<value>eagle_ml-2-0_default_cm_validate_by_xsd</value>
		</taskParameter>
		<taskParameter>
			<name>XSDValidationType</name>
			<dataType>S</dataType>
			<value>SAX</value>
		</taskParameter>	
		<taskParameter>
			<name>SourceFolder</name>
			<dataType>S</dataType>
			<value>data/msgcenter/mytest/myfiles/</value>
		</taskParameter>		
	</taskParameters>
</EagleML>

3. Check available options and configure your CM

Parameter Name

Required/
Optional

Valid ValuesExample of UseComment
StreamName  Requiredeagle_ml-2-0_default_cm_validate_by_xsdStream used for validation
XSDValidationTypeRequiredXMLLINT, SAX, ALLSAXValidation type, XMLLINT, SAX or both
SourceFolderRequiredrelative pathdata/msgcenter/mytest/myfiles/Path to the folder with files to be validated
XSDShemaPathOptionalrelative pathdata/msgcenter/mytest/myXSD/Path to the folder with a custom XML schema in case you do not want to use default environment schema

4. Send the CM to eagle_ml-2-0_default_cm_control_message stream

Understanding Validation Results

When validation is complete, you can check its results right in the console

There is also a detailed report generated in the cmw_staging_folder folder, we highly recommend referring to it even if console information seems sufficient.

 Example of validation log (click to expand):
==========XMLLINT Validator log=========:
List of valid files:

Full Validation Log:
EXTRACT-WH_005_Trade_Long_Insert.xml.xml:30: element entityXref_1: Schemas validity error : Element '{http://www.eagleinvsys.com/2011/EagleML-2-0}entityXref_1': This element is not expected. Expected is ( {http://www.eagleinvsys.com/2011/EagleML-2-0}entityXref ).
EXTRACT-WH_005_Trade_Long_Insert.xml.xml:187: element checkedDate: Schemas validity error : Element '{http://www.eagleinvsys.com/2011/EagleML-2-0}checkedDate': '2015-02-18' is not a valid value of the atomic type 'xs:dateTime'.
EXTRACT-WH_005_Trade_Long_Insert.xml.xml:188: element instructedDate: Schemas validity error : Element '{http://www.eagleinvsys.com/2011/EagleML-2-0}instructedDate': '2015-02-25' is not a valid value of the atomic type 'xs:dateTime'.
EXTRACT-WH_005_Trade_Long_Insert.xml.xml:194: element authorizedDate: Schemas validity error : Element '{http://www.eagleinvsys.com/2011/EagleML-2-0}authorizedDate': '2015-02-25' is not a valid value of the atomic type 'xs:dateTime'.
EXTRACT-WH_005_Trade_Long_Insert.xml.xml:205: element preparedDate: Schemas validity error : Element '{http://www.eagleinvsys.com/2011/EagleML-2-0}preparedDate': '2015-02-25' is not a valid value of the atomic type 'xs:dateTime'.
EXTRACT-WH_005_Trade_Long_Insert.xml.xml fails to validate

==========SAX Validator log=========:
List of valid files:

Full Validation Log:
Validation file:/home0/myENV/eagle/estar/tpe/data/msgcenter/mytest/EXTRACT-WH_005_Trade_Long_Insert.xml.xml-Fail
SAX Exception: cvc-complex-type.2.4.a: Invalid content was found starting with element 'entityXref_1'. One of '{"http://www.eagleinvsys.com/2011/EagleML-2-0":entityXref}' is expected.
SAX Exception: cvc-datatype-valid.1.2.1: '2015-02-18' is not a valid value for 'dateTime'.
SAX Exception: cvc-type.3.1.3: The value '2015-02-18' of element 'checkedDate' is not valid.
SAX Exception: cvc-datatype-valid.1.2.1: '2015-02-25' is not a valid value for 'dateTime'.
SAX Exception: cvc-type.3.1.3: The value '2015-02-25' of element 'instructedDate' is not valid.
SAX Exception: cvc-datatype-valid.1.2.1: '2015-02-25' is not a valid value for 'dateTime'.
SAX Exception: cvc-type.3.1.3: The value '2015-02-25' of element 'authorizedDate' is not valid.
SAX Exception: cvc-datatype-valid.1.2.1: '2015-02-25' is not a valid value for 'dateTime'.
SAX Exception: cvc-type.3.1.3: The value '2015-02-25' of element 'preparedDate' is not valid.