Petals-SE-Validation 1.7.0+

compared with
Current by Christophe DENEUX
on Mar 19, 2020 16:31.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (33)

View Page History
{column}

{warning}This version must be installed on [Petals ESB 5.2.0|petalsesb520:Petals 5.3.0|petalsesb530:Petals ESB 5.23.0]+{warning}

{multi-excerpt-include:Petals-SE-Validation|name=features|nopanel=true}
{code}


h2. The "filter" operation

{warning}

h2. Service Unit Configuration

h2. WSDL definitions
All needed information must be defined in the service-unit JBI descriptor. This JBI descriptor is configured through parameters divided in following groups:
* *JBI parameters* that defines the service provider identification,
* *CDK parameters* that are parameters driving the service provider implementation at CDK layer,
* *CDK interceptor parameters* that are parameters driving interceptors at CDK layer,
* *Dedicated parameters* that are parameters driving the service provider implementation at component layer.

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.
{info}A JBI descriptor for an Validation service-unit can only define one _provides_ block.{info}

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.
h3. CDK parameters defining service provider implementation
The following parameters correspond to the CDK configuration of the service provider implementation.

The output message for the operation *filter* should however be described by the XML Schema.
{include:0 CDK SU Provide Configuration 5.8.0}

h2. JBI descriptor
h3. CDK parameters driving interceptors
The following parameters drive interceptors at CDK layer.

The Service Unit descriptor file ( jbi.xml ) looks like this:
{include:0 CDK SU Interceptor configuration 5.8.0}

h3. Dedicated configuration
The following parameters correspond to the component specific configuration of the service provider implementation.

{table-plus}
|| Parameter || Description || Default || Required ||
| schema | Location of the XSD schema. This path must be a relative path from the root of the SU package. | {center}\-{center} | {center}Yes{center} |
{table-plus}

h3. Service unit content

The service unit has to contain the following elements, packaged in the archive:
* the META-INF/jbi.xml descriptor file as described above,
* it is also highly recommended to provide a WSDL description for service provider embedded in the service-unit. The service provider contract must implement the interface "\{http://petals.ow2.org/components/validation/version-1}ValidationInterface" defined in the abstract WSDL 'ValidationInterface.wsdl' available as resource in the component archive,
* the XML Schema files.

{noformat}
su-xslt-TransformationName-provide.zip
+ META-INF
- jbi.xml (as defined above)
- XsltService.wsdl (recommended)
- myfile.xsd (required)
- myfile2.xsd (required if myfile2.xsd is imported in myfile.xsd)
{noformat}

h3. Example

An example of a Service Unit descriptor to provide an validation service:

{code:lang=xml}
{code:lang=xml}<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<jbi:services binding-component="false">
<jbi:provides
interface-name="serviceNs:ValidationInterface" interface-name="validation:ValidationInterface"
service-name="serviceNs:ValidationService"
endpoint-name="ValidationEndpoint">
{code}

A JBI descriptor for an Validation service-unit can only define one _provides_ block.

{include:0 CDK SU Provide Configuration 5.7.0}

{center}*Configuration of a Service Unit to provide a service (Validation)*{center}
{table-plus}
|| Parameter || Description || Default || Required ||
| schema | Location of the XSD schema. This path must be a relative path from the root of the SU package. | {center}\-{center} | {center}Yes{center} |
{table-plus}
{include:0 CDK SU Interceptor configuration}

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">
The component can be configured through the parameters of its JBI descriptor file. These parameters are divided in following groups:
* *JBI parameters* that have not to be changed otherwise the component will not work,
* *CDK parameters* that are parameters driving the processing of the CDK layer,
* *Dedicated parameters* that are parameters specific to this component.

<component type="service-engine">
<identification>
<name>petals-se-validation</name>
<description>A VALIDATION Service Engine</description>
</identification>
{note}Caution: The component requires the right JDBC Shared Libraries to communicate with your databases. Please install first valid Shared Libraries containing your database JDBC drivers. Then you can configure your component by using PETALS Maven plugin with the goal {{jbi:configure}} or the PETALS Ant task {{petals-configure-component}}.{note}

<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>
h2. CDK parameters
The component configuration includes the configuration of the CDK. The following parameters correspond to the CDK configuration.

<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}
{include:0 CDK Component Configuration Table 5.8.0}

The component configuration includes the configuration of the CDK. The following parameters correspond to the CDK configuration.
h2. Interception configuration
{include:0 CDK Component Interceptor configuration 5.8.0}

{include:0 CDK Component Configuration Table 5.6.0}
{include:0 CDK Parameter scope}
{include:0 CDK Component Interceptor configuration}
h2. Dedicated configuration

This component does not have any specific configuration parameter.
No dedicated configuration parameter is available.

h1. Business monitoring
h3. Common metrics

{include:0 CDK Component Monitoring Metrics 5.68.0}

h3. Dedicated metrics