camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r989020 - in /websites/production/camel/content: cache/main.pageCache mime-multipart.html
Date Tue, 24 May 2016 09:18:34 GMT
Author: buildbot
Date: Tue May 24 09:18:34 2016
New Revision: 989020

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/mime-multipart.html

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/camel/content/mime-multipart.html
==============================================================================
--- websites/production/camel/content/mime-multipart.html (original)
+++ websites/production/camel/content/mime-multipart.html Tue May 24 09:18:34 2016
@@ -85,7 +85,7 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><p><strong>Available as of Camel
2.17</strong></p><p>This data format that can convert a Camel message with
attachments into a Camel message having a MIME-Multipart message as message body (and no attachments).</p><p>The
use case for this is to enable the user to send attachments over endpoints that do not directly
support attachments, either as special protocol implementation (e.g. send a MIME-multipart
over an HTTP endpoint) or as a kind of tunneling solution (e.g. because camel-jms does not
support attachments but by marshalling the message with attachments into a MIME-Multipart,
sending that to a JMS queue, receiving the message from the JMS queue and unmarshalling it
again (into a message body with attachments).</p><p>The marshal option of the
mime-multipart data format will convert a message with attachments into a MIME-Multipart message.
If the parameter "multipartWithoutAttachment" is set to true it will also marshal messages
without att
 achments into a multipart message with a single part, if the parameter is set to false it
will leave the message alone.</p><p>MIME headers of the mulitpart as "MIME-Version"
and "Content-Type" are set as camel headers to the message. If the parameter "headersInline"
is set to true it will also create a MIME multipart message in any case. <br clear="none">Furthermore
the MIME headers of the multipart are written as part of the message body, not as camel headers.</p><p>The
unmarshal option of the mime-multipart data format will convert a MIME-Multipart message into
a camel message with attachments and leaves other messages alone. MIME-Headers of the MIME-Multipart
message have to be set as Camel headers. The unmarshalling will only take place if the "Content-Type"
header is set to a "multipart" type. If the option "headersInline" is set to true, the body
is always parsed as a MIME message. Messages that are actually not MIME messages with MIME
headers in the message body&#160;will be 
 parsed into empty messages.</p><h3 id="MIME-Multipart-Options">Options</h3><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh">Option</th><th colspan="1" rowspan="1" class="confluenceTh">Default</th><th
colspan="1" rowspan="1" class="confluenceTh">Description</th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">multipartWithoutAttachment</td><td
colspan="1" rowspan="1" class="confluenceTd">false</td><td colspan="1" rowspan="1"
class="confluenceTd">If set to true the marshal operation will create a multipart (with
a single part) if the message does not contain any attachments. If this is set to false it
will leave messages without attachments alone.</td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd">headersInline</td><td colspan="1" rowspan="1"
class="confluenceTd">false</td><td colspan="1" rowspan="1" class="confluenceTd"><p>If
set to true the marshal operation will add the MIME headers of the Multipa
 rt as part of the message body and not as a camel header. In case of a unmarshal operations
the MIME headers are assumed to be contained in the message body and the operation will always
parse the message as MIME message.</p><p>Note: Any message is a valid MIME message,
so the unmarshal operation with this parameter set to true will never result in an error but
will return an empty message (as anything outside the MIME boundary is considered to be a
comment).</p><p>Note: If the headersInline parameter is set to "true", the message
will also always be rendered into a MIME multipart regardless whether it has an attachment
or not.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>includeHeaders&#160;</p></td><td
colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1"
class="confluenceTd"><p>A regex that defines which Camel headers are also included
as MIME headers into the MIME multipart. This will only work if headersInline is set to true.<
 br clear="none">Default is to include no Camel headers.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">binaryContent</td><td colspan="1"
rowspan="1" class="confluenceTd">false</td><td colspan="1" rowspan="1" class="confluenceTd">If
set to true non-text content will be transferred in binary mode, if set to false (default)
binary content will be transferred in base64 encoding. This is shorter but might not work
for all transfer methods.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">multipartSubType</td><td
colspan="1" rowspan="1" class="confluenceTd">mixed</td><td colspan="1" rowspan="1"
class="confluenceTd">The subtype of the generated MIME multipart. Other options are related,
alternative, digest, or parallel. The data type does not enforce any semantics for these subtypes
(so e.g. the user has to make sure that the first body part of a multipart/digest message
is proper message/rfc822 data). The default mixed is usually a good choice.</td></tr></t
 body></table></div><h3 id="MIME-Multipart-MessageHeaders(marshal)">Message
Headers (marshal)</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh">Name</th><th colspan="1" rowspan="1"
class="confluenceTh">Type</th><th colspan="1" rowspan="1" class="confluenceTh">Description</th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">Message-Id</td><td colspan="1" rowspan="1"
class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">The
marshal operation will set this parameter to the generated MIME message id if the "headersInline"
parameter is set to false.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MIME-Version</td><td
colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1"
class="confluenceTd">The marshal operation will set this parameter to the applied MIME
version (1.0) if the "headersInline" parameter is set to false.</td></tr><tr><td
colspan
 ="1" rowspan="1" class="confluenceTd">Content-Type</td><td colspan="1" rowspan="1"
class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">The
content of this header will be used as a content type for the message body part. If no content
type is set, "application/octet-stream" is assumed. After the marshal operation the content
type is set to "multipart/related" or empty if the "headersInline" parameter is set to true.</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">Content-Encoding</td><td colspan="1"
rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">If
the incoming content type is "text/*" the content encoding will be set to the encoding parameter
of the Content-Type MIME header of the body part. Furthermore the given charset is applied
for text to binary conversions.</td></tr></tbody></table></div><h3
id="MIME-Multipart-MessageHeaders(unmarshal)">Message Headers (unmarshal)</h3><div
class="table-wra
 p"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh">Name</th><th colspan="1" rowspan="1" class="confluenceTh">Type</th><th
colspan="1" rowspan="1" class="confluenceTh">Description</th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">Content-Type</td><td colspan="1"
rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;If
this header is not set to "multipart/*" the unmarshal operation will not do anything. In other
cases the multipart will be parsed into a camel message with attachments and the header is
set to the Content-Type header of the body part, except if this is application/octet-stream.
In the latter case the header is removed.</td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd">Content-Encoding</td><td colspan="1" rowspan="1"
class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">If
the content-type of the body part contains an encoding paramet
 er this header will be set to the value of this encoding parameter (converted from MIME endoding
descriptor to Java encoding descriptor)</td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd">MIME-Version</td><td colspan="1" rowspan="1"
class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">The
unmarshal operation will read this header and use it for parsing the MIME multipart. The header
is removed afterwards</td></tr></tbody></table></div><h3
id="MIME-Multipart-Examples">Examples</h3><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
+<div class="wiki-content maincontent"><p><strong>Available as of Camel
2.17</strong></p><p>This data format that can convert a Camel message with
attachments into a Camel message having a MIME-Multipart message as message body (and no attachments).</p><p>The
use case for this is to enable the user to send attachments over endpoints that do not directly
support attachments, either as special protocol implementation (e.g. send a MIME-multipart
over an HTTP endpoint) or as a kind of tunneling solution (e.g. because camel-jms does not
support attachments but by marshalling the message with attachments into a MIME-Multipart,
sending that to a JMS queue, receiving the message from the JMS queue and unmarshalling it
again (into a message body with attachments).</p><p>The marshal option of the
mime-multipart data format will convert a message with attachments into a MIME-Multipart message.
If the parameter "multipartWithoutAttachment" is set to true it will also marshal messages
without att
 achments into a multipart message with a single part, if the parameter is set to false it
will leave the message alone.</p><p>MIME headers of the mulitpart as "MIME-Version"
and "Content-Type" are set as camel headers to the message. If the parameter "headersInline"
is set to true it will also create a MIME multipart message in any case. <br clear="none">Furthermore
the MIME headers of the multipart are written as part of the message body, not as camel headers.</p><p>The
unmarshal option of the mime-multipart data format will convert a MIME-Multipart message into
a camel message with attachments and leaves other messages alone. MIME-Headers of the MIME-Multipart
message have to be set as Camel headers. The unmarshalling will only take place if the "Content-Type"
header is set to a "multipart" type. If the option "headersInline" is set to true, the body
is always parsed as a MIME message.As a consequence if the message body is a stream and stream
caching is not enabled, a message bod
 y that is actually not a MIME message with MIME headers in the message body will be replaced
by an empty message. Up to Camel version 2.17.1 this will happen all message bodies that do
not contain a MIME multipart message regardless of body type and stream cache setting.</p><h3
id="MIME-Multipart-Options">Options</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh">Option</th><th colspan="1" rowspan="1"
class="confluenceTh">Default</th><th colspan="1" rowspan="1" class="confluenceTh">Description</th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">multipartWithoutAttachment</td><td
colspan="1" rowspan="1" class="confluenceTd">false</td><td colspan="1" rowspan="1"
class="confluenceTd">If set to true the marshal operation will create a multipart (with
a single part) if the message does not contain any attachments. If this is set to false it
will leave messages without attachments alone.</td></tr><tr><td colspan
 ="1" rowspan="1" class="confluenceTd">headersInline</td><td colspan="1" rowspan="1"
class="confluenceTd">false</td><td colspan="1" rowspan="1" class="confluenceTd"><p>If
set to true the marshal operation will add the MIME headers of the Multipart as part of the
message body and not as a camel header. In case of a unmarshal operations the MIME headers
are assumed to be contained in the message body and the operation will always parse the message
as MIME message.</p><p>Note: Any message is a valid MIME message, so the unmarshal
operation with this parameter set to true will never result in an error. However if the parsing
result does not contain any MIME part, starting with Camel 2.17.2 the unmarshaller tries to
restore the original message. If this is not possible because the message body is a stream
and stream caching is not enabled or with older Camel versions, the resulting message body
is empty.</p><p>Note: If the headersInline parameter is set to "true", the message
will also al
 ways be rendered into a MIME multipart regardless whether it has an attachment or not.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>includeHeaders&#160;</p></td><td
colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1"
class="confluenceTd"><p>A regex that defines which Camel headers are also included
as MIME headers into the MIME multipart. This will only work if headersInline is set to true.<br
clear="none">Default is to include no Camel headers.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">binaryContent</td><td colspan="1"
rowspan="1" class="confluenceTd">false</td><td colspan="1" rowspan="1" class="confluenceTd">If
set to true non-text content will be transferred in binary mode, if set to false (default)
binary content will be transferred in base64 encoding. This is shorter but might not work
for all transfer methods.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">multipartSubType</td><td
cols
 pan="1" rowspan="1" class="confluenceTd">mixed</td><td colspan="1" rowspan="1"
class="confluenceTd">The subtype of the generated MIME multipart. Other options are related,
alternative, digest, or parallel. The data type does not enforce any semantics for these subtypes
(so e.g. the user has to make sure that the first body part of a multipart/digest message
is proper message/rfc822 data). The default mixed is usually a good choice.</td></tr></tbody></table></div><h3
id="MIME-Multipart-MessageHeaders(marshal)">Message Headers (marshal)</h3><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh">Name</th><th colspan="1" rowspan="1" class="confluenceTh">Type</th><th
colspan="1" rowspan="1" class="confluenceTh">Description</th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">Message-Id</td><td colspan="1" rowspan="1"
class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">The
marshal operation w
 ill set this parameter to the generated MIME message id if the "headersInline" parameter
is set to false.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">MIME-Version</td><td
colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1"
class="confluenceTd">The marshal operation will set this parameter to the applied MIME
version (1.0) if the "headersInline" parameter is set to false.</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">Content-Type</td><td colspan="1"
rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">The
content of this header will be used as a content type for the message body part. If no content
type is set, "application/octet-stream" is assumed. After the marshal operation the content
type is set to "multipart/related" or empty if the "headersInline" parameter is set to true.</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">Content-Encoding</td><td colspan="1"
ro
 wspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">If
the incoming content type is "text/*" the content encoding will be set to the encoding parameter
of the Content-Type MIME header of the body part. Furthermore the given charset is applied
for text to binary conversions.</td></tr></tbody></table></div><h3
id="MIME-Multipart-MessageHeaders(unmarshal)">Message Headers (unmarshal)</h3><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh">Name</th><th colspan="1" rowspan="1" class="confluenceTh">Type</th><th
colspan="1" rowspan="1" class="confluenceTh">Description</th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">Content-Type</td><td colspan="1"
rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;If
this header is not set to "multipart/*" the unmarshal operation will not do anything. In other
cases the multipart will be parsed 
 into a camel message with attachments and the header is set to the Content-Type header of
the body part, except if this is application/octet-stream. In the latter case the header is
removed.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Content-Encoding</td><td
colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1"
class="confluenceTd">If the content-type of the body part contains an encoding parameter
this header will be set to the value of this encoding parameter (converted from MIME endoding
descriptor to Java encoding descriptor)</td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd">MIME-Version</td><td colspan="1" rowspan="1"
class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">The
unmarshal operation will read this header and use it for parsing the MIME multipart. The header
is removed afterwards</td></tr></tbody></table></div><h3
id="MIME-Multipart-Examples">Examples</h3><div class="code panel pd
 l" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from(...).marshal().mimeMultipart()
 
 ]]></script>



Mime
View raw message