3. Security and Validation

validator

Version

Syntax

validator:
'$ref': <string>
failureHandler: <string>
jsonSchema: <string>
schema: <string>
schemaMappings: {}
schematron: <string>
schemaVersion: <string>
serviceName: <string>
skipFaults: <boolean>
wsdl: <string>
validator:
  '$ref': <string>
  failureHandler: <string>
  jsonSchema: <string>
  schema: <string>
  schemaMappings: {}
  schematron: <string>
  schemaVersion: <string>
  serviceName: <string>
  skipFaults: <boolean>
  wsdl: <string>

Sample

<serviceProxy port="8080">
<validator wsdl="http://www.predic8.com:8080/material/ArticleService?wsdl" />
</serviceProxy><serviceProxy port="8080">
<request>
<validator schema="http://www.predic8.com/schemas/order.xsd" />
</request>
<response>
<validator schema="http://www.predic8.com/schemas/confirm.xsd" />
</response>
</serviceProxy><serviceProxy port="8080">
<request>
<validator
schema="examples/validation/schematron/car-schematron.xml"
failureHandler="log" />

</request>
</serviceProxy>
<serviceProxy port="8080">
  <validator wsdl="http://www.predic8.com:8080/material/ArticleService?wsdl" />
</serviceProxy><serviceProxy port="8080">
  <request>
	<validator schema="http://www.predic8.com/schemas/order.xsd" />
  </request>
  <response>
	<validator schema="http://www.predic8.com/schemas/confirm.xsd" />
  </response>
</serviceProxy><serviceProxy port="8080">
  <request>
	<validator
	  schema="examples/validation/schematron/car-schematron.xml"
	  failureHandler="log" />
  </request>
</serviceProxy>

Attributes

NameRequiredDefaultDescriptionExamples
$reffalse-Reference a component defined under components.-
failureHandlerfalseresponseIf "response", the HTTP response will include a detailled error message. If "log", the response will be generic and the validation error will be logged.log
jsonSchemafalse-The JSON Schema (URL or file) to validate against.examples/validation/json-schema/schema2000.json
schemafalse-The XSD Schema (URL or file) to validate against.http://www.predic8.com/schemas/order.xsd
schematronfalse-The Schematron schema (URL or file) to validate against.examples/validation/schematron/car-schematron.xml
schemaVersionfalse2020-12The version of the Schema.04, 05, 06, 07, 2019-09, 2020-12
serviceNamefalse-Optional name of a serivce element in a WSDL. If specified it will be checked if the SOAP element is possible for that service.-
skipFaultsfalsefalseWhether to skip validation for SOAP fault messages.-
wsdlfalse-The WSDL (URL or file) to validate against."http://predic8.com:8080/material/ArticleService?wsdl

Child Structure

ElementCardinalityDescription
schemaMappings0..1

Can be used in