|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (30)
View Page History...
This component only acts as service provider, not as a service consumer.
In fact, it provides a validation / filtering service (the filtering relies on the validity of the message against the XML Schema).
In fact, it provides a validation / filtering service (the filtering relies on the validity of the message against the XML Schema).
{column}
...
h1. Recommended usage
\\
{tip}
The Validation component may be used before calling a critical service.
It allows to make sure the message to send has the right shape.
For some services, this can be useless. For some others though, it can be critical to perform this check.
It allows to make sure the message to send has the right shape.
For some services, this can be useless. For some others though, it can be critical to perform this check.
{tip}
h2. A typical example
\\
One typical example would be a service converting the received message as data and manipulating it then (e.g. to insert it into a database).
In Petals ESB, that would concern the Petals-BC-SQL component or even the Petals-SE-Talend component.
In Petals ESB, that would concern the Petals-BC-SQL component or even the Petals-SE-Talend component.
...
h1. Miscellaneous information
h2. Validation and chaining services
...
h2. Supported operations
h2. Limitations
The Validation component supports two operations.
Configurations for this component cannot be used as a proxy to call other services.
Neither to validate attached, nor to intercept and validate messages on the fly.
Interceptors would better fit this kind of use case.
Neither to validate attached, nor to intercept and validate messages on the fly.
Interceptors would better fit this kind of use case.
h3. The "validate" operation
\\
The validated / filtered content is always the payload from the input message.
The validated / filtered content is always the payload from the input message.
*validate* validates the received message against the XML Schema embedded in the service-unit.
If the message is valid, the returned message is
If the message is valid, the returned message is
h1. Creating a XML Validation service (Provides mode)
Each Validation service runs on the Petals Validation component.
The Petals Validation component has native operations to invoke. These operations are inherited by the Validation services.
A Validation service cannot add additional operations. It only has the ones of the XSLT component.
The version 1.1 of the Petals Validation component exposes two operations.
* *validate*: the received message is validated against a XML-Schema. The service returns a boolean response indicating if the message is valid.
* *filter*: the received message is validated against a XML-Schema. If the message is valid, this same message is returned. Otherwise, a fault is raised.
h2. The "validate" operation
The fully qualified name of this operation is:
* *Name space URI:* http://petals.ow2.org/components/validation/version-1
* *Local part:* validate
\\
This operation only supports the *InOut* message exchange pattern (MEP).
When invoking this operation, you must call it using its fully qualified name.
\\
Here is the execution flow for this operation:
# The received message is validated against the XML-Schema embedded by the service.
# The validation response is wrapped into a message and sent back.
\\
More precisely, if the message is valid, the returned message is
Each Validation service runs on the Petals Validation component.
The Petals Validation component has native operations to invoke. These operations are inherited by the Validation services.
A Validation service cannot add additional operations. It only has the ones of the XSLT component.
The version 1.1 of the Petals Validation component exposes two operations.
* *validate*: the received message is validated against a XML-Schema. The service returns a boolean response indicating if the message is valid.
* *filter*: the received message is validated against a XML-Schema. If the message is valid, this same message is returned. Otherwise, a fault is raised.
h2. The "validate" operation
The fully qualified name of this operation is:
* *Name space URI:* http://petals.ow2.org/components/validation/version-1
* *Local part:* validate
\\
This operation only supports the *InOut* message exchange pattern (MEP).
When invoking this operation, you must call it using its fully qualified name.
\\
Here is the execution flow for this operation:
# The received message is validated against the XML-Schema embedded by the service.
# The validation response is wrapped into a message and sent back.
\\
More precisely, if the message is valid, the returned message is
{code:lang=xml}
<!-- The target name space depends on the version of the Validation component -->
<!-- The target name space depends on the version of the Validation component -->
...
{code}
\\
The associated name space (a WSDL operation is a QName) depends on the version of the Validation component.
For the version 1.1, this name space is [http://petals.ow2.org/components/validation/version-1]
This operation only supports the *InOut* message exchange pattern.
The associated name space (a WSDL operation is a QName) depends on the version of the Validation component.
For the version 1.1, this name space is [http://petals.ow2.org/components/validation/version-1]
This operation only supports the *InOut* message exchange pattern.
h2. The "filter" operation
h3. The "filter" operation
The fully qualified name of this operation is:
* *Name space URI:* http://petals.ow2.org/components/validation/version-1
* *Local part:* filter
* *Name space URI:* http://petals.ow2.org/components/validation/version-1
* *Local part:* filter
*filter* filters the received message by validating it against the XML Schema embedded in the service-unit.
If the message is valid, then it is returned as the response.
Otherwise, a fault is raised.
If the message is valid, then it is returned as the response.
Otherwise, a fault is raised.
\\
This operation only supports the *InOut* message exchange pattern (MEP).
When invoking this operation, you must call it using its fully qualified name.
This operation only supports the *InOut* message exchange pattern (MEP).
When invoking this operation, you must call it using its fully qualified name.
\\
Here is the execution flow for this operation:
# The received message is validated against the XML-Schema embedded by the service.
# If the message is valid, this same message is sent back. Otherwise, a fault is raised.
\\
# The received message is validated against the XML-Schema embedded by the service.
# If the message is valid, this same message is sent back. Otherwise, a fault is raised.
\\
{code:lang=xml}
<!-- The target name space depends on the version of the Validation component -->
<!-- The target name space depends on the version of the Validation component -->
...
\\
The associated name space (a WSDL operation is a QName) depends on the version of the Validation component.
For the version 1.1, this name space is [http://petals.ow2.org/components/validation/version-1]
This operation only supports the *InOut* message exchange pattern.
\\
For the version 1.1, this name space is [http://petals.ow2.org/components/validation/version-1]
This operation only supports the *InOut* message exchange pattern.
\\
{warning}
If the operation is invalid (i.e. is neither *validate*, nor *filter*), then *filter* is the operation by default.
If the operation is invalid (i.e. is neither *validate*, nor *filter*), then *filter* is the operation by default.
...
h2. Validation services and WSDL interfaces
h2. WSDL definitions
By default, services deployed on the Validation component do not need a WSDL.
...
h2. Limitations
h2. JBI descriptor
Configurations for this component cannot be used as a proxy to call other services.
Neither to validate attached, nor to intercept and validate messages on the fly.
Interceptors would better fit this kind of use case.
\\
The validated / filtered content is always the payload from the input message.
h1. Component configuration
The component can be configured through its JBI descriptor file, as shown below.
{code:lang=xml}<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<jbi version="1.0"
xmlns='http://java.sun.com/xml/ns/jbi'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5">
<component type="service-engine">
<identification>
<name>petals-se-validation</name>
<description>A VALIDATION Service Engine</description>
</identification>
<component-class-name description="Validation Component class">org.ow2.petals.se.validation.ValidationComponent</component-class-name>
<component-class-path><path-element/></component-class-path>
<bootstrap-class-name>org.ow2.petals.component.framework.DefaultBootstrap</bootstrap-class-name>
<bootstrap-class-path><path-element/></bootstrap-class-path>
<petalsCDK:acceptor-pool-size>3</petalsCDK:acceptor-pool-size>
<petalsCDK:processor-pool-size>10</petalsCDK:processor-pool-size>
<petalsCDK:ignored-status>DONE_AND_ERROR_IGNORED</petalsCDK:ignored-status>
<petalsCDK:notifications>false</petalsCDK:notifications>
<petalsCDK:jbi-listener-class-name>org.ow2.petals.se.validation.listener.JBIListener</petalsCDK:jbi-listener-class-name>
</component>
</jbi>{code}
\\
The component configuration includes the configuration of the CDK. The following parameters correspond to the CDK configuration.
{include:0 CDK Component Configuration Table}
\\
This component does not have any specific configuration parameter.
\\
{warning}
The Petals-SE-Validation component can only handle messages coming from inside the bus. Therefore, you cannot specify an external-listener class-name.
{warning}
h1. Service Configuration
h2. Service Unit descriptor
Neither to validate attached, nor to intercept and validate messages on the fly.
Interceptors would better fit this kind of use case.
\\
The validated / filtered content is always the payload from the input message.
h1. Component configuration
The component can be configured through its JBI descriptor file, as shown below.
{code:lang=xml}<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<jbi version="1.0"
xmlns='http://java.sun.com/xml/ns/jbi'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5">
<component type="service-engine">
<identification>
<name>petals-se-validation</name>
<description>A VALIDATION Service Engine</description>
</identification>
<component-class-name description="Validation Component class">org.ow2.petals.se.validation.ValidationComponent</component-class-name>
<component-class-path><path-element/></component-class-path>
<bootstrap-class-name>org.ow2.petals.component.framework.DefaultBootstrap</bootstrap-class-name>
<bootstrap-class-path><path-element/></bootstrap-class-path>
<petalsCDK:acceptor-pool-size>3</petalsCDK:acceptor-pool-size>
<petalsCDK:processor-pool-size>10</petalsCDK:processor-pool-size>
<petalsCDK:ignored-status>DONE_AND_ERROR_IGNORED</petalsCDK:ignored-status>
<petalsCDK:notifications>false</petalsCDK:notifications>
<petalsCDK:jbi-listener-class-name>org.ow2.petals.se.validation.listener.JBIListener</petalsCDK:jbi-listener-class-name>
</component>
</jbi>{code}
\\
The component configuration includes the configuration of the CDK. The following parameters correspond to the CDK configuration.
{include:0 CDK Component Configuration Table}
\\
This component does not have any specific configuration parameter.
\\
{warning}
The Petals-SE-Validation component can only handle messages coming from inside the bus. Therefore, you cannot specify an external-listener class-name.
{warning}
h1. Service Configuration
h2. Service Unit descriptor
The Service Unit descriptor file ( jbi.xml ) looks like this:
{code:lang=xml}<?xml version="1.0" encoding="UTF-8"?>
{code:lang=xml}<?xml version="1.0" encoding="UTF-8"?>
...
h2. Service Unit content
h2. Service-Unit content
The service unit must contain the XML Schema and the JBI descriptor (jbi.xml file).
...
+ myfile2.xsd (required if myfile2.xsd is imported in myfile.xsd)
{noformat}
{noformat}
h1. Configuring the component
The component can be configured through its JBI descriptor file, as shown below.
{code:lang=xml}<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<jbi version="1.0"
xmlns='http://java.sun.com/xml/ns/jbi'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5">
<component type="service-engine">
<identification>
<name>petals-se-validation</name>
<description>A VALIDATION Service Engine</description>
</identification>
<component-class-name description="Validation Component class">org.ow2.petals.se.validation.ValidationComponent</component-class-name>
<component-class-path><path-element/></component-class-path>
<bootstrap-class-name>org.ow2.petals.component.framework.DefaultBootstrap</bootstrap-class-name>
<bootstrap-class-path><path-element/></bootstrap-class-path>
<petalsCDK:acceptor-pool-size>3</petalsCDK:acceptor-pool-size>
<petalsCDK:processor-pool-size>10</petalsCDK:processor-pool-size>
<petalsCDK:ignored-status>DONE_AND_ERROR_IGNORED</petalsCDK:ignored-status>
<petalsCDK:notifications>false</petalsCDK:notifications>
<petalsCDK:jbi-listener-class-name>org.ow2.petals.se.validation.listener.JBIListener</petalsCDK:jbi-listener-class-name>
</component>
</jbi>{code}
\\
The component configuration includes the configuration of the CDK. The following parameters correspond to the CDK configuration.
{include:0 CDK Component Configuration Table}
\\
This component does not have any specific configuration parameter.