Petals-BC-Filetransfer 5.1.0+

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

Changes (31)

View Page History
h2. Configuration

h3. Service Unit descriptor
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.

Example of a File Transfer Service Unit descriptor that provides a Service:
h3. CDK parameters defining service provider implementation
The following parameters correspond to the CDK configuration of the service provider implementation.

{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<!-- JBI descriptor for the PEtALS' "petals-bc-filetransfer" component (FileTransfer). -->
<jbi:jbi version="1.0"
    xmlns:filetransfer="http://petals.ow2.org/components/filetransfer/version-5"
    xmlns:jbi="http://java.sun.com/xml/ns/jbi" xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
    xmlns:generateNs="http://petals.ow2.org/filetransfer" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
{include:0 CDK SU Provide Configuration 5.8.0}

    <!--
        Import a Service into PEtALS or Expose a PEtALS Service => use a BC.
    -->
    <jbi:services binding-component="true">
h3. CDK parameters driving interceptors
The following parameters drive interceptors at CDK layer.

        <!-- Import a Service into PEtALS => provides a Service. -->
        <jbi:provides endpoint-name="myFileTransferSUEndpointName"
            interface-name="filetransfer:FileTransfer" service-name="filetransfer:myFileTransferSUServiceName">
{include:0 CDK SU Interceptor configuration 5.8.0}

            <!-- CDK specific elements -->
            <petalsCDK:wsdl>FileTransferService.wsdl</petalsCDK:wsdl>
            <petalsCDK:validate-wsdl>true</petalsCDK:validate-wsdl>
h3. Dedicated configuration

            <!-- Component specific elements -->
            <filetransfer:folder>${PETALS_HOME}/filetransfer/out</filetransfer:folder>
            <filetransfer:backup-directory>${PETALS_HOME}/filetransfer/backup</filetransfer:backup-directory>
            <filetransfer:filename>gettingstarted.xml</filetransfer:filename>
        </jbi:provides>
    </jbi:services>
</jbi:jbi>
{code}

{include:0 CDK SU Provide Configuration 5.8.0}

{center}{*}Configuration of a Service Unit to provide a service (File Transfer)*{center}

{table-plus}
|| Attribute || Description || Default value || Required ||
{table-plus}

{include:0 CDK SU Interceptor configuration|]}

h3. Service Unit content

The Service Unit service unit has to contain the following elements, packaged in an the archive:
\\
* The META-INF/jbi.xml descriptor file, has described above,
* An optional wsdl file describing the related service
* 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/filetransfer/version-5}FileTransfer" defined in the abstract WSDL 'FileTransferInterface.wsdl' available as resource in the component archive.

{code}service-unit.zip
service-unit.zip
+ META-INF
- jbi.xml (as defined above)
- service.wsdl (optional)
- service.wsdl (recommended)
{code}

h3. Example

An example of a Service Unit descriptor to provide an Filetransfer service:
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi version="1.0"
xmlns:filetransfer="http://petals.ow2.org/components/filetransfer/version-5"
xmlns:generateNs="http://petals.ow2.org/filetransfer"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<jbi:services binding-component="true">

<jbi:provides endpoint-name="myFileTransferSUEndpointName"
interface-name="filetransfer:FileTransfer" service-name="generateNs:myFileTransferSUServiceName">

<!-- CDK specific elements -->
<petalsCDK:wsdl>MyFileTransferService.wsdl</petalsCDK:wsdl>
<petalsCDK:validate-wsdl>true</petalsCDK:validate-wsdl>

<!-- Component specific elements -->
<filetransfer:filename>gettingstarted.xml</filetransfer:filename>
<filetransfer:backup-directory>${PETALS_HOME}/filetransfer/backup</filetransfer:backup-directory>
<filetransfer:folder>${PETALS_HOME}/filetransfer/out</filetransfer:folder>
</jbi:provides>
</jbi:services>
</jbi:jbi>
{code}

h1. Invoking service on incoming file (Consumes mode)

{note}The parameter "transfer-mode" and "base-msg" can not be used at the same time.{note}

h1. Component Configuration
h1. Configuring the component

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.

h2. CDK parameters
The component configuration includes the configuration of the CDK. The following parameters correspond to the CDK configuration.

{include:0 CDK Component Configuration Table 5.8.0}
{include:0 CDK Parameter scope}
{include:0 CDK Component Interceptor configuration}

h2. Component specific parameters
h2. Interception configuration
{include:0 CDK Component Interceptor configuration 5.8.0}

h2. Dedicated configuration

These parameters drive features proposed by the component
{table-plus}
h3. Common metrics

{include:0 CDK Component Monitoring Metrics 5.68.0}

h3. Dedicated metrics