|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (20)
View Page History{column}
{warning}This version must be installed on [Petals ESB 5.3.0|petalsesb5230:Petals ESB 5.3.0]+{warning}
h1. Feature
{section}
h1. The integration service
The component exposes directly a generic FTP service without deploying a service unit (*Integration service mode*). This generic service can be deactivate removing the file '{{component.wsdl}}' from the component archive.
In integration service mode, parameters for the FTP connection are set in the XML message request in a connection node added to the operation payload as following:
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<ftp:... xmlns:ftp="http://petals.ow2.org/components/ftp/version-3">
<ftp:connection>
<ftp:server>?</ftp:server>
<ftp:port>?</ftp:port>
<ftp:user>?</ftp:user>
<ftp:password>?</ftp:password>
<!--Optional:-->
<ftp:folder>?</ftp:folder>
<ftp:transfer-type>ascii|binary</ftp:transfer-type>
<ftp:connection-mode>active|passive (optional, default is active)</ftp:connection-mode>
<ftp:delete-processed-files>true|false(optional, default is active)</ftp:delete-processed-files>
<ftp:encoding>?</ftp:encoding>
</ftp:connection>
</ftp:...>
{code}
Example of a PUT request :
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<ftp:put xmlns:ftp="http://petals.ow2.org/components/ftp/version-3">
<ftp:body>xml body</ftp:body>
<ftp:filename>file name on the FTP server</ftp:filename>
<ftp:connection>
<ftp:server>192.168.1.206</ftp:server>
<ftp:port>21</ftp:port>
<ftp:user>user1</ftp:user>
<ftp:password>test</ftp:password>
<ftp:folder>/home/user1/integration</ftp:folder>
<ftp:transfer-type>binary</ftp:transfer-type>
<ftp:connection-mode>active</ftp:connection-mode>
<ftp:delete-processed-files>false</ftp:delete-processed-files>
<ftp:encoding>UTF-8</ftp:encoding>
</ftp:connection>
</ftp:put>
{code}
The component exposes directly a generic FTP service without deploying a service unit (*Integration service mode*). This generic service can be deactivate removing the file '{{component.wsdl}}' from the component archive.
In integration service mode, parameters for the FTP connection are set in the XML message request in a connection node added to the operation payload as following:
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<ftp:... xmlns:ftp="http://petals.ow2.org/components/ftp/version-3">
<ftp:connection>
<ftp:server>?</ftp:server>
<ftp:port>?</ftp:port>
<ftp:user>?</ftp:user>
<ftp:password>?</ftp:password>
<!--Optional:-->
<ftp:folder>?</ftp:folder>
<ftp:transfer-type>ascii|binary</ftp:transfer-type>
<ftp:connection-mode>active|passive (optional, default is active)</ftp:connection-mode>
<ftp:delete-processed-files>true|false(optional, default is active)</ftp:delete-processed-files>
<ftp:encoding>?</ftp:encoding>
</ftp:connection>
</ftp:...>
{code}
Example of a PUT request :
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<ftp:put xmlns:ftp="http://petals.ow2.org/components/ftp/version-3">
<ftp:body>xml body</ftp:body>
<ftp:filename>file name on the FTP server</ftp:filename>
<ftp:connection>
<ftp:server>192.168.1.206</ftp:server>
<ftp:port>21</ftp:port>
<ftp:user>user1</ftp:user>
<ftp:password>test</ftp:password>
<ftp:folder>/home/user1/integration</ftp:folder>
<ftp:transfer-type>binary</ftp:transfer-type>
<ftp:connection-mode>active</ftp:connection-mode>
<ftp:delete-processed-files>false</ftp:delete-processed-files>
<ftp:encoding>UTF-8</ftp:encoding>
</ftp:connection>
</ftp:put>
{code}
h1. Exposing a FTP connection as a service
h2. Usage
The operations of the service exposed are explained here after.
{info}
* Operation need to be call explicitly in the form : \{service-namespace}operation
* Operation need to be call explicitly in the form : \{service-namespace}operation
h2. Configuration
h3. Service Unit Mode
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.
* *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.
An example of a Service Unit descriptor to provide an FTP service:
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
xmlns:ftp="http://petals.ow2.org/components/ftp/version-3"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
version="1.0">
<jbi:services binding-component="true">
<jbi:provides
interface-name="ftp:Ftp"
service-name="ftp:myFTPSUServiceName"
endpoint-name="myFTPSUEndpointName">
<!-- CDK specific elements -->
<petalsCDK:timeout>30000</petalsCDK:timeout>
<petalsCDK:validate-wsdl>true</petalsCDK:validate-wsdl>
<petalsCDK:wsdl>FtpService.wsdl</petalsCDK:wsdl>
<petalsCDK:retrypolicy>
<petalsCDK:attempts>3</petalsCDK:attempts>
<petalsCDK:delay>20</petalsCDK:delay>
</petalsCDK:retrypolicy>
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
xmlns:ftp="http://petals.ow2.org/components/ftp/version-3"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
version="1.0">
<jbi:services binding-component="true">
<jbi:provides
interface-name="ftp:Ftp"
service-name="ftp:myFTPSUServiceName"
endpoint-name="myFTPSUEndpointName">
<!-- CDK specific elements -->
<petalsCDK:timeout>30000</petalsCDK:timeout>
<petalsCDK:validate-wsdl>true</petalsCDK:validate-wsdl>
<petalsCDK:wsdl>FtpService.wsdl</petalsCDK:wsdl>
<petalsCDK:retrypolicy>
<petalsCDK:attempts>3</petalsCDK:attempts>
<petalsCDK:delay>20</petalsCDK:delay>
</petalsCDK:retrypolicy>
h3. CDK parameters defining service provider implementation
The following parameters correspond to the CDK configuration of the service provider implementation.
The following parameters correspond to the CDK configuration of the service provider implementation.
<!-- Component specific elements -->
<ftp:server>192.168.1.206</ftp:server>
<ftp:port>21</ftp:port>
<ftp:user>user1</ftp:user>
<ftp:password>test</ftp:password>
<ftp:folder>/home/user1/integration</ftp:folder>
<ftp:transfer-type>binary</ftp:transfer-type>
<ftp:connection-mode>active</ftp:connection-mode>
<ftp:delete-processed-files>false</ftp:delete-processed-files>
<ftp:encoding>UTF-8</ftp:encoding>
<ftp:max-idle-time>10000</ftp:max-idle-time>
<ftp:max-connection>-1</ftp:max-connection>
</jbi:provides>
</jbi:services>
</jbi:jbi>{code}
{center}{*}Configuration of a Service Unit to provide a service (FTP)*{center}
<ftp:server>192.168.1.206</ftp:server>
<ftp:port>21</ftp:port>
<ftp:user>user1</ftp:user>
<ftp:password>test</ftp:password>
<ftp:folder>/home/user1/integration</ftp:folder>
<ftp:transfer-type>binary</ftp:transfer-type>
<ftp:connection-mode>active</ftp:connection-mode>
<ftp:delete-processed-files>false</ftp:delete-processed-files>
<ftp:encoding>UTF-8</ftp:encoding>
<ftp:max-idle-time>10000</ftp:max-idle-time>
<ftp:max-connection>-1</ftp:max-connection>
</jbi:provides>
</jbi:services>
</jbi:jbi>{code}
{center}{*}Configuration of a Service Unit to provide a service (FTP)*{center}
{include:0 CDK SU Provide Configuration 5.8.0}
{include:0 CDK SU Interceptor configuration}
h3. CDK parameters driving interceptors
The following parameters drive interceptors at CDK layer.
The following parameters drive interceptors at CDK layer.
{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.
{anchor:connection-parameters}
h3. Dedicated configuration
The following parameters correspond to the component specific configuration of the service provider implementation.
{anchor:connection-parameters}
{table-plus}
|| Parameter || Description || Default || Required ||
|| Parameter || Description || Default || Required ||
{table-plus}
h4. Service Unit content
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, 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 embeded in the service-unit. The service provider contract must implement the interface "\{http://petals.ow2.org/components/ftp/version-3}Ftp" defined in the abstract WSDL 'FtpServiceInterface.wsdl' available as resource in the component archive.
* it is also highly recommended to provide a WSDL description for service provider embeded in the service-unit. The service provider contract must implement the interface "\{http://petals.ow2.org/components/ftp/version-3}Ftp" defined in the abstract WSDL 'FtpServiceInterface.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)
{code}
- service.wsdl (optional)
{code}
h4. Example
An example of a Service Unit descriptor to provide an FTP service:
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
xmlns:ftp="http://petals.ow2.org/components/ftp/version-3"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
version="1.0">
<jbi:services binding-component="true">
<jbi:provides
interface-name="ftp:Ftp"
service-name="ftp:myFTPSUServiceName"
endpoint-name="myFTPSUEndpointName">
<!-- CDK specific elements -->
<petalsCDK:timeout>30000</petalsCDK:timeout>
<petalsCDK:validate-wsdl>true</petalsCDK:validate-wsdl>
<petalsCDK:wsdl>FtpService.wsdl</petalsCDK:wsdl>
<petalsCDK:retrypolicy>
<petalsCDK:attempts>3</petalsCDK:attempts>
<petalsCDK:delay>20</petalsCDK:delay>
</petalsCDK:retrypolicy>
<!-- Component specific elements -->
<ftp:server>192.168.1.206</ftp:server>
<ftp:port>21</ftp:port>
<ftp:user>user1</ftp:user>
<ftp:password>test</ftp:password>
<ftp:folder>/home/user1/integration</ftp:folder>
<ftp:transfer-type>binary</ftp:transfer-type>
<ftp:connection-mode>active</ftp:connection-mode>
<ftp:delete-processed-files>false</ftp:delete-processed-files>
<ftp:encoding>UTF-8</ftp:encoding>
<ftp:max-idle-time>10000</ftp:max-idle-time>
<ftp:max-connection>-1</ftp:max-connection>
</jbi:provides>
</jbi:services>
</jbi:jbi>{code}
h1. The integration service
The component exposes directly a generic FTP service without deploying a service unit (*Integration service mode*). This generic service can be deactivate removing the file '{{component.wsdl}}' from the component archive.
In integration service mode, parameters for the FTP connection are set in the XML message request in a connection node added to the operation payload as following. See [connection parameters|#connection-parameters] for more details:
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<ftp:... xmlns:ftp="http://petals.ow2.org/components/ftp/version-3">
<ftp:connection>
<ftp:server>?</ftp:server>
<ftp:port>?</ftp:port>
<ftp:user>?</ftp:user>
<ftp:password>?</ftp:password>
<!--Optional:-->
<ftp:folder>?</ftp:folder>
<ftp:transfer-type>?</ftp:transfer-type>
<ftp:connection-mode>?</ftp:connection-mode>
<ftp:delete-processed-files>?</ftp:delete-processed-files>
<ftp:encoding>?</ftp:encoding>
</ftp:connection>
</ftp:...>
{code}
Example of a PUT request :
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<ftp:put xmlns:ftp="http://petals.ow2.org/components/ftp/version-3">
<ftp:body>xml body</ftp:body>
<ftp:filename>file name on the FTP server</ftp:filename>
<ftp:connection>
<ftp:server>192.168.1.206</ftp:server>
<ftp:port>21</ftp:port>
<ftp:user>user1</ftp:user>
<ftp:password>test</ftp:password>
<ftp:folder>/home/user1/integration</ftp:folder>
<ftp:transfer-type>binary</ftp:transfer-type>
<ftp:connection-mode>active</ftp:connection-mode>
<ftp:delete-processed-files>false</ftp:delete-processed-files>
<ftp:encoding>UTF-8</ftp:encoding>
</ftp:connection>
</ftp:put>
{code}
An example of a Service Unit descriptor to provide an FTP service:
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
xmlns:ftp="http://petals.ow2.org/components/ftp/version-3"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
version="1.0">
<jbi:services binding-component="true">
<jbi:provides
interface-name="ftp:Ftp"
service-name="ftp:myFTPSUServiceName"
endpoint-name="myFTPSUEndpointName">
<!-- CDK specific elements -->
<petalsCDK:timeout>30000</petalsCDK:timeout>
<petalsCDK:validate-wsdl>true</petalsCDK:validate-wsdl>
<petalsCDK:wsdl>FtpService.wsdl</petalsCDK:wsdl>
<petalsCDK:retrypolicy>
<petalsCDK:attempts>3</petalsCDK:attempts>
<petalsCDK:delay>20</petalsCDK:delay>
</petalsCDK:retrypolicy>
<!-- Component specific elements -->
<ftp:server>192.168.1.206</ftp:server>
<ftp:port>21</ftp:port>
<ftp:user>user1</ftp:user>
<ftp:password>test</ftp:password>
<ftp:folder>/home/user1/integration</ftp:folder>
<ftp:transfer-type>binary</ftp:transfer-type>
<ftp:connection-mode>active</ftp:connection-mode>
<ftp:delete-processed-files>false</ftp:delete-processed-files>
<ftp:encoding>UTF-8</ftp:encoding>
<ftp:max-idle-time>10000</ftp:max-idle-time>
<ftp:max-connection>-1</ftp:max-connection>
</jbi:provides>
</jbi:services>
</jbi:jbi>{code}
h1. The integration service
The component exposes directly a generic FTP service without deploying a service unit (*Integration service mode*). This generic service can be deactivate removing the file '{{component.wsdl}}' from the component archive.
In integration service mode, parameters for the FTP connection are set in the XML message request in a connection node added to the operation payload as following. See [connection parameters|#connection-parameters] for more details:
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<ftp:... xmlns:ftp="http://petals.ow2.org/components/ftp/version-3">
<ftp:connection>
<ftp:server>?</ftp:server>
<ftp:port>?</ftp:port>
<ftp:user>?</ftp:user>
<ftp:password>?</ftp:password>
<!--Optional:-->
<ftp:folder>?</ftp:folder>
<ftp:transfer-type>?</ftp:transfer-type>
<ftp:connection-mode>?</ftp:connection-mode>
<ftp:delete-processed-files>?</ftp:delete-processed-files>
<ftp:encoding>?</ftp:encoding>
</ftp:connection>
</ftp:...>
{code}
Example of a PUT request :
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<ftp:put xmlns:ftp="http://petals.ow2.org/components/ftp/version-3">
<ftp:body>xml body</ftp:body>
<ftp:filename>file name on the FTP server</ftp:filename>
<ftp:connection>
<ftp:server>192.168.1.206</ftp:server>
<ftp:port>21</ftp:port>
<ftp:user>user1</ftp:user>
<ftp:password>test</ftp:password>
<ftp:folder>/home/user1/integration</ftp:folder>
<ftp:transfer-type>binary</ftp:transfer-type>
<ftp:connection-mode>active</ftp:connection-mode>
<ftp:delete-processed-files>false</ftp:delete-processed-files>
<ftp:encoding>UTF-8</ftp:encoding>
</ftp:connection>
</ftp:put>
{code}
h1. Configuring the component