This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new bfff669 Regen bfff669 is described below commit bfff66908b32bd1252b197388001bbd87619a049 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Thu Jan 24 16:19:58 2019 +0100 Regen --- camel-core/readme.adoc | 7 +- components/readme.adoc | 78 +------------ docs/components/modules/ROOT/nav.adoc | 1 + .../modules/ROOT/pages/validator-component.adoc | 123 +++++++++++++++++++++ 4 files changed, 130 insertions(+), 79 deletions(-) diff --git a/camel-core/readme.adoc b/camel-core/readme.adoc index ab30c0d..d53fd09 100644 --- a/camel-core/readme.adoc +++ b/camel-core/readme.adoc @@ -5,7 +5,7 @@ // components: START -Number of Components: 9 in 1 JAR artifacts (0 deprecated) +Number of Components: 8 in 1 JAR artifacts (0 deprecated) [width="100%",cols="4,1,5",options="header"] |=== @@ -32,9 +32,6 @@ Number of Components: 9 in 1 JAR artifacts (0 deprecated) | link:src/main/docs/test-component.adoc[Test] (camel-core) + `test:name` | 1.3 | The test component extends the mock component by on startup to pull messages from another endpoint to set the expected message bodies. -| link:src/main/docs/validator-component.adoc[Validator] (camel-core) + -`validator:resourceUri` | 1.1 | Validates the payload of a message using XML Schema and JAXP Validation. - | link:src/main/docs/xslt-component.adoc[XSLT] (camel-core) + `xslt:resourceUri` | 1.3 | Transforms the message using a XSLT template. @@ -53,7 +50,7 @@ Number of Components: 9 in 1 JAR artifacts (0 deprecated) // dataformats: START -Number of Data Formats: 4 in 35 JAR artifacts (0 deprecated) +Number of Data Formats: 4 in 7 JAR artifacts (0 deprecated) [width="100%",cols="4,1,5",options="header"] |=== diff --git a/components/readme.adoc b/components/readme.adoc index b05f894..2937945 100644 --- a/components/readme.adoc +++ b/components/readme.adoc @@ -1,7 +1,7 @@ ==== Components // components: START -Number of Components: 289 in 207 JAR artifacts (0 deprecated) +Number of Components: 289 in 208 JAR artifacts (0 deprecated) [width="100%",cols="4,1,5",options="header"] |=== @@ -826,7 +826,7 @@ Number of Components: 289 in 207 JAR artifacts (0 deprecated) | link:camel-undertow/src/main/docs/undertow-component.adoc[Undertow] (camel-undertow) + `undertow:httpURI` | 2.16 | The undertow component provides HTTP and WebSocket based endpoints for consuming and producing HTTP/WebSocket requests. -| link:../camel-core/src/main/docs/validator-component.adoc[Validator] (camel-core) + +| link:camel-validator/src/main/docs/validator-component.adoc[Validator] (camel-validator) + `validator:resourceUri` | 1.1 | Validates the payload of a message using XML Schema and JAXP Validation. | link:camel-velocity/src/main/docs/velocity-component.adoc[Velocity] (camel-velocity) + @@ -881,101 +881,33 @@ Number of Components: 289 in 207 JAR artifacts (0 deprecated) ==== Data Formats // dataformats: START -Number of Data Formats: 45 in 35 JAR artifacts (0 deprecated) +Number of Data Formats: 11 in 7 JAR artifacts (0 deprecated) [width="100%",cols="4,1,5",options="header"] |=== | Data Format | Available From | Description -| link:camel-asn1/src/main/docs/asn1-dataformat.adoc[ASN.1 File] (camel-asn1) | 2.20 | The ASN.1 data format is used for file transfer with telecommunications protocols. - -| link:camel-avro/src/main/docs/avro-dataformat.adoc[Avro] (camel-avro) | 2.14 | The Avro data format is used for serialization and deserialization of messages using Apache Avro binary dataformat. - -| link:camel-barcode/src/main/docs/barcode-dataformat.adoc[Barcode] (camel-barcode) | 2.14 | The Barcode data format is used for creating barccode images (such as QR-Code) - -| link:camel-base64/src/main/docs/base64-dataformat.adoc[Base64] (camel-base64) | 2.11 | The Base64 data format is used for base64 encoding and decoding. - -| link:camel-beanio/src/main/docs/beanio-dataformat.adoc[BeanIO] (camel-beanio) | 2.10 | The BeanIO data format is used for working with flat payloads (such as CSV, delimited, or fixed length formats). - -| link:camel-bindy/src/main/docs/bindy-dataformat.adoc[Bindy CSV] (camel-bindy) | 2.0 | The Bindy data format is used for working with flat payloads (such as CSV, delimited, fixed length formats, or FIX messages). - -| link:camel-bindy/src/main/docs/bindy-dataformat.adoc[Bindy Fixed Length] (camel-bindy) | 2.0 | The Bindy data format is used for working with flat payloads (such as CSV, delimited, fixed length formats, or FIX messages). - -| link:camel-bindy/src/main/docs/bindy-dataformat.adoc[Bindy Key Value Pair] (camel-bindy) | 2.0 | The Bindy data format is used for working with flat payloads (such as CSV, delimited, fixed length formats, or FIX messages). - -| link:camel-boon/src/main/docs/boon-dataformat.adoc[Boon] (camel-boon) | 2.16 | Boon data format is used for unmarshal a JSon payload to POJO or to marshal POJO back to JSon payload. - -| link:camel-crypto/src/main/docs/crypto-dataformat.adoc[Crypto (Java Cryptographic Extension)] (camel-crypto) | 2.3 | Crypto data format is used for encrypting and decrypting of messages using Java Cryptographic Extension. - -| link:camel-csv/src/main/docs/csv-dataformat.adoc[CSV] (camel-csv) | 1.3 | The CSV data format is used for handling CSV payloads. - -| link:camel-fhir/camel-fhir-component/src/main/docs/fhirJson-dataformat.adoc[FHIR JSon] (camel-fhir) | 2.21 | The FHIR JSon data format is used to marshall/unmarshall to/from FHIR objects to/from JSON. - -| link:camel-fhir/camel-fhir-component/src/main/docs/fhirXml-dataformat.adoc[FHIR XML] (camel-fhir) | 2.21 | The FHIR XML data format is used to marshall/unmarshall from/to FHIR objects to/from XML. - | link:camel-flatpack/src/main/docs/flatpack-dataformat.adoc[Flatpack] (camel-flatpack) | 2.1 | The Flatpack data format is used for working with flat payloads (such as CSV, delimited, or fixed length formats). | link:../camel-core/src/main/docs/gzip-dataformat.adoc[GZip] (camel-core) | 2.0 | The GZip data format is a message compression and de-compression format (which works with the popular gzip/gunzip tools). | link:camel-hl7/src/main/docs/hl7-dataformat.adoc[HL7] (camel-hl7) | 2.0 | The HL7 data format can be used to marshal or unmarshal HL7 (Health Care) model objects. -| link:camel-ical/src/main/docs/ical-dataformat.adoc[iCal] (camel-ical) | 2.12 | The iCal dataformat is used for working with iCalendar messages. - -| link:camel-jacksonxml/src/main/docs/jacksonxml-dataformat.adoc[JacksonXML] (camel-jacksonxml) | 2.16 | JacksonXML data format is used for unmarshal a XML payload to POJO or to marshal POJO back to XML payload. - | link:../camel-core/src/main/docs/serialization-dataformat.adoc[Java Object Serialization] (camel-core) | 2.12 | Serialization is a data format which uses the standard Java Serialization mechanism to unmarshal a binary payload into Java objects or to marshal Java objects into a binary blob. | link:camel-jaxb/src/main/docs/jaxb-dataformat.adoc[JAXB] (camel-jaxb) | 1.0 | JAXB data format uses the JAXB2 XML marshalling standard to unmarshal an XML payload into Java objects or to marshal Java objects into an XML payload. -| link:camel-jibx/src/main/docs/jibx-dataformat.adoc[JiBX] (camel-jibx) | 2.6 | JiBX data format is used for unmarshal a XML payload to POJO or to marshal POJO back to XML payload. - -| link:camel-fastjson/src/main/docs/json-fastjson-dataformat.adoc[JSon Fastjson] (camel-fastjson) | 2.20 | JSon data format is used for unmarshal a JSon payload to POJO or to marshal POJO back to JSon payload. - -| link:camel-gson/src/main/docs/json-gson-dataformat.adoc[JSon GSon] (camel-gson) | 2.10 | JSon data format is used for unmarshal a JSon payload to POJO or to marshal POJO back to JSon payload. - -| link:camel-jackson/src/main/docs/json-jackson-dataformat.adoc[JSon Jackson] (camel-jackson) | 2.0 | JSon data format is used for unmarshal a JSon payload to POJO or to marshal POJO back to JSon payload. - -| link:camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc[JSon Johnzon] (camel-johnzon) | 2.18 | JSon data format is used for unmarshal a JSon payload to POJO or to marshal POJO back to JSon payload. - | link:camel-xstream/src/main/docs/json-xstream-dataformat.adoc[JSon XStream] (camel-xstream) | 2.0 | JSon data format is used for unmarshal a JSon payload to POJO or to marshal POJO back to JSon payload. -| link:camel-lzf/src/main/docs/lzf-dataformat.adoc[LZF Deflate Compression] (camel-lzf) | 2.17 | The LZF data format is a message compression and de-compression format (uses the LZF deflate algorithm). - -| link:camel-mail/src/main/docs/mime-multipart-dataformat.adoc[MIME Multipart] (camel-mail) | 2.17 | The MIME Multipart data format can marshal a Camel message with attachments into a Camel message having a MIME-Multipart message as message body (and no attachments), and vise-versa when unmarshalling. - -| link:camel-crypto/src/main/docs/pgp-dataformat.adoc[PGP] (camel-crypto) | 2.9 | PGP data format is used for encrypting and decrypting of messages using Java Cryptographic Extension and PGP. - -| link:camel-protobuf/src/main/docs/protobuf-dataformat.adoc[Protobuf] (camel-protobuf) | 2.2 | The Protobuf data format is used for serializing between Java objects and the Google Protobuf protocol. - -| link:camel-rss/src/main/docs/rss-dataformat.adoc[RSS] (camel-rss) | 2.1 | RSS data format is used for working with RSS sync feed Java Objects and transforming to XML and vice-versa. - -| link:camel-soap/src/main/docs/soapjaxb-dataformat.adoc[SOAP] (camel-soap) | 2.3 | SOAP is a data format which uses JAXB2 and JAX-WS annotations to marshal and unmarshal SOAP payloads. - | link:../camel-core/src/main/docs/string-dataformat.adoc[String Encoding] (camel-core) | 2.12 | String data format is a textual based format that supports character encoding. -| link:camel-syslog/src/main/docs/syslog-dataformat.adoc[Syslog] (camel-syslog) | 2.6 | The Syslog dataformat is used for working with RFC3164 and RFC5424 messages (logging and monitoring). - | link:camel-tarfile/src/main/docs/tarfile-dataformat.adoc[Tar File] (camel-tarfile) | 2.16 | The Tar File data format is a message compression and de-compression format of tar files. -| link:camel-thrift/src/main/docs/thrift-dataformat.adoc[Thrift] (camel-thrift) | 2.20 | The Thrift data format is used for serialization and deserialization of messages using Apache Thrift binary dataformat. - -| link:camel-tagsoup/src/main/docs/tidyMarkup-dataformat.adoc[TidyMarkup] (camel-tagsoup) | 2.0 | TidyMarkup data format is used for parsing HTML and return it as pretty well-formed HTML. - -| link:camel-univocity-parsers/src/main/docs/univocity-csv-dataformat.adoc[uniVocity CSV] (camel-univocity-parsers) | 2.15 | The uniVocity CSV data format is used for working with CSV (Comma Separated Values) flat payloads. - -| link:camel-univocity-parsers/src/main/docs/univocity-fixed-dataformat.adoc[uniVocity Fixed Length] (camel-univocity-parsers) | 2.15 | The uniVocity Fixed Length data format is used for working with fixed length flat payloads. - -| link:camel-univocity-parsers/src/main/docs/univocity-tsv-dataformat.adoc[uniVocity TSV] (camel-univocity-parsers) | 2.15 | The uniVocity TSV data format is used for working with TSV (Tabular Separated Values) flat payloads. - | link:camel-xmlsecurity/src/main/docs/secureXML-dataformat.adoc[XML Security] (camel-xmlsecurity) | 2.0 | The XML Security data format facilitates encryption and decryption of XML payloads. | link:camel-xstream/src/main/docs/xstream-dataformat.adoc[XStream] (camel-xstream) | 1.3 | XSTream data format is used for unmarshal a XML payload to POJO or to marshal POJO back to XML payload. -| link:camel-snakeyaml/src/main/docs/yaml-snakeyaml-dataformat.adoc[YAML SnakeYAML] (camel-snakeyaml) | 2.17 | YAML is a data format to marshal and unmarshal Java objects to and from YAML. - | link:../camel-core/src/main/docs/zip-dataformat.adoc[Zip Deflate Compression] (camel-core) | 2.12 | Zip Deflate Compression data format is a message compression and de-compression format (not zip files). - -| link:camel-zipfile/src/main/docs/zipfile-dataformat.adoc[Zip File] (camel-zipfile) | 2.11 | The Zip File data format is a message compression and de-compression format of zip files. |=== // dataformats: END @@ -983,7 +915,7 @@ Number of Data Formats: 45 in 35 JAR artifacts (0 deprecated) ==== Expression Languages // languages: START -Number of Languages: 18 in 9 JAR artifacts (1 deprecated) +Number of Languages: 17 in 8 JAR artifacts (1 deprecated) [width="100%",cols="4,1,5",options="header"] |=== @@ -997,8 +929,6 @@ Number of Languages: 18 in 9 JAR artifacts (1 deprecated) | link:../camel-core/src/main/docs/file-language.adoc[File] (camel-core) | 1.1 | For expressions and predicates using the file/simple language -| link:camel-groovy/src/main/docs/groovy-language.adoc[Groovy] (camel-groovy) | 1.3 | To use Groovy scripts in Camel expressions or predicates. - | link:../camel-core/src/main/docs/header-language.adoc[Header] (camel-core) | 1.5 | To use a Camel Message header in expressions or predicates. | link:camel-hl7/src/main/docs/terser-language.adoc[HL7 Terser] (camel-hl7) | 2.11 | To use HL7 terser scripts in Camel expressions or predicates. diff --git a/docs/components/modules/ROOT/nav.adoc b/docs/components/modules/ROOT/nav.adoc index c83063c..45fa5a3 100644 --- a/docs/components/modules/ROOT/nav.adoc +++ b/docs/components/modules/ROOT/nav.adoc @@ -338,6 +338,7 @@ * xref:univocity-csv-dataformat.adoc[uniVocity CSV DataFormat] * xref:univocity-fixed-dataformat.adoc[uniVocity Fixed Length DataFormat] * xref:univocity-tsv-dataformat.adoc[uniVocity TSV DataFormat] +* xref:validator-component.adoc[Validator Component] * xref:velocity-component.adoc[Velocity Component] * xref:vertx-component.adoc[Vert.x Component] * xref:vm-component.adoc[VM Component] diff --git a/docs/components/modules/ROOT/pages/validator-component.adoc b/docs/components/modules/ROOT/pages/validator-component.adoc new file mode 100644 index 0000000..41004cf --- /dev/null +++ b/docs/components/modules/ROOT/pages/validator-component.adoc @@ -0,0 +1,123 @@ +[[validator-component]] +== Validator Component + +*Available as of Camel version 1.1* + +The Validation component performs XML validation of the message body +using the JAXP Validation API and based on any of the supported XML +schema languages, which defaults to http://www.w3.org/XML/Schema[XML +Schema] + +Note that the <<jing-component,Jing>> component also supports the following +useful schema languages: + +* http://relaxng.org/compact-tutorial-20030326.html[RelaxNG Compact +Syntax] +* http://relaxng.org/[RelaxNG XML Syntax] + +The <<msv-component,MSV>> component also supports +http://relaxng.org/[RelaxNG XML Syntax]. + +=== URI format + +[source] +---- +validator:someLocalOrRemoteResource +---- + +Where *someLocalOrRemoteResource* is some URL to a local resource on the +classpath or a full URL to a remote resource or resource on the file +system which contains the XSD to validate against. For example: + +* `msv:org/foo/bar.xsd` +* `msv:file:../foo/bar.xsd` +* `msv:http://acme.com/cheese.xsd` +* `validator:com/mypackage/myschema.xsd` + +Maven users will need to add the following dependency to their `pom.xml` +for this component when using *Camel 2.8* or older: + +[source,xml] +---- +<dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-spring</artifactId> + <version>x.x.x</version> + <!-- use the same version as your Camel core version --> +</dependency> +---- + +From Camel 2.9 onwards the Validation component is +provided directly in the camel-core. + +=== Options + +// component options: START +The Validator component supports 2 options, which are listed below. + + + +[width="100%",cols="2,5,^1,2",options="header"] +|=== +| Name | Description | Default | Type +| *resourceResolverFactory* (advanced) | To use a custom LSResourceResolver which depends on a dynamic endpoint resource URI | | ValidatorResource ResolverFactory +| *resolveProperty Placeholders* (advanced) | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. | true | boolean +|=== +// component options: END + + +// endpoint options: START +The Validator endpoint is configured using URI syntax: + +---- +validator:resourceUri +---- + +with the following path and query parameters: + +==== Path Parameters (1 parameters): + + +[width="100%",cols="2,5,^1,2",options="header"] +|=== +| Name | Description | Default | Type +| *resourceUri* | *Required* URL to a local resource on the classpath,or a reference to lookup a bean in the Registry, or a full URL to a remote resource or resource on the file system which contains the XSD to validate against. | | String +|=== + + +==== Query Parameters (10 parameters): + + +[width="100%",cols="2,5,^1,2",options="header"] +|=== +| Name | Description | Default | Type +| *failOnNullBody* (producer) | Whether to fail if no body exists. | true | boolean +| *failOnNullHeader* (producer) | Whether to fail if no header exists when validating against a header. | true | boolean +| *headerName* (producer) | To validate against a header instead of the message body. | | String +| *errorHandler* (advanced) | To use a custom org.apache.camel.processor.validation.ValidatorErrorHandler. The default error handler captures the errors and throws an exception. | | ValidatorErrorHandler +| *resourceResolver* (advanced) | To use a custom LSResourceResolver. See also setResourceResolverFactory(ValidatorResourceResolverFactory) | | LSResourceResolver +| *resourceResolverFactory* (advanced) | For creating a resource resolver which depends on the endpoint resource URI. Must not be used in combination with method setResourceResolver(LSResourceResolver). If not set then DefaultValidatorResourceResolverFactory is used | | ValidatorResource ResolverFactory +| *schemaFactory* (advanced) | To use a custom javax.xml.validation.SchemaFactory | | SchemaFactory +| *schemaLanguage* (advanced) | Configures the W3C XML Schema Namespace URI. | http://www.w3.org/2001/XMLSchema | String +| *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean +| *useSharedSchema* (advanced) | Whether the Schema instance should be shared or not. This option is introduced to work around a JDK 1.6.x bug. Xerces should not have this issue. | true | boolean +|=== +// endpoint options: END + + +=== Example + +The following +https://github.com/apache/camel/blob/master/components/camel-spring/src/test/resources/org/apache/camel/component/validator/camelContext.xml[example] +shows how to configure a route from endpoint *direct:start* which then +goes to one of two endpoints, either *mock:valid* or *mock:invalid* +based on whether or not the XML matches the given schema (which is +supplied on the classpath). + +=== Advanced: JMX method clearCachedSchema + +Since *Camel 2.17*, you can force that the cached schema in the +validator endpoint is cleared and reread with the next process call with +the JMX operation `clearCachedSchema. `You can also use this method to +programmatically clear the cache. This method is available on the +`ValidatorEndpoint `class`.`