|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (136)
View Page History\\ {numberedheadings}
\\
\\
h1. Features
h1.PEtALS-BC-FILETRANSFER
\\
The FileTransfer component is a Binding Component (BC) which supports file transfers. This component allows to :
• * Poll a configured directory for incoming files. At a poll, each file retrieved is put into a new JBI message, set as source or attachment. The message is sent to a target JBI service.
* Provide a standard service that write the JBI message (content and attachments) it receives into a file with a specified name and suffixed with the current date name.
* Provide a dedicated service *GetFiles*, which describe 2 operations:
** *getFiles* operation, to retrieve files correponding to a pattern, from a folder.
** *getFile* operation, to retrieve the first file correponding to a pattern, from a folder.
* Provide a dedicated service *GetFiles*, which describe 2 operations:
** *getFiles* operation, to retrieve files correponding to a pattern, from a folder.
** *getFile* operation, to retrieve the first file correponding to a pattern, from a folder.
\\
• Provide a standard service that write the JBI message (content and attachments) it receives into a file with a specified name and suffixed with the current date name.
\\
• Provide a dedicated service *GetFiles{*}, which describe 2 operations:
\\
*getFiles* operation, to retrieve files correponding to a pattern, from a folder
\\
*getFile* operation, to retrieve the first file correponding to a pattern, from a folder.
\\
\\
• Provide a dedicated service *GetFiles{*}, which describe 2 operations:
\\
*getFiles* operation, to retrieve files correponding to a pattern, from a folder
\\
*getFile* operation, to retrieve the first file correponding to a pattern, from a folder.
\\
These operations are described in an embedded astract WSDL, the File Transfer dedicated WSDL.
\\
\\
h1. Component Configuration
\\
\\
h1.Chapter 1. Component Configuration
\\
h1.Chapter 1. Component Configuration
\\
_no specific configuration for this component_
\\
*Table* *1.1. Configuration of the component (CDK)*
\\
\\
*Table* *1.1. Configuration of the component (CDK)*
\\
*ParameterDescriptionDefault* *RequiredScope*
*ParameterDescriptionDefault* *RequiredScope*
\\
acceptor-pool-size The size of the thread pool used to accept Message Exchange from the NMR. Once a message is accepted, its processing is delegated to the processor pool thread.
processor-pool-size The size of the thread pool used to process Message Exchanges.
Once a message is accepted, its processing is delegated to one of the thread of this pool.
acceptor-pool-size The size of the thread pool used to accept Message Exchange from the NMR. Once a message is accepted, its processing is delegated to the processor pool thread.
processor-pool-size The size of the thread pool used to process Message Exchanges.
Once a message is accepted, its processing is delegated to one of the thread of this pool.
5YesRuntime
\\
\\
\\
10YesRuntime
10YesRuntime
performance\- notifications
Enable the performance notifications in the component. The CDK proposes to a performance notification feature to the component implementor. If you enable this feature, you must use the related method accessible in the AbstractComponent class.
\-NoRuntime
performance-stepWhen the performance notification feature is enabled, it is possible to define a step on the notifications. When there is an heavy message traffic, it is recommanded to increase this step to avoid performance disturbance.
properties-fileName of the file containing properties used as reference by other parameters. Parameters reference the property name in the following pattern $\{myPropertyName\}. At runtime, the expression is replaced by the value of the property.
properties-fileName of the file containing properties used as reference by other parameters. Parameters reference the property name in the following pattern $\{myPropertyName\}. At runtime, the expression is replaced by the value of the property.
\\
• a file relative to the PEtALS installation path
• a file relative to the PEtALS installation path
\-NoRuntime
\\
\\
\\
\\
\\
\\
\\
\-NoInstallation
\\
• an empty value to stipulate a non-using file
• an empty value to stipulate a non-using file
ignored-statusWhen the component receives an acknowledgement mDeOsNsEa_gAeND_ERROR_IGNOYREesD
exchange, it can skip the processing of these message according to the type of the acknowledgment. If you decide to not ignore some acknowledgement, the component listeners must take care of them.
exchange, it can skip the processing of these message according to the type of the acknowledgment. If you decide to not ignore some acknowledgement, the component listeners must take care of them.
\\
Component
Component
\\
\\
\\
jbi-listener\- class-name
Accepted values : DONE_AND_ERROR_IGNORED, DONE_IGNORED,
ERROR_IGNORED or NOTHING_IGNORED
ERROR_IGNORED or NOTHING_IGNORED
Qualified name of the class extending *AbstractJBIListener* \-YesComponent
external-listener\- class-name
Qualifiednameoftheclassextending
*AbstractExternalListener*
*AbstractExternalListener*
\-NoComponent
\\
Definition of CDK parameter scope :
\\
Definition of CDK parameter scope :
\\
• _Component_ : The parameter has been defined during the development of the component. A user of the component can not change its value.
\\
• _Installation{_}: _Installation_: The parameter can be set during the installation of the component, by using the installation MBean (see JBI specifications for details about the installation sequence). If the parameter is optional and has not been defined during the development of the component, it is not available at installation time.
\\
\\
\\
\\
\\
• _Runtime_ : The paramater can be set during the installation of the component and during runtime. The runtime configuration can be changed using the CDK custom MBean named RuntimeConfiguration. If the parameter is optional and has not been defined during the development of the component, it is not available at installation and runtime times.
\\
\\
\\
h1. Service Configuration
\\
h1.Chapter 2. Service Configuration
\\
h2. 2.1. Transfer files into the JBI bus
CONSUME SERVICE : Transfer file(s) from a directory to a JBI service
\\
*Figure* *2.1. Consumes a JBI service on polled file(s)*
\\
*Figure* *2.1. Consumes a JBI service on polled file(s)*
\\ !worddav103ae1837a51c53a71a57c7c0997a20a.png|height=187,width=438!\\
h3. 2.1.1. Service Unit descriptor
h3. 2.1.1. Service Unit descriptor
\\
!worddav103ae1837a51c53a71a57c7c0997a20a.png|height=187,width=438!
\\
h3.2.1.1. Service Unit descriptor
\\
\\
h3.2.1.1. Service Unit descriptor
\\
<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi version="1.0"[ |http://www.w3.org/2001/XMLSchema-instance ]xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"[ |http://java.sun.com/xml/ns/jbi ]xmlns:jbi="http://java.sun.com/xml/ns/jbi"[ |http://petals.ow2.org/components/extensions/version-4.0 ]xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-4.0"[ |http://petals.ow2.org/components/filetransfer/version-2.2 ]xmlns:filetransfer="http://petals.ow2.org/components/filetransfer/version-2.2"[ |http://petals.ow2.org/filetransfer ]xmlns:generatedNs="http://petals.ow2.org/filetransfer">
<jbi:jbi version="1.0"\[ \|http://www.w3.org/2001/XMLSchema-instance \]xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\[ \|http://java.sun.com/xml/ns/jbi \]xmlns:jbi="http://java.sun.com/xml/ns/jbi"\[ \|http://petals.ow2.org/components/extensions/version-4.0 \]xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-4.0"\[ \|http://petals.ow2.org/components/filetransfer/version-2.2 \]xmlns:filetransfer="http://petals.ow2.org/components/filetransfer/version-2.2"\[ \|http://petals.ow2.org/filetransfer \]xmlns:generatedNs="http://petals.ow2.org/filetransfer">
\\
<jbi:services binding-component="false">
<jbi:services binding-component="false">
interface-name="generatedNs:FileRepo" service-name="generatedNs:FileRepoService" endpoint-name="getServiceEndpoint">
\\
\\
<\!-\- CDK specific fields -->
<petalsCDK:operation>test</petalsCDK:operation>
<petalsCDK:mep>InOnly</petalsCDK:mep>
\\
<petalsCDK:mep>InOnly</petalsCDK:mep>
\\
<\!-\- FileTransfer specific fields -->
<filetransfer:read-directory>{*}$\{PETALS_HOME\}/filetransfer/in{*}</filetransfer:read-directory> <filetransfer:read-directory>*$\{PETALS_HOME\}/filetransfer/in*</filetransfer:read-directory>
\\
<filetransfer:backup-directory>{*}$\{PETALS_HOME\}/filetransfer/backup{*}</filetransfer:backup-directory> <filetransfer:backup-directory>*$\{PETALS_HOME\}/filetransfer/backup*</filetransfer:backup-directory>
<filetransfer:transfer-mode>{*}content{*}</filetransfer:transfer-mode> <filetransfer:transfer-mode>*content*</filetransfer:transfer-mode>
<filetransfer:polling-period>{*}1000{*}</filetransfer:polling-period> <filetransfer:polling-period>*1000*</filetransfer:polling-period>
</jbi:consumes>
</jbi:services>
</jbi:services>
\\
consumes Name of the JBI service to invoke into the JBI bus. You can define only the interface (qname) to let the NMR choose a matching service, or the pair service(qname) and endpoint (string) to consume the localized service.
consumes Name of the JBI service to invoke into the JBI bus. You can define only the interface (qname) to let the NMR choose a matching service, or the pair service(qname) and endpoint (string) to consume the localized service.
\-Yes
\\
\\
\\
\\
This propety activates the bypass of acknowledgment messages destinated to this SU.
This propety activates the bypass of acknowledgment messages destinated to this SU.
\-No
\\
\\
\\
\\
\\
\\
\-No
\\
\\
\\
\\
\\
\-No
\\
\\
\\
\\
\\
\-No
org.ow2.petals.routing.strate{*}T{*}g{*}o{*}y
*beusedonlyinplatform(distributed)PEtALS*
-No
\-No
*distribution{*}.Check *distribution*.Check PEtALS platform documentation for further details. Override the default routing strategy for Message Exchanges sent by this SU
org.ow2.petals.transport.comp{*}T{*}re{*}o{*}ss
*beusedonlyinplatform(distributed)PEtALS*
- No
*distribution{*}.Check *distribution*.Check PEtALS platform documentation for further details.
\\
This property activates the compression of the messages payload when set to true.
This property activates the compression of the messages payload when set to true.
org.ow2.petals.transport.qo{*}T{*}s{*}o* *be* *used* *only* *in* *platform* *(distributed)* *PEtALS* *distribution{*}. *distribution*.
Check PEtALS platform documentation for further details.
\\
This property overrides the default policy of the Quality of Service supported by PEtALS Transporter for Message Exchange sent by this SU.
\\
This property overrides the default policy of the Quality of Service supported by PEtALS Transporter for Message Exchange sent by this SU.
\\
\\
\\
\-No
\\
\\
\\
attachment.
\\
\\
h3. 2.1.2. Consumer restrictions
\-Yes
\\
\\
\\
\\
The FileTransfer component supports only InOnly message exchange pattern as consumer. The FileTransfer component does not support synchronous sendings as consumer.
The FileTransfer component supports only InOnly message exchange pattern as consumer. The FileTransfer component does not support synchronous sendings as consumer.
h3. 2.1.3. Consumer usage
\\
If you want to invoke a service in the JBI bus with files, put the files in the configured directory (read-directory). At each configured polling period (polling-period), the component fetchs the incoming files.
If you want to invoke a service in the JBI bus with files, put the files in the configured directory (read-directory). At each configured polling period (polling-period), the component fetchs the incoming files.
\\
\\
\\
h2. 2.2. Transfer files out of the JBI bus
PROVIDE SERVICE : Write JBI messages XML content and attachments to directory
\\
*Figure* *2.2. Provides a JBI service to write JBI messages into directory*
\\
*Figure* *2.2. Provides a JBI service to write JBI messages into directory*
\\ !worddav93ef27655066d2f8dbcd5b821bb00665.png|height=187,width=438!\\
h3. 2.2.1. Service Unit descriptor
h3. 2.2.1. Service Unit descriptor
\\
!worddav93ef27655066d2f8dbcd5b821bb00665.png|height=187,width=438!
\\
h3.2.2.1. Service Unit descriptor
\\
\\
h3.2.2.1. Service Unit descriptor
\\
<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi version="1.0"[ |http://www.w3.org/2001/XMLSchema-instance ]xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"[ |http://java.sun.com/xml/ns/jbi ]xmlns:jbi="http://java.sun.com/xml/ns/jbi"[ |http://petals.ow2.org/components/extensions/version-4.0 ]xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-4.0"[ |http://petals.ow2.org/components/filetransfer/version-2.2 ]xmlns:filetransfer="http://petals.ow2.org/components/filetransfer/version-2.2"[ |http://petals.ow2.org/filetransfer ]xmlns:generatedNs="http://petals.ow2.org/filetransfer">
<jbi:jbi version="1.0"\[ \|http://www.w3.org/2001/XMLSchema-instance \]xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\[ \|http://java.sun.com/xml/ns/jbi \]xmlns:jbi="http://java.sun.com/xml/ns/jbi"\[ \|http://petals.ow2.org/components/extensions/version-4.0 \]xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-4.0"\[ \|http://petals.ow2.org/components/filetransfer/version-2.2 \]xmlns:filetransfer="http://petals.ow2.org/components/filetransfer/version-2.2"\[ \|http://petals.ow2.org/filetransfer \]xmlns:generatedNs="http://petals.ow2.org/filetransfer">
\\
<jbi:services binding-component="true">
<jbi:services binding-component="true">
interface-name="generatedNs:put" service-name="generatedNs:putService" endpoint-name="putServiceEndpoint">
\\
\\
<\!-\- WSDL file -->
<petalsCDK:wsdl xsi:nil="true" />
\\
\\
<\!-\- FileTransfer specific fields -->
<filetransfer:write-directory>{*}$\{PETALS_HOME\}/filetransfer/out{*}</filetransfer:write-directory> <filetransfer:write-directory>*$\{PETALS_HOME\}/filetransfer/out*</filetransfer:write-directory>
<filetransfer:copy-mode>{*}content-only{*}</filetransfer:copy-mode> <filetransfer:copy-mode>*content-only*</filetransfer:copy-mode>
<filetransfer:file-pattern>{*}test.xml{*}</filetransfer:file-pattern> <filetransfer:file-pattern>*test.xml*</filetransfer:file-pattern>
</jbi:provides>
</jbi:services>
</jbi:services>
providesDescribe the JBI service that will be exposed into the JBI bus. Interface
(qname), service (qname) and endpoint (string) attributes are required.
(qname), service (qname) and endpoint (string) attributes are required.
\-Yes
\\
\\
\\
\\
This propety activates the bypass of acknowledgment messages destinated to this SU.
This propety activates the bypass of acknowledgment messages destinated to this SU.
\-No
\\
\\
\\
\\
\\
\\
\-No
\\
\\
\\
\\
\\
\-No
\\
\\
\\
copy-modeTransfer either the source, the attachments or both of the payload.
\\
\\
Possible values are content\- only, attachments-only or content-and-attachments.
file-patternThe name of the file where the JBI message (the XMl content) will be written in.
\\
The system date is appended on each created file.
\\
\\
The system date is appended on each created file.
\\
h3. 2.2.2. Provider restrictions
\-Yes
\\
\\
\\
\\
\\
\\
h3. 2.2.3. Provider Usage
\\
h4. 2.2.3.1. default operation
\\
According to the configured mode (copy-mode), the XML message content, attachments or both are transfered to the target directory (write-directory).
According to the configured mode (copy-mode), the XML message content, attachments or both are transfered to the target directory (write-directory).
When deploying a service unit like in the {color:#003f80}previous{color} {color:#003f80}code{color} {color:#003f80}snippet{color}, all the JBI messages received on the putService service will produce files in the $\{PETALS_HOME\}/filetransfer/out directory.
\\
\\
h2. 2.3. Retrieve files from a folder : the GetFiles service
PROVIDE SERVICE : return files from a folder as XML message or attachments
\\
\\
h3. 2.3.1. Service Unit descriptor
\\
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi version="1.0"[ |http://www.w3.org/2001/XMLSchema-instance ]xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"[ |http://java.sun.com/xml/ns/jbi ]xmlns:jbi="http://java.sun.com/xml/ns/jbi"[ |http://petals.ow2.org/components/extensions/version-4.0 ]xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-4.0"[ |http://petals.ow2.org/components/filetransfer/version-2.2 ]xmlns:filetransfer="http://petals.ow2.org/components/filetransfer/version-2.2"[ |http://petals.ow2.org/filetransfer ]xmlns:generatedNs="http://petals.ow2.org/filetransfer">
<jbi:jbi version="1.0"\[ \|http://www.w3.org/2001/XMLSchema-instance \]xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\[ \|http://java.sun.com/xml/ns/jbi \]xmlns:jbi="http://java.sun.com/xml/ns/jbi"\[ \|http://petals.ow2.org/components/extensions/version-4.0 \]xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-4.0"\[ \|http://petals.ow2.org/components/filetransfer/version-2.2 \]xmlns:filetransfer="http://petals.ow2.org/components/filetransfer/version-2.2"\[ \|http://petals.ow2.org/filetransfer \]xmlns:generatedNs="http://petals.ow2.org/filetransfer">
\\
<jbi:services binding-component="true">
<jbi:services binding-component="true">
interface-name="gefiletransfer:GetFiles" service-name="generatedNs:myGetFilesService" endpoint-name="getFilesServiceEndpoint">
\\
\\
<\!-\- WSDL file -->
<petalsCDK:wsdl xsi:nil="true" />
\\
\\
<-\- FileTransfer specific fields -->
<filetransfer:read-directory>{*}$\{PETALS_HOME\}/filetransfer{*}</filetransfer:read-directory> <filetransfer:read-directory>*$\{PETALS_HOME\}/filetransfer*</filetransfer:read-directory>
</jbi:provides>
</jbi:services>
</jbi:services>
providesDescribe the JBI service that will be exposed into the JBI bus. Interface
(qname), service (qname) and endpoint (string) attributes are required.
(qname), service (qname) and endpoint (string) attributes are required.
\-Yes
\\
\\
\\
\\
This propety activates the bypass of acknowledgment messages destinated to this SU.
This propety activates the bypass of acknowledgment messages destinated to this SU.
\-No
\\
\\
\\
\\
\\
\\
\-No
\\
\\
\\
\\
\\
\-No
\\
*Table* *2.9. Configuration of a Service Unit to provide the GetFiles service (Filetransfer)*
*Table* *2.9. Configuration of a Service Unit to provide the GetFiles service (Filetransfer)*
$\{myEnvVariable\}.
\\
\\
h3. 2.3.2. Provider restrictions
\-Yes
\\
\\
\\
The FileTransfer component supports only InOut or InOptionalOut message exchange pattern as service provider.
\\
\\
h3. 2.3.3. Provider Usage
\\
h4. 2.3.3.1. GetFile operation
\\
When the getFile operation is set on the incoming message exchange, the component returns the first file found in the configured directory, according to the file filter set in the XML request (the source of the IN message). The file is returned as an XML response message (OUT message),so the file MUST be an XML file\!
\\
The IN message looks like :
\\
The IN message looks like :
\\
[<q0:getFile|http://petals.ow2.org/components/filetransfer/version-2.2 ] xmlns:q0="http://petals.ow2.org/components/filetransfer/version-2.2">
<q0:filepattern>*.xml</q0:filepattern>
</q0:getFile>
</q0:getFile>
\\
The read file is moved to the configured backup directory (backup-directory) or in the system default temporary directory.
The read file is moved to the configured backup directory (backup-directory) or in the system default temporary directory.
\\ !worddav276fe3a32bec21fca352a182a612c1e7.png|height=19,width=19!
{color:#cc0000}{*}Note{*}{color}\\
!worddav276fe3a32bec21fca352a182a612c1e7.png|height=19,width=19!
{color:#cc0000}*Note*{color}
\\
{color:#cc0000}*Note*{color}
\\
This operation is defined in the File Transfer abstract WSDL. You can import this abstract WSDL and define a concret WSDL to reference in your SU. Thus the service provided is properly defined by its WSDL.
\\
\\
h4. 2.3.3.2. GetFiles operation
\\
When the getFiles operation is set on the incoming message exchange, the component returns all the files file found in the configured directory (read-directory), according to the files filters set in the XML request. The files are all returned as attachments. An XML report message is returned.
When the getFiles operation is set on the incoming message exchange, the component returns all the files file found in the configured directory (read-directory), according to the files filters set in the XML request. The files are all returned as attachments. An XML report message is returned.
The IN message looks like :
\\
\\
[<q0:getFiles|http://petals.ow2.org/components/filetransfer/version-2.2 ] xmlns:q0="http://petals.ow2.org/components/filetransfer/version-2.2">
<q0:filepattern>*.xml</q0:filepattern>
<q0:filepattern>picture.jpg</q0:filepattern>
<q0:filepattern>picture.jpg</q0:filepattern>
The OUT message returned to the consumer is defined as follow :
\\
\\
[<q0:getFilesResponse|http://petals.ow2.org/components/filetransfer/version-2.2 ] xmlns:q0="http://petals.ow2.org/components/filetransfer/version-2.2">
<q0:filename>file1.xml</q0:filename>
<q0:filename>file2.xml</q0:filename>
<q0:filename>file2.xml</q0:filename>
\\
The read files are moved to the configured backup directory (backup-directory) or in the system default temporary directory.
The read files are moved to the configured backup directory (backup-directory) or in the system default temporary directory.
\\
!worddav276fe3a32bec21fca352a182a612c1e7.png|height=19,width=19! {color:#cc0000}*Note*{color}
\\
!worddav276fe3a32bec21fca352a182a612c1e7.png|height=19,width=19! {color:#cc0000}*Note*{color}
\\
\\ !worddav276fe3a32bec21fca352a182a612c1e7.png|height=19,width=19! {color:#cc0000}{*}Note{*}{color}\\
This operation is defined in the File Transfer abstract WSDL. You can import this abstract WSDL and define a concret WSDL to reference in your SU. Thus the service provided is properly defined by its WSDL.
{numberedheadings}