xsd validation

XSD Validator

Version: 17.07

Supported Since: 17.01

What is an XSD Validator?

An XSD Validator is a processing element which accepts a message with an XML payload and validates that payload against one or more XSD schemas provided.

In order to use this processing element, you must first select the Message Validation dependency from the processor list when you are creating an empty Ultra project. If you have already created a project, you can add this dependency via Component Registry. From Tools menu, select Ultra Studio → Component Registry and from the Processors list, select the Message Validation dependency.

xsd validation outports

Out Ports

On Successful Validation

The message will be sent to this outport if the XSD validation is successful

On Failed Validation

The message will be sent to this outport if the XSD validation is failed

Parameters

XSD file paths *

Basic

Select all the XSD schema files to be used for the validation or specify their paths as a comma separated list.

XPath expression

Basic

If it is required to validate only a specific XML node, an optional XPath expression can be specified as the value of this parameter to select that node

Namespaces

Basic

If any custom namespaces are being used inside XPath expression, those should be defined as a map with those namespaces as keys and the corresponding namespace URIs as values.

This XSD Validator processing element maintains a pool of validators to reduce the performance overhead of creating a new validator for each message. The following parameters are related to that validator pool.

Minimum idle instances

Validator Pool Configuration

This parameter specifies the minimum number of idle validator instances to be maintained in the pool. This value should be positive and the default value is 1.

If this value is greater than the configured Maximum idle instances value, that value will be used instead.

Maximum idle instances

Validator Pool Configuration

This parameter specifies the maximum number of idle validator instances to be maintained in the pool. Use a negative value to indicate an unlimited number of idle instances. The default value is 5.

Total instances

Validator Pool Configuration

This parameter specifies the total number of validator instances managed by the pool at a given time. Specifying a negative values indicates that there is no limit to the number of validators allocated by the pool. The default value is 5.

Sample Use Case

In the following use case, the requirement is to read a message with an XML payload from a JMS queue and validates that message payload against an XSD schema. Then if the validation is successful, the message should be sent to JMS queue 1 or if the validation is failed, it should be sent to JMS queue 2.

xsd validator flow

In this flow, the "Processor" outport of JMS ingress connector is connected to the inport of the XSD Validator so that the JMS message received by the connector is handed over to the validator next. If the message payload validation is successful, the message context will be sent to the "On Successful Validation" outport, which is connected to the 1st JMS egress connector. If the message payload validation is failed, the message context will be sent to the "On Failed Validation" outport, which is connected to the 2nd JMS egress connector.

In this topic
In this topic
Contact Us