|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (5)
View Page History|| 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) |
{info}Only xml file could be processed otherwise an error will be raised.{info}
h4. GETASATTACHMENT Operation
h4. MGET 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 attachment.
The name of the file to retrieve is set in the XML IN content of the message.
The IN message looks like :
{code:lang=xml}<?xml version="1.0" encoding="UTF-8"?>
<ver:getAsAttachment xmlns:ver="http://petals.ow2.org/components/ftp/version-3">
<ver:filename>file name to retrieve</ver:filename>
<!--Optional:-->
<ver:connection>
...
</ver:connection>
</ver:getAsAttachment>
{code}
The OUT message returned to the consumer contains files, as attachments, and an XML message report :
{code:lang=xml}<?xml version="1.0" encoding="UTF-8"?>
<tns:getAsAttachmentResponse xmlns:tns="http://petals.ow2.org/components/ftp/version-3">
<tns:attachments>
<tns:filename><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:test1.xml"/></tns:filename>
<tns:filename><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:test2.xml"/></tns:filename>
</tns:attachments>
</tns:getAsAttachmentResponse>
{code}
The service might return a Fault when an element in the request is missing or if the FTP connection failed
The available exchange pattern is : *InOut*.
h4. MGET Operation
The IN message looks like :
{code:lang=xml}<?xml version="1.0" encoding="UTF-8"?>
<ver:getAsAttachment xmlns:ver="http://petals.ow2.org/components/ftp/version-3">
<ver:filename>file name to retrieve</ver:filename>
<!--Optional:-->
<ver:connection>
...
</ver:connection>
</ver:getAsAttachment>
{code}
The OUT message returned to the consumer contains files, as attachments, and an XML message report :
{code:lang=xml}<?xml version="1.0" encoding="UTF-8"?>
<tns:getAsAttachmentResponse xmlns:tns="http://petals.ow2.org/components/ftp/version-3">
<tns:attachments>
<tns:filename><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:test1.xml"/></tns:filename>
<tns:filename><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:test2.xml"/></tns:filename>
</tns:attachments>
</tns:getAsAttachmentResponse>
{code}
The service might return a Fault when an element in the request is missing or if the FTP connection failed
The available exchange pattern is : *InOut*.
h4. 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.
\\
\\