\\
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.
\\
{code:lang=xml}
<!-- The target name space depends on the version of the Validation component -->
<tns:validationFault xmlns:tns='http://petals.ow2.org/components/validation/version-1'>
<tns:message>The fault message.</tns:message>
<tns:validationFault>
{code}
\\
{warning}
If the operation is invalid (i.e. is neither *validate*, nor *filter*), then *filter* is the operation by default.
{warning}
h2. WSDL definitions
By default, services deployed on the Validation component do not need a WSDL.
However, as a good practice, it is better to provide it one.
The operations are known.
The only unknown is whether the input messages will be *anyType* or the *exact top element of the XML Schema*.
It is let to the choice of the user.
The output message for the operation *filter* should however be described by the XML Schema.
h2. JBI descriptor
The Service Unit descriptor file ( jbi.xml ) looks like this:
{code:lang=xml}<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
xmlns:validation="http://petals.ow2.org/components/validation/version-1"
xmlns:serviceNs="http://petals.ow2.org/simpletransformation">
<jbi:services binding-component="false">
<jbi:provides
interface-name="serviceNs:ValidationInterface"
service-name="serviceNs:ValidationService"
endpoint-name="ValidationEndpoint">
<!-- WSDL file -->
<petalsCDK:wsdl>your optional description wsdl file.wsdl</petalsCDK:wsdl>
<!-- Validation specific fields -->
<validation:schema>schema.xsd</validation:schema>
</jbi:provides>
</jbi:services>
</jbi:jbi>
{code}
\\
A JBI descriptor for an Validation service-unit can only define one _provides_ block.
\\
*Configuration of a Service Unit to expose an validation / filtering service into Petals ESB:*
|| Parameter || Description || Default || Required ||
| schema | Location of the XSD schema. This path must be a relative path from the root of the SU package. \\ | \- | Yes |
\\
{include:0 CDK SU Provide Configuration}
\\
{include:0 CDK Interceptor configuration for SU}
h2. Service-Unit content
The service unit must contain the XML Schema and the JBI descriptor (jbi.xml file).
It is also highly recommended to provide a WSDL description for this service (though it is optional).
This WSDL is not mandatory, but not providing it will prevent your service from interacting with other Petals services and components.
\\
The directory structure of a SU for the Petals-SE-Validation looks like this:
{noformat}
su-xslt-TransformationName-provide.zip
+ META-INF
- jbi.xml
+ XsltService.wsdl (recommended)
+ myfile.xsd (required)
+ myfile2.xsd (required if myfile2.xsd is imported in myfile.xsd)
{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.