|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (171)
View Page Historyh1. PEtALS-BC-FTP
\\
\\
\\
h1.PEtALS-BC-FTP
\\
\\
h1.PEtALS-BC-FTP
\\
The petals-bc-ftp component allows to put, get or list files on an FTP server.
\\
\\
_FTP protocol (RFC959 ) is described at :_ [ {color:#003f80}_+http://www.w3.org/Protocols/rfc959/+_{color} |??? ]
_FTP protocol (RFC959 ) is described at :_ \[{color:#003f80}\_\+{color}{color:#003f80}[http://www.w3.org/Protocols/rfc959/+\_|http://www.w3.org/Protocols/rfc959/+_]{color} \|??? \]
\\
*Figure* *1. ftp component mechanism*
*Figure* *1. ftp component mechanism*
\\ !worddav00e048e80e16a1127d043d3aa5a941a5.png|height=216,width=511!\\
\\
!worddav00e048e80e16a1127d043d3aa5a941a5.png|height=216,width=511!
h1. Chapter 1. Component Configuration
\\
The following attributes can be set during the installation phase to configure the component, using the params element of the jbi-install-component ANT task :
\\
\\
h1.Chapter 1. Component Configuration
\\
The following attributes can be set during the installation phase to configure the component, using the params element of the jbi-install-component ANT task:
\\
h1.Chapter 1. Component Configuration
\\
The following attributes can be set during the installation phase to configure the component, using the params element of the jbi-install-component ANT task:
\\
_no configuration for this component_
\\
\\
h2. *Table* *1.1. Component installation configuration attributes*
\\
*AttributeDescriptionDefaultRequired*
\\
\\
\\
h2. *Table* *1.2. Configuration of the component (CDK)*
{include:0 CDK Component Configuration Table}
{include:0 CDK Component Configuration Table}
\\
*Table* *1.2. Configuration of the component (CDK)*
h2. *Table* *1.3. Configuration of a Service Unit to consume a service (CDK)*
{include:0 CDK SU Consume Configuration}
{include:0 CDK SU Consume Configuration}
\\
*ParameterDescriptionDefault* *RequiredScope*
h1. Chapter 2. Service Configuration
\\
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.
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.
h2. 2.1. Put XML content or send FTP commands to the FTP server
5YesRuntime
\\
\\
\\
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.
-NoRuntime
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.
\\
The value of this parameter is :
\\
• an URL
\\
• a file relative to the PEtALS installation path
empty value
YesInstallation
\\
• 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.
\\
Component
\\
\\
\\
\\
jbi-listener- class-name
Accepted values : DONE_AND_ERROR_IGNORED, DONE_IGNORED,
ERROR_IGNORED or NOTHING_IGNORED
Qualified name of the class extending *AbstractJBIListener* -YesComponent
external-listener- class-name
Qualifiednameoftheclassextending
*AbstractExternalListener*
-NoComponent
\\
\\
\\
*Table* *1.3. Configuration of a Service Unit to consume a service (CDK)*
\\
*ParameterDescriptionDefaultRequired*
\\
mepMessage exchange pattern abbreviation. This parameter can be user in conjunction with the method of the CDK Listeners : createMessageExchange(Extensionsextensions). This method returns a CDK Exchange corresponding to the type of the specified pattern.
\\
Admitted values are : InOnly, RobustInOnly, InOptionalOut et InOut
operationOperation to call on a service. This parameter can be used in conjunction with the sending methods of the Listeners. If no operation is specified in the Message Exchange to send, this parameter will be used.
timeoutTimeout in milliseconds of a synchronous send. this parameter can be used in conjunction with the sendSync(Exchange exchange) method of the Listeners. Set 0 for an infinite timeout.
org.ow2.petals.messaging.consumCerh.necokacPkEtALS container document for further details.
\\
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
*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 PEtALS platform documentation for further details.
\\
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{*}.
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.
\\
\\
-No
\\
\\
\\
h1.Chapter 2. Service Configuration
\\
h2.2.1. Put XML content or send FTP commands to the FTP server
\\
\\
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.
-NoRuntime
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.
\\
The value of this parameter is :
\\
• an URL
\\
• a file relative to the PEtALS installation path
empty value
YesInstallation
\\
• 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.
\\
Component
\\
\\
\\
\\
jbi-listener- class-name
Accepted values : DONE_AND_ERROR_IGNORED, DONE_IGNORED,
ERROR_IGNORED or NOTHING_IGNORED
Qualified name of the class extending *AbstractJBIListener* -YesComponent
external-listener- class-name
Qualifiednameoftheclassextending
*AbstractExternalListener*
-NoComponent
\\
\\
\\
*Table* *1.3. Configuration of a Service Unit to consume a service (CDK)*
\\
*ParameterDescriptionDefaultRequired*
\\
mepMessage exchange pattern abbreviation. This parameter can be user in conjunction with the method of the CDK Listeners : createMessageExchange(Extensionsextensions). This method returns a CDK Exchange corresponding to the type of the specified pattern.
\\
Admitted values are : InOnly, RobustInOnly, InOptionalOut et InOut
operationOperation to call on a service. This parameter can be used in conjunction with the sending methods of the Listeners. If no operation is specified in the Message Exchange to send, this parameter will be used.
timeoutTimeout in milliseconds of a synchronous send. this parameter can be used in conjunction with the sendSync(Exchange exchange) method of the Listeners. Set 0 for an infinite timeout.
org.ow2.petals.messaging.consumCerh.necokacPkEtALS container document for further details.
\\
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
*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 PEtALS platform documentation for further details.
\\
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{*}.
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.
\\
\\
-No
\\
\\
\\
h1.Chapter 2. Service Configuration
\\
h2.2.1. Put XML content or send FTP commands to the FTP server
PROVIDE SERVICE : Expose an external service in the JBI environment to put XML messages or send FTP
commands on an FTP server.
\\
Petals FTP binding component allows JBI consumers to send XML messages to an FTP server. A JBI endpoint is registered into the JBI environment, and is linked to an FTP server, with a configured user/password. When the FTP component receives a message exchange from Petals platform, the XML content of the message is put on the FTP server.
\\
\\
The component can also provide a generic *Ftp service* . This service allows the consumer to call FTP commands. This service can either connects to an FTP server configured in the ServiceUnit, or retrieves the FTP server information in the XML message request.
\\
\\
To use this generic service, the consumer has to call explicitely the *\{service* *namespace\}get/mget/put/mput/dir* *{service* *namespace}get/mget/put/mput/dir*
operations. Otherwise, the standard PUT operation is called.
\\
\\
h3. 2.1.1. Service Unit descriptor
\\
The service unit is configurable via its extensions in the jbi.xml file :
\\
\\
{code}<?xml version="1.0" encoding="UTF-8"?>
<!-- JBI descriptor for PEtALS' "petals-bc-ftp" (FTP), version 3.0 -->
<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/ftp/version-3.0 ]xmlns:ftp="http://petals.ow2.org/components/ftp/version-3.0"[ |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/ftp/version-3.0 ]xmlns:interfaceNs="http://petals.ow2.org/components/ftp/version-3.0"[ |http://myservice ]xmlns:serviceNs="http://myservice">
<jbi:jbi version="1.0"
\\ 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.0"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-4.0"
xmlns:interfaceNs="http://petals.ow2.org/components/ftp/version-3.0"
xmlns:serviceNs="http://myservice">
xmlns:ftp="http://petals.ow2.org/components/ftp/version-3.0"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-4.0"
xmlns:interfaceNs="http://petals.ow2.org/components/ftp/version-3.0"
xmlns:serviceNs="http://myservice">
<!-- Import a Service into PEtALS or Expose a PEtALS Service => use a BC. -->
<jbi:services binding-component="true">
<jbi:services binding-component="true">
\\
<!-- Import a Service into PEtALS => provides a Service. -->
<jbi:provides
interface-name="interfaceNs:Ftp" service-name="serviceNs:FtpSrv" endpoint-name="FtpSrvEndpoint">
\\
interface-name="interfaceNs:Ftp" service-name="serviceNs:FtpSrv" endpoint-name="FtpSrvEndpoint">
\\
<jbi:provides
interface-name="interfaceNs:Ftp"
service-name="serviceNs:FtpSrv"
endpoint-name="FtpSrvEndpoint">
interface-name="interfaceNs:Ftp"
service-name="serviceNs:FtpSrv"
endpoint-name="FtpSrvEndpoint">
<!-- CDK specific elements -->
<petalsCDK:wsdl>ftp.wsdl</petalsCDK:wsdl>
\\
\\
<petalsCDK:wsdl>ftp.wsdl</petalsCDK:wsdl>
<!-- Component specific elements -->
<ftp:server>server</ftp:server>
<ftp:port>21</ftp:port>
<ftp:user>user</ftp:user>
<ftp:password>password</ftp:password>
<ftp:folder>folder</ftp:folder>
<ftp:filename>file.xml</ftp:filename>
</jbi:provides>
<ftp:port>21</ftp:port>
<ftp:user>user</ftp:user>
<ftp:password>password</ftp:password>
<ftp:folder>folder</ftp:folder>
<ftp:filename>file.xml</ftp:filename>
</jbi:provides>
<ftp:server>server</ftp:server>
<ftp:port>21</ftp:port>
<ftp:user>user</ftp:user>
<ftp:password>password</ftp:password>
<ftp:folder>folder</ftp:folder>
<ftp:filename>file.xml</ftp:filename>
</jbi:provides>
<ftp:port>21</ftp:port>
<ftp:user>user</ftp:user>
<ftp:password>password</ftp:password>
<ftp:folder>folder</ftp:folder>
<ftp:filename>file.xml</ftp:filename>
</jbi:provides>
</jbi:services>
</jbi:jbi> </jbi:jbi{code}
\\
\\
\\
\\
*Table* *2.1. Service Unit attributes to provide services*
\\ {table-plus}
|| Attribute || Description || Default value || Required ||
| server | IP or DNS name of the server | | Yes (except when uins FtpService) |
| port | the port number of the ftp server | 21 | No | \\ |
| user | the user login name used to connect to the server | | Yes (except when using FtpService) \\ |
| password | | the user password | | | Yes (except when uins FtpService) | \\ |
| folder | the folder on the FTP server | | No | \\ |
| filename | file name for the standard PUT operation (write the XML message content on the FTP server) | content.xml | No | \\ |
| connection-mode | In Active mode, the connection port is set by the client. In Passive mode, it is set by the server (default is Active) | active | No | \\ |
| transfer-type | transfer mode used for put or get files ascii/binary/auto (default is AUTO, but not safe) | auto | No |\\
| server | IP or DNS name of the server | | Yes (except when uins FtpService) |
| port | the port number of the ftp server | 21 | No | \\ |
| user | the user login name used to connect to the server | | Yes (except when using FtpService) \\ |
| password | | the user password | | | Yes (except when uins FtpService) | \\ |
| folder | the folder on the FTP server | | No | \\ |
| filename | file name for the standard PUT operation (write the XML message content on the FTP server) | content.xml | No | \\ |
| connection-mode | In Active mode, the connection port is set by the client. In Passive mode, it is set by the server (default is Active) | active | No | \\ |
| transfer-type | transfer mode used for put or get files ascii/binary/auto (default is AUTO, but not safe) | auto | No |\\
*AttributeDescriptionDefault* {table-plus}
*Value*
*Required*
\\
serverIP or DNS name of the serverYes(except when using FtpService)
portthe port number of the ftp server21No
\\
userthe user login name used to connect to the serverYes(except when using FtpService)
passwordthe user passwordYes(except when using FtpService)
folderthe folder on the FTP serverNo filenamefile name for the standard PUT operation (write the XML message content content.xmlNo
on the FTP server)
\\
connection- mode
In Active mode, the connection port is set by the client . In Passive mode, activeNo it is set by the server. (default is Active)
transfer-type transfer mode used for put or get files ascii/binary/auto (default is AUTO, autoNo but not safe)
\\
*Required*
\\
serverIP or DNS name of the serverYes(except when using FtpService)
portthe port number of the ftp server21No
\\
userthe user login name used to connect to the serverYes(except when using FtpService)
passwordthe user passwordYes(except when using FtpService)
folderthe folder on the FTP serverNo filenamefile name for the standard PUT operation (write the XML message content content.xmlNo
on the FTP server)
\\
connection- mode
In Active mode, the connection port is set by the client . In Passive mode, activeNo it is set by the server. (default is Active)
transfer-type transfer mode used for put or get files ascii/binary/auto (default is AUTO, autoNo but not safe)
\\
*Table* *2.2. Configuration of a Service Unit to provide a service (CDK)*
\\
\\
|| Parameter || Description || Default value || Required || \\ ||
| wsdl-imports\- download | If false, the external imports declared in the service WSDL won't be downloaded, so they won't be replaced by their content. | True | No | \\ |
| wsdl | Path to the WSDL document describing services and operations exposed by the provided JBI endpoints defined in the SU. \\
The value of this parameter is : \\
• an URL \\
• a file relative to the root of the SU package \\
If not specified, a basic WSDL description is automaticaly provided by the CDK. | - | No | \\ |
| timeout | Timeout in milliseconds of a synchronous send. this parameter can be used in conjunction with the sendSync(Exchange exchange) method of the Listeners. Set 0 for an infinite timeout. | - | No | \\ |
| org.ow2.petals.messaging.provider.coa | Check Petals container document for further details. This propety activates the bypass of acknowledgment messages destinated to this SU. |
| wsdl-imports\- download | If false, the external imports declared in the service WSDL won't be downloaded, so they won't be replaced by their content. | True | No | \\ |
| wsdl | Path to the WSDL document describing services and operations exposed by the provided JBI endpoints defined in the SU. \\
The value of this parameter is : \\
• an URL \\
• a file relative to the root of the SU package \\
If not specified, a basic WSDL description is automaticaly provided by the CDK. | - | No | \\ |
| timeout | Timeout in milliseconds of a synchronous send. this parameter can be used in conjunction with the sendSync(Exchange exchange) method of the Listeners. Set 0 for an infinite timeout. | - | No | \\ |
| org.ow2.petals.messaging.provider.coa | Check Petals container document for further details. This propety activates the bypass of acknowledgment messages destinated to this SU. |
*ParameterDescriptionDefaultRequired*
\\ {table-plus}
wsdl-imports- download
If false, the external imports declared in the service WSDL won't be downloaded, so they won't be replaced by their content.
h3. 2.1.2. Service Unit content \\
TrueNo
wsdlPath to the WSDL document describing services and operations exposed by the provided JBI endpoints defined in the SU.
\\
The value of this parameter is :
\\
• an URL
\\
• a file relative to the root of the SU package
\\
If not specified, a basic WSDL description is automaticaly provided by the CDK.
timeoutTimeout in milliseconds of a synchronous send. this parameter can be used in conjunction with the sendSync(Exchange exchange) method of the Listeners. Set 0 for an infinite timeout.
org.ow2.petals.messaging.provideCr.hneocakckPEtALS container document for further details.
\\
This propety activates the bypass of acknowledgment messages destinated to this SU.
\\
h3.2.1.2. Service Unit content
\\
wsdlPath to the WSDL document describing services and operations exposed by the provided JBI endpoints defined in the SU.
\\
The value of this parameter is :
\\
• an URL
\\
• a file relative to the root of the SU package
\\
If not specified, a basic WSDL description is automaticaly provided by the CDK.
timeoutTimeout in milliseconds of a synchronous send. this parameter can be used in conjunction with the sendSync(Exchange exchange) method of the Listeners. Set 0 for an infinite timeout.
org.ow2.petals.messaging.provideCr.hneocakckPEtALS container document for further details.
\\
This propety activates the bypass of acknowledgment messages destinated to this SU.
\\
h3.2.1.2. Service Unit content
\\
The Service Unit has to contain the following elements, packaged in an archive:
\\
\\
• * The META-INF/jbi.xml descriptor file, has described above,
* An optional wsdl file describing the related service
\\
• An optional wsdl file describing the related service
-No {code}service-unit.zip
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
-No
\\
\\
\\
-No
\\
service-unit.zip
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
-No
\\
\\
\\
-No
\\
service-unit.zip
\\
\\
\\
+ META-INF
- jbi.xml (as defined above)
- service.wsdl (optional)
{code}
h3. 2.1.3. FTP Service
h3. 2.1.3. FTP Service
\\
h3.2.1.3. FTP Service
\\
\\
The petals-bc-ftp component provides 5 operations, when using the Ftp service:
\\
\\
• * *dir* : return the files list on the FTP server
* *put* : copy incoming XML message on the FTP server
* *mput* : copy incoming message attachments on the FTP server
* *get* : get one specified file from the FTP server and return it as an XML message
* *mget* : get files from the FTP server and return them as attachments
* *mput* : copy incoming message attachments on the FTP server
* *get* : get one specified file from the FTP server and return it as an XML message
* *mget* : get files from the FTP server and return them as attachments
\\
• *put* : copy incoming XML message on the FTP server
\\
• *mput* : copy incoming message attachments on the FTP server
\\
• *get* : get one specified file from the FTP server and return it as an XML message
\\
• *mget* : get files from the FTP server and return them as attachments
\\
\\
• *mput* : copy incoming message attachments on the FTP server
\\
• *get* : get one specified file from the FTP server and return it as an XML message
\\
• *mget* : get files from the FTP server and return them as attachments
\\
When using the FTP service, you can optionnaly define the FTP connection information in your XML request. If you don't, the service unit parameters are used.
\\
To configure the FTP connection in your XML message request, you have to provide a connection element.
\\
To configure the FTP connection in your XML message request, you have to provide a connection element.
\\
\\ {code}
...
<ver:connection>
<ver:server>server</ver:server>
<ver:port>port</ver:port>
<ver:user>user</ver:user>
<ver:password>password</ver:password>
<ver:folder>folder (optional)</ver:folder>
<ver:connection-mode>active|passive (optional, default is active)</ver:connection-mode>
<ver:transfer-type>ascii|binary|auto (optional, default is auto)</ver:connection-mode>
</ver:connection>
<ver:server>server</ver:server>
<ver:port>port</ver:port>
<ver:user>user</ver:user>
<ver:password>password</ver:password>
<ver:folder>folder (optional)</ver:folder>
<ver:connection-mode>active|passive (optional, default is active)</ver:connection-mode>
<ver:transfer-type>ascii|binary|auto (optional, default is auto)</ver:connection-mode>
</ver:connection>
{code}
<ver:connection>
h4. 2.1.3.1. DIR operation
<ver:server>server</ver:server>
<ver:port>port</ver:port>
<ver:user>user</ver:user>
<ver:password>password</ver:password>
<ver:folder>folder (optional)</ver:folder>
<ver:connection-mode>active|passive (optional, default is active)</ver:connection-mode>
<ver:transfer-type>ascii|binary|auto (optional, default is auto)</ver:connection-mode>
</ver:connection>
<ver:user>user</ver:user>
<ver:password>password</ver:password>
<ver:folder>folder (optional)</ver:folder>
<ver:connection-mode>active|passive (optional, default is active)</ver:connection-mode>
<ver:transfer-type>ascii|binary|auto (optional, default is auto)</ver:connection-mode>
</ver:connection>
\\
\\
h4.2.1.3.1. DIR operation
\\
h4.2.1.3.1. DIR operation
\\
When the dir operation is set on the incoming IN message, the component returns the file names listed from the FTP
server.
\\
The IN message looks like :
server.
\\
The IN message looks like :
\\
\\ {code}
<ver:dir>
<!--Optional:-->
<ver:connection>
...
</ver:connection>
<ver:connection>
...
</ver:connection>
<!--Optional:--> </ver:dir>{code}
<ver:connection>
...
</ver:connection>
</ver:dir>
\\
\\
...
</ver:connection>
</ver:dir>
\\
\\
The OUT message returned to the consumer is defined as follow :
\\
[<tns:dirResponse|http://petals.ow2.org/components/ftp/version-3.0 ] xmlns:tns="http://petals.ow2.org/components/ftp/version-3.0">
<tns:filename>source.xml</tns:filename>
<tns:filename>test.xml</tns:filename>
<tns:filename>source.xml</tns:filename>
<tns:filename>test.xml</tns:filename>
{code:lang=xml}<tns:dirResponse xmlns:tns="http://petals.ow2.org/components/ftp/version-3.0">
<tns:filename>source.xml</tns:filename>
<tns:filename>test.xml</tns:filename>
<tns:filename>source.xml</tns:filename>
<tns:filename>test.xml</tns:filename>
</tns:dirResponse>
\\ {code}
\\
The service might return a Fault when an element in the request is missing or if the FTP connection failed
\\
\\
The available exchange patterns are : *InOptionalOut{*}, *InOnly{*}, *RobustInOnly{*}. *InOptionalOut*, *InOnly*, *RobustInOnly*.
\\
h4. 2.1.3.2. PUT operation
\\
When the put operation is set on the incoming IN message, the component write the XML message to the FTP server.
\\
\\
\\
\\
The IN message looks like :
\\
[<ver:put|http://petals.ow2.org/components/ftp/version-3.0 ] xmlns:ver="http://petals.ow2.org/components/ftp/version-3.0">
\\
\\
{code:lang=xml}<ver:put xmlns:ver="http://petals.ow2.org/components/ftp/version-3.0">
<ver:body>xml body</ver:body>
<ver:filename>file name on the FTP server</ver:filename>
\\
<!--Optional:-->
<ver:connection>
...
</ver:connection>
<!--Optional:-->
<ver:connection>
...
</ver:connection>
<!--Optional:-->
<ver:connection>
...
</ver:connection>
<ver:connection>
...
</ver:connection>
</ver:put>
\\ {code}
\\
The service does not return a message.
\\
\\
The service might return a Fault when an element in the request is missing or if the FTP connection failed
\\
\\
The available exchange patterns are : *InOptionalOut{*}, *InOnly{*}, *RobustInOnly{*}. *InOptionalOut*, *InOnly*, *RobustInOnly*.
\\
\\
h4. 2.1.3.3. MPUT operation
When the mput operation is set on the incoming IN message, the component write the attachments on the FTP server. The IN message looks like :
\\
\\
[<ver:mput|http://petals.ow2.org/components/ftp/version-3.0 ] xmlns:ver="http://petals.ow2.org/components/ftp/version-3.0">
[|http://petals.ow2.org/components/ftp/version-3.0]
<!--Optional:-->
<ver:connection>
...
</ver:connection>
...
</ver:connection>
{code}<ver:mput xmlns:ver="http://petals.ow2.org/components/ftp/version-3.0">
<!--Optional:-->
<ver:connection>
...
</ver:connection>
<!--Optional:-->
<ver:connection>
...
</ver:connection>
</ver:mput>
\\ {code}
\\
\\
\\
The service does not return a message.
\\
\\
\\
The service might return a Fault when an element in the request is missing or if the FTP connection failed
The available exchange patterns are : *InOptionalOut*, *InOnly*, *RobustInOnly*.
\\
The available exchange patterns are : *InOptionalOut{*}, *InOnly{*}, *RobustInOnly{*}.
\\
\\
\\
\\
h4. 2.1.3.4. GET operation
\\
When the get operation is set on the incoming IN message, the component retrieve ONE file from the FTP server and return it as an XML message content.
\\
\\
The name of the file to retrieve is set in the XML IN content of the message.
\\
The IN message looks like :
\\
\\
[<ver:get|http://petals.ow2.org/components/ftp/version-3.0 ] xmlns:ver="http://petals.ow2.org/components/ftp/version-3.0">
[|http://petals.ow2.org/components/ftp/version-3.0]
\\
{code}<ver:get xmlns:ver="http://petals.ow2.org/components/ftp/version-3.0">
<ver:filename>file name to retrieve</ver:filename>
<!--Optional:-->
<ver:connection>
...
</ver:connection>
</ver:get>
<ver:connection>
...
</ver:connection>
</ver:get>
\\ {code}
<!--Optional:-->
<ver:connection>
...
</ver:connection>
</ver:get>
\\
<ver:connection>
...
</ver:connection>
</ver:get>
\\
The OUT message returned to the consumer is the content of the XML file
\\
\\
The service might return a Fault when an element in the request is missing or if the FTP connection failed
\\
\\
The available exchange patterns are : *InOptionalOut* and *InOut{*}. *InOut*.
\\
\\
h4. 2.1.3.5. MGET operation
\\
h4.2.1.3.5. MGET operation
\\
\\
When the mget operation is set on the incoming IN message, the component retrieves files from the FTP server, according to the file names (or filters) set in the XML request.
\\
\\
There is no recursivity, sub folders are ignored.
Each file is set in the OUT message as an attachment. The IN message looks like :
\\
\\
[<ver:mget|http://petals.ow2.org/components/ftp/version-3.0 ] xmlns:ver="http://petals.ow2.org/components/ftp/version-3.0">
\\
\\
[|http://petals.ow2.org/components/ftp/version-3.0]
{code:lang=xml}<ver:mget xmlns:ver="http://petals.ow2.org/components/ftp/version-3.0">
{code:lang=xml}<ver:mget xmlns:ver="http://petals.ow2.org/components/ftp/version-3.0">
<!--1 or more repetitions:-->
<ver:filename>*.xml</ver:filename>
<ver:filename>myFile.txt</ver:filename>
\\
<!--Optional:-->
<ver:connection>
...
</ver:connection>
<ver:filename>myFile.txt</ver:filename>
\\
<!--Optional:-->
<ver:connection>
...
</ver:connection>
<ver:filename>*.xml</ver:filename>
<ver:filename>myFile.txt</ver:filename>
<!--Optional:-->
<ver:connection>
...
</ver:connection>
<ver:filename>myFile.txt</ver:filename>
<!--Optional:-->
<ver:connection>
...
</ver:connection>
</ver:mget>
\\ {code}
\\
The OUT message returned to the consumer contains files, as attachments, and an XML message report :
\\
\\
[<tns:mgetResponse|http://petals.ow2.org/components/ftp/version-3.0 ] xmlns:tns="http://petals.ow2.org/components/ftp/version-3.0">
<tns:filename>source.xml</tns:filename>
<tns:filename>source2.xml</tns:filename>
<tns:filename>myFile.txt</tns:filename>
<tns:filename>source.xml</tns:filename>
<tns:filename>source2.xml</tns:filename>
<tns:filename>myFile.txt</tns:filename>
[|http://petals.ow2.org/components/ftp/version-3.0]
{code:lang=xml}<tns:mgetResponse xmlns:tns="http://petals.ow2.org/components/ftp/version-3.0">
<tns:filename>source.xml</tns:filename>
<tns:filename>source2.xml</tns:filename>
<tns:filename>myFile.txt</tns:filename>
{code:lang=xml}<tns:mgetResponse xmlns:tns="http://petals.ow2.org/components/ftp/version-3.0">
<tns:filename>source.xml</tns:filename>
<tns:filename>source2.xml</tns:filename>
<tns:filename>myFile.txt</tns:filename>
</tns:mgetResponse>
\\ {code}
\\
The service might return a Fault when an element in the request is missing or if the FTP connection failed
\\
\\
The available exchange patterns are : *InOptionalOut{*}, *InOut{*}. *InOptionalOut*, *InOut*.
<?xml version="1.0" encoding="UTF-8"?>
<\!-\- JBI descriptor for PEtALS' "petals-bc-ftp" (FTP), version 3.0 \-->
<jbi:jbi version="1.0"
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.0"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-4.0"
xmlns:interfaceNs="http://petals.ow2.org/components/ftp/version-3.0"
xmlns:serviceNs="http://myservice">
<\!-\- Import a Service into PEtALS or Expose a PEtALS Service => use a BC. \-->
<jbi:services binding-component="true">
<\!-\- Import a Service into PEtALS => provides a Service. \-->
<jbi:provides
interface-name="interfaceNs:Ftp"
service-name="serviceNs:FtpSrv"
endpoint-name="FtpSrvEndpoint">
<\!-\- CDK specific elements \-->
<petalsCDK:wsdl>ftp.wsdl</petalsCDK:wsdl>
<\!-\- Component specific elements \-->
<ftp:server>server</ftp:server>
<ftp:port>21</ftp:port>
<ftp:user>user</ftp:user>
<ftp:password>password</ftp:password>
<ftp:folder>folder</ftp:folder>
<ftp:filename>file.xml</ftp:filename>
</jbi:provides>
</jbi:services>
</jbi:jbi>