|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (29)
View Page Historyh1. Service Configuration
{include:0 CDK SU Provide Configuration}
h2. Put XML content or send FTP commands to the FTP server
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
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-5"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-4.0" xmlns:ftp="http://petals.ow2.org/components/ftp/version-3"
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. -->
<!-- Import a Service into PEtALS or Expose a PEtALS Service => use a BC. -->
endpoint-name="FtpSrvEndpoint">
<!-- CDK specific elements -->
<!-- CDK specific elements -->
<petalsCDK:wsdl>ftp.wsdl</petalsCDK:wsdl> <petalsCDK:wsdl>FtpService.wsdl</petalsCDK:wsdl>
<!-- Component specific elements -->
<ftp:server>server</ftp:server>
<ftp:server>server</ftp:server>
<ftp:password>password</ftp:password>
<ftp:folder>folder</ftp:folder>
<ftp:folder>folder</ftp:folder>
<ftp:filename>file.xml</ftp:filename>
</jbi:provides>
</jbi:services>
</jbi:services>
|| Attribute || Description || Default value || Required ||
| server | IP or DNS name of the server | | Yes (except when uins FtpService) |
| server | IP or DNS name of the server | | Yes (except when uins FtpService) |
| 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 | ascii | No |
| transfer-type | transfer mode used for put or get files ascii/binary | ascii | No |
| delete-processed-files | If true, the service delete the files processed by operation get or mget | false | No \\ |
| encoding | Set the encoding encoding value used to process ftp operation. | Default JVM Encoding \\ | No \\ |
| encoding | Set the encoding encoding value used to process ftp operation. | Default JVM Encoding \\ | No \\ |
{table-plus}
*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 |
|| 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 |
|| 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. |
h3. 2.1.2. Service Unit content \\
* *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
* *mget* : get files from the FTP server and return them as attachments
* *del* : remove file on the FTP server
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.
\\ {code:lang=xml}
...
<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:port>port</ver:port>
<ver:user>user</ver:user>
<ver:password>password</ver:password>
<ver:folder>folder (optional)</ver:folder>
<ver:server>?</ver:server>
<ver:port>?</ver:port>
<ver:user>?</ver:user>
<ver:password>?</ver:password>
<!--Optional:-->
<ver:folder>?</ver:folder>
<ver:transfer-type>ascii|binary</ver:transfer-type>
<ver:port>?</ver:port>
<ver:user>?</ver:user>
<ver:password>?</ver:password>
<!--Optional:-->
<ver:folder>?</ver:folder>
<ver:transfer-type>ascii|binary</ver:transfer-type>
<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:delete-processed-files>true|false(optional, default is active)</ver:delete-processed-files>
<ver:encoding>?</ver:encoding>
<ver:encoding>?</ver:encoding>
</ver:connection>
{code}
\\
The IN message looks like :
The IN message looks like :
\\ {code:lang=xml}
<ver:dir>
<!--Optional:-->
<!--Optional:-->
{code:lang=xml}<tns:dirResponse xmlns:tns="http://petals.ow2.org/components/ftp/version-3.0">
<!--Zero or more repetitions:-->
<tns:filename>file1.txt</tns:filename>
<tns:filename>file1.txt</tns:filename>
<tns:filename>source.xml</tns:filename> <tns:filename>linux.jpg</tns:filename>
<tns:filename>test.xml</tns:filename>
</tns:dirResponse>
{code}
{code}
\\
The available exchange patterns are : *InOptionalOut*, *InOnly*, *RobustInOnly*.
The available exchange pattern is : *InOut*.
\\
{code}<ver:mput xmlns:ver="http://petals.ow2.org/components/ftp/version-3.0">
<!--Optional:-->
<!--Optional:-->
{code}<ver:get xmlns:ver="http://petals.ow2.org/components/ftp/version-3.0">
<ver:filename>file name to retrieve</ver:filename>
<ver:filename>file name to retrieve</ver:filename>
{code:lang=xml}<ver:mget xmlns:ver="http://petals.ow2.org/components/ftp/version-3.0">
<!--1 or more repetitions:-->
<!--1 or more repetitions:-->
{code:lang=xml}<tns:mgetResponse xmlns:tns="http://petals.ow2.org/components/ftp/version-3.0">
<tns:filename>source.xml</tns:filename>
<tns:filename>source.xml</tns:filename>