petals-BC-FTP

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

Changes (9)

View Page History
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\*
operations. Otherwise, the standard PUT operation is called.
\\
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 :
\\
[|http://petals.ow2.org/components/ftp/version-3.0]

{code}<ver:mput xmlns:ver="http://petals.ow2.org/components/ftp/version-3.0">
The IN message looks like :
\\
[|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>
Each file is set in the OUT message as an attachment. The IN message looks like :
\\
[|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:-->
The OUT message returned to the consumer contains files, as attachments, and an XML message report :
\\
[|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>

The available exchange patterns are : *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. \-->
&nbsp; <jbi:provides
&nbsp; interface-name="interfaceNs:Ftp"
&nbsp; service-name="serviceNs:FtpSrv"
&nbsp; endpoint-name="FtpSrvEndpoint">
&nbsp;&nbsp;&nbsp; <\!-\- CDK specific elements \-->
&nbsp;&nbsp;&nbsp; <petalsCDK:wsdl>ftp.wsdl</petalsCDK:wsdl>
&nbsp;&nbsp;&nbsp; <\!-\- Component specific elements \-->
&nbsp;&nbsp;&nbsp; <ftp:server>server</ftp:server>
&nbsp;&nbsp;&nbsp; <ftp:port>21</ftp:port>
&nbsp;&nbsp;&nbsp; <ftp:user>user</ftp:user>
&nbsp;&nbsp;&nbsp; <ftp:password>password</ftp:password>
&nbsp;&nbsp;&nbsp; <ftp:folder>folder</ftp:folder>
&nbsp;&nbsp;&nbsp; <ftp:filename>file.xml</ftp:filename>
&nbsp; </jbi:provides>
</jbi:services>
</jbi:jbi>