Modified: websites/production/cxf/content/docs/jax-rs-maven-plugins.html
==============================================================================
--- websites/production/cxf/content/docs/jax-rs-maven-plugins.html (original)
+++ websites/production/cxf/content/docs/jax-rs-maven-plugins.html Wed Dec 22
21:03:39 2021
@@ -58,11 +58,7 @@ Apache CXF -- JAX-RS Maven Plugins
<td id="cell-1-1"> </td>
<td id="cell-1-2">
<!-- Banner -->
-<div class="banner" id="banner"><div><table border="0" cellpadding="0"
cellspacing="0" width="100%"><tr><td align="left" colspan="1" nowrap>
-<a shape="rect" href="http://cxf.apache.org/" title="Apache CXF"><span
style="font-weight: bold; font-size: 170%; color: white">Apache CXF</span></a>
-</td><td align="right" colspan="1" nowrap>
-<a shape="rect" href="http://www.apache.org/" title="The Apache Sofware
Foundation"><img border="0" alt="ASF Logo"
src="http://cxf.apache.org/images/asf-logo.png"></a>
-</td></tr></table></div></div>
+<div class="banner" id="banner"><img class="wysiwyg-unknown-macro"
src="https://cwiki.apache.org/confluence/plugins/servlet/confluence/placeholder/unknown-macro?name=html&locale=en_GB&version=2"></div>
<!-- Banner -->
<div id="top-menu">
<table border="0" cellpadding="1" cellspacing="0" width="100%">
@@ -99,15 +95,7 @@ Apache CXF -- JAX-RS Maven Plugins
<div id="wrapper-menu-page-bottom">
<div id="menu-page">
<!-- NavigationBar -->
-<div id="navigation"><ul class="alternate"><li><a shape="rect"
href="overview.html">Overview</a></li><li><a shape="rect"
href="how-tos.html">How-Tos</a></li><li><a shape="rect"
href="frontends.html">Frontends</a></li><li><a shape="rect"
href="databindings.html">DataBindings</a></li><li><a shape="rect"
href="transports.html">Transports</a></li><li><a shape="rect"
href="configuration.html">Configuration</a></li><li><a shape="rect"
href="debugging-and-logging.html">Debugging and Logging</a></li><li><a
shape="rect" href="tools.html">Tools</a></li><li><a shape="rect"
href="restful-services.html">RESTful Services</a></li><li><a shape="rect"
href="wsdl-bindings.html">WSDL Bindings</a></li><li><a shape="rect"
href="service-routing.html">Service Routing</a></li><li><a shape="rect"
href="dynamic-languages.html">Dynamic Languages</a></li><li><a shape="rect"
href="ws-support.html">WS-* Support</a></li><li><a shape="rect"
href="advanced-integration.html">Advanced Integration</a></li><li><a shape
="rect" href="deployment.html">Deployment</a></li><li><a shape="rect"
href="schemas-and-namespaces.html">Use of Schemas and
Namespaces</a></li></ul><hr><ul
class="alternate"><li><p>Search</p></li></ul><form
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box"
action="http://www.google.com/cse">
- <div>
- <input type="hidden" name="cx" value="002890367768291051730:o99qiwa09y4">
- <input type="hidden" name="ie" value="UTF-8">
- <input type="text" name="q" size="21">
- <input type="submit" name="sa" value="Search">
- </div>
-</form>
-<script type="text/javascript"
src="http://www.google.com/cse/brand?form=cse-search-box&lang=en"></script><hr><ul
class="alternate"><li><a shape="rect"
href="http://cxf.apache.org/javadoc/latest/">API 3.2.x (Javadoc)</a></li><li><a
shape="rect" href="http://cxf.apache.org/javadoc/latest-3.1.x/">API 3.1.x
(Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/">CXF
Website</a></li></ul><p> </p><p><a shape="rect" class="external-link"
href="http://www.apache.org/events/current-event.html"><span
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image
confluence-external-resource"
src="http://www.apache.org/events/current-event-125x125.png"
data-image-src="http://www.apache.org/events/current-event-125x125.png"></span></a></p></div>
+<div id="navigation"><ul class="alternate"><li><a shape="rect"
href="overview.html">Overview</a></li><li><a shape="rect"
href="how-tos.html">How-Tos</a></li><li><a shape="rect"
href="frontends.html">Frontends</a></li><li><a shape="rect"
href="databindings.html">DataBindings</a></li><li><a shape="rect"
href="transports.html">Transports</a></li><li><a shape="rect"
href="configuration.html">Configuration</a></li><li><a shape="rect"
href="debugging-and-logging.html">Debugging and Logging</a></li><li><a
shape="rect" href="tools.html">Tools</a></li><li><a shape="rect"
href="restful-services.html">RESTful Services</a></li><li><a shape="rect"
href="wsdl-bindings.html">WSDL Bindings</a></li><li><a shape="rect"
href="service-routing.html">Service Routing</a></li><li><a shape="rect"
href="dynamic-languages.html">Dynamic Languages</a></li><li><a shape="rect"
href="ws-support.html">WS-* Support</a></li><li><a shape="rect"
href="advanced-integration.html">Advanced Integration</a></li><li><a shape
="rect" href="deployment.html">Deployment</a></li><li><a shape="rect"
href="schemas-and-namespaces.html">Use of Schemas and
Namespaces</a></li></ul><hr><ul
class="alternate"><li><p>Search</p></li></ul><p><img
class="wysiwyg-unknown-macro"
src="https://cwiki.apache.org/confluence/plugins/servlet/confluence/placeholder/unknown-macro?name=html&locale=en_GB&version=2"></p><hr><ul
class="alternate"><li><a shape="rect"
href="http://cxf.apache.org/javadoc/latest-3.5.x/">API 3.5.x
(Javadoc)</a></li><li><a shape="rect"
href="http://cxf.apache.org/javadoc/latest-3.2.x/">API 3.2.x
(Javadoc)</a></li><li><a shape="rect"
href="http://cxf.apache.org/javadoc/latest-3.1.x/">API 3.1.x
(Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/">CXF
Website</a></li></ul><p><br clear="none"></p><p><a shape="rect"
class="external-link"
href="http://www.apache.org/events/current-event.html"><span
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image
confluence-exte
rnal-resource" src="http://www.apache.org/events/current-event-125x125.png"
data-image-src="http://www.apache.org/events/current-event-125x125.png"></span></a></p></div>
<!-- NavigationBar -->
</div>
</div>
@@ -124,19 +112,19 @@ Apache CXF -- JAX-RS Maven Plugins
<style type="text/css">/*<![CDATA[*/
-div.rbtoc1524513365142 {padding: 0px;}
-div.rbtoc1524513365142 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1524513365142 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1640206593581 {padding: 0px;}
+div.rbtoc1640206593581 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1640206593581 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style><div class="toc-macro rbtoc1524513365142">
-<ul class="toc-indentation"><li><a shape="rect"
href="#JAX-RSMavenPlugins-Introduction">Introduction</a></li><li><a
shape="rect" href="#JAX-RSMavenPlugins-Archetypes">Archetypes</a></li></ul>
+/*]]>*/</style><div class="toc-macro rbtoc1640206593581">
+<ul class="toc-indentation"><li><a shape="rect"
href="#JAXRSMavenPlugins-Introduction">Introduction</a></li><li><a shape="rect"
href="#JAXRSMavenPlugins-Archetypes">Archetypes</a></li></ul>
</div>
-<h1 id="JAX-RSMavenPlugins-Introduction">Introduction</h1>
+<h1 id="JAXRSMavenPlugins-Introduction">Introduction</h1>
<p>A <a shape="rect"
href="http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDescription-wadl2javaMavenplugin">wadl2java</a>
Maven plugin for generating the Java code from WADL documents and a new Maven
archetype for speeding up the creation of Spring-based CXF JAX-RS web
applications are currently available. </p>
-<h1 id="JAX-RSMavenPlugins-Archetypes">Archetypes</h1>
+<h1 id="JAXRSMavenPlugins-Archetypes">Archetypes</h1>
<p><a shape="rect" class="external-link"
href="http://maven.apache.org/archetype/maven-archetype-plugin/">Maven
archetypes</a> can help with creating the boilerplate code which can be used to
build a working application fast.</p>
@@ -145,7 +133,7 @@ div.rbtoc1524513365142 li {margin-left:
<p>Here is how you can use it from the command line.</p>
<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">
+<pre class="brush: java; gutter: false; theme: Default">
~/work/archetypes$
mvn archetype:generate -Dfilter=org.apache.cxf.archetype:
Modified: websites/production/cxf/content/docs/jax-rs-multiparts.html
==============================================================================
--- websites/production/cxf/content/docs/jax-rs-multiparts.html (original)
+++ websites/production/cxf/content/docs/jax-rs-multiparts.html Wed Dec 22
21:03:39 2021
@@ -58,11 +58,7 @@ Apache CXF -- JAX-RS Multiparts
<td id="cell-1-1"> </td>
<td id="cell-1-2">
<!-- Banner -->
-<div class="banner" id="banner"><div><table border="0" cellpadding="0"
cellspacing="0" width="100%"><tr><td align="left" colspan="1" nowrap>
-<a shape="rect" href="http://cxf.apache.org/" title="Apache CXF"><span
style="font-weight: bold; font-size: 170%; color: white">Apache CXF</span></a>
-</td><td align="right" colspan="1" nowrap>
-<a shape="rect" href="http://www.apache.org/" title="The Apache Sofware
Foundation"><img border="0" alt="ASF Logo"
src="http://cxf.apache.org/images/asf-logo.png"></a>
-</td></tr></table></div></div>
+<div class="banner" id="banner"><img class="wysiwyg-unknown-macro"
src="https://cwiki.apache.org/confluence/plugins/servlet/confluence/placeholder/unknown-macro?name=html&locale=en_GB&version=2"></div>
<!-- Banner -->
<div id="top-menu">
<table border="0" cellpadding="1" cellspacing="0" width="100%">
@@ -99,15 +95,7 @@ Apache CXF -- JAX-RS Multiparts
<div id="wrapper-menu-page-bottom">
<div id="menu-page">
<!-- NavigationBar -->
-<div id="navigation"><ul class="alternate"><li><a shape="rect"
href="overview.html">Overview</a></li><li><a shape="rect"
href="how-tos.html">How-Tos</a></li><li><a shape="rect"
href="frontends.html">Frontends</a></li><li><a shape="rect"
href="databindings.html">DataBindings</a></li><li><a shape="rect"
href="transports.html">Transports</a></li><li><a shape="rect"
href="configuration.html">Configuration</a></li><li><a shape="rect"
href="debugging-and-logging.html">Debugging and Logging</a></li><li><a
shape="rect" href="tools.html">Tools</a></li><li><a shape="rect"
href="restful-services.html">RESTful Services</a></li><li><a shape="rect"
href="wsdl-bindings.html">WSDL Bindings</a></li><li><a shape="rect"
href="service-routing.html">Service Routing</a></li><li><a shape="rect"
href="dynamic-languages.html">Dynamic Languages</a></li><li><a shape="rect"
href="ws-support.html">WS-* Support</a></li><li><a shape="rect"
href="advanced-integration.html">Advanced Integration</a></li><li><a shape
="rect" href="deployment.html">Deployment</a></li><li><a shape="rect"
href="schemas-and-namespaces.html">Use of Schemas and
Namespaces</a></li></ul><hr><ul
class="alternate"><li><p>Search</p></li></ul><form
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box"
action="http://www.google.com/cse">
- <div>
- <input type="hidden" name="cx" value="002890367768291051730:o99qiwa09y4">
- <input type="hidden" name="ie" value="UTF-8">
- <input type="text" name="q" size="21">
- <input type="submit" name="sa" value="Search">
- </div>
-</form>
-<script type="text/javascript"
src="http://www.google.com/cse/brand?form=cse-search-box&lang=en"></script><hr><ul
class="alternate"><li><a shape="rect"
href="http://cxf.apache.org/javadoc/latest/">API 3.2.x (Javadoc)</a></li><li><a
shape="rect" href="http://cxf.apache.org/javadoc/latest-3.1.x/">API 3.1.x
(Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/">CXF
Website</a></li></ul><p> </p><p><a shape="rect" class="external-link"
href="http://www.apache.org/events/current-event.html"><span
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image
confluence-external-resource"
src="http://www.apache.org/events/current-event-125x125.png"
data-image-src="http://www.apache.org/events/current-event-125x125.png"></span></a></p></div>
+<div id="navigation"><ul class="alternate"><li><a shape="rect"
href="overview.html">Overview</a></li><li><a shape="rect"
href="how-tos.html">How-Tos</a></li><li><a shape="rect"
href="frontends.html">Frontends</a></li><li><a shape="rect"
href="databindings.html">DataBindings</a></li><li><a shape="rect"
href="transports.html">Transports</a></li><li><a shape="rect"
href="configuration.html">Configuration</a></li><li><a shape="rect"
href="debugging-and-logging.html">Debugging and Logging</a></li><li><a
shape="rect" href="tools.html">Tools</a></li><li><a shape="rect"
href="restful-services.html">RESTful Services</a></li><li><a shape="rect"
href="wsdl-bindings.html">WSDL Bindings</a></li><li><a shape="rect"
href="service-routing.html">Service Routing</a></li><li><a shape="rect"
href="dynamic-languages.html">Dynamic Languages</a></li><li><a shape="rect"
href="ws-support.html">WS-* Support</a></li><li><a shape="rect"
href="advanced-integration.html">Advanced Integration</a></li><li><a shape
="rect" href="deployment.html">Deployment</a></li><li><a shape="rect"
href="schemas-and-namespaces.html">Use of Schemas and
Namespaces</a></li></ul><hr><ul
class="alternate"><li><p>Search</p></li></ul><p><img
class="wysiwyg-unknown-macro"
src="https://cwiki.apache.org/confluence/plugins/servlet/confluence/placeholder/unknown-macro?name=html&locale=en_GB&version=2"></p><hr><ul
class="alternate"><li><a shape="rect"
href="http://cxf.apache.org/javadoc/latest-3.5.x/">API 3.5.x
(Javadoc)</a></li><li><a shape="rect"
href="http://cxf.apache.org/javadoc/latest-3.2.x/">API 3.2.x
(Javadoc)</a></li><li><a shape="rect"
href="http://cxf.apache.org/javadoc/latest-3.1.x/">API 3.1.x
(Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/">CXF
Website</a></li></ul><p><br clear="none"></p><p><a shape="rect"
class="external-link"
href="http://www.apache.org/events/current-event.html"><span
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image
confluence-exte
rnal-resource" src="http://www.apache.org/events/current-event-125x125.png"
data-image-src="http://www.apache.org/events/current-event-125x125.png"></span></a></p></div>
<!-- NavigationBar -->
</div>
</div>
@@ -121,17 +109,17 @@ Apache CXF -- JAX-RS Multiparts
 </p><p><br clear="none"></p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1528711018536 {padding: 0px;}
-div.rbtoc1528711018536 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1528711018536 li {margin-left: 0px;padding-left: 0px;}
-
-/*]]>*/</style></p><div class="toc-macro rbtoc1528711018536">
-<ul class="toc-indentation"><li><a shape="rect"
href="#JAX-RSMultiparts-Readingattachments">Reading attachments</a>
-<ul class="toc-indentation"><li><a shape="rect"
href="#JAX-RSMultiparts-MultipartannotationandOptionalattachments">Multipart
annotation and Optional attachments</a></li></ul>
-</li><li><a shape="rect" href="#JAX-RSMultiparts-Writingattachments">Writing
attachments</a></li><li><a shape="rect"
href="#JAX-RSMultiparts-UploadingfileswithClientAPI">Uploading files with
Client API</a></li><li><a shape="rect"
href="#JAX-RSMultiparts-Readinglargeattachments">Reading large attachments</a>
-<ul class="toc-indentation"><li><a shape="rect"
href="#JAX-RSMultiparts-Formsandmultiparts">Forms and multiparts</a></li><li><a
shape="rect"
href="#JAX-RSMultiparts-Content-DispositionUTF-8filenames">Content-Disposition
UTF-8 file names</a></li></ul>
-</li><li><a shape="rect" href="#JAX-RSMultiparts-XOPsupport">XOP
support</a></li><li><a shape="rect"
href="#JAX-RSMultiparts-MultipartFilters">Multipart Filters</a></li><li><a
shape="rect" href="#JAX-RSMultiparts-SigningMultiparts">Signing
Multiparts</a></li><li><a shape="rect"
href="#JAX-RSMultiparts-NoteaboutStruts">Note about Struts</a></li></ul>
-</div><h1 id="JAX-RSMultiparts-Readingattachments">Reading
attachments</h1><p>Individual parts can be mapped to StreamSource, InputStream,
DataSource or custom Java types for which message body readers are
available.</p><p>For example:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+div.rbtoc1640206652724 {padding: 0px;}
+div.rbtoc1640206652724 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1640206652724 li {margin-left: 0px;padding-left: 0px;}
+
+/*]]>*/</style></p><div class="toc-macro rbtoc1640206652724">
+<ul class="toc-indentation"><li><a shape="rect"
href="#JAXRSMultiparts-Readingattachments">Reading attachments</a>
+<ul class="toc-indentation"><li><a shape="rect"
href="#JAXRSMultiparts-MultipartannotationandOptionalattachments">Multipart
annotation and Optional attachments</a></li></ul>
+</li><li><a shape="rect" href="#JAXRSMultiparts-Writingattachments">Writing
attachments</a></li><li><a shape="rect"
href="#JAXRSMultiparts-UploadingfileswithClientAPI">Uploading files with Client
API</a></li><li><a shape="rect"
href="#JAXRSMultiparts-Readinglargeattachments">Reading large attachments</a>
+<ul class="toc-indentation"><li><a shape="rect"
href="#JAXRSMultiparts-Formsandmultiparts">Forms and multiparts</a></li><li><a
shape="rect"
href="#JAXRSMultiparts-Content-DispositionUTF-8filenames">Content-Disposition
UTF-8 file names</a></li></ul>
+</li><li><a shape="rect" href="#JAXRSMultiparts-XOPsupport">XOP
support</a></li><li><a shape="rect"
href="#JAXRSMultiparts-MultipartFilters">Multipart Filters</a></li><li><a
shape="rect" href="#JAXRSMultiparts-SigningMultiparts">Signing
Multiparts</a></li><li><a shape="rect"
href="#JAXRSMultiparts-NoteaboutStruts">Note about Struts</a></li></ul>
+</div><h1 id="JAXRSMultiparts-Readingattachments">Reading
attachments</h1><p>Individual parts can be mapped to StreamSource, InputStream,
DataSource or custom Java types for which message body readers are
available.</p><p>For example:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default">@POST
@Path("/books/jaxbjson")
@Produces("text/xml")
@@ -183,7 +171,7 @@ public void addAttachments(List<Attac
}
</pre>
-</div></div><p>When a user code has <a shape="rect" class="external-link"
href="http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContext.java">MessageContext</a>
injected, <a shape="rect" class="external-link"
href="http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/AttachmentUtils.java">AttachmentUtils</a>
can also be used by the application code.</p><p>Please see these <a
shape="rect" class="external-link"
href="http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java">test
resource class</a> and <a shape="rect" class="external-link"
href="http://sberyozkin.blogspot.com/2009/02/multiparts-in-cxf-jaxrs.html"
rel="nofollow">blog entry</a> for more examples.</p><h2
id="JAX-RSMultiparts-MultipartannotationandOptionalattachments">Multipart
annotation and Optional attachments</h2><p>When you write the code lik
e this</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+</div></div><p>When a user code has <a shape="rect" class="external-link"
href="http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContext.java">MessageContext</a>
injected, <a shape="rect" class="external-link"
href="http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/AttachmentUtils.java">AttachmentUtils</a>
can also be used by the application code.</p><p>Please see these <a
shape="rect" class="external-link"
href="http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java">test
resource class</a> and <a shape="rect" class="external-link"
href="http://sberyozkin.blogspot.com/2009/02/multiparts-in-cxf-jaxrs.html"
rel="nofollow">blog entry</a> for more examples.</p><h2
id="JAXRSMultiparts-MultipartannotationandOptionalattachments">Multipart
annotation and Optional attachments</h2><p>When you write the code like
this</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default">@POST
@Path("/books/jaxbjson")
@Produces("text/xml")
@@ -199,7 +187,7 @@ public Response addBookJaxbJson(
@Multipart("rootPart") Book2 b1,
@Multipart(value = "book2", required = false) Book b2) {}
</pre>
-</div></div><p>The above code requires the "rootPart" part be available and
can handle the case where the "book2" part is missing.</p><h1
id="JAX-RSMultiparts-Writingattachments">Writing attachments</h1><p>Starting
from 2.2.4 it is also possible to write attachments to the output stream, both
on the client and server sides.</p><p>On the server side it is sufficient to
update the @Produces value for a given method:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>The above code requires the "rootPart" part be available and
can handle the case where the "book2" part is missing.</p><h1
id="JAXRSMultiparts-Writingattachments">Writing attachments</h1><p>Starting
from 2.2.4 it is also possible to write attachments to the output stream, both
on the client and server sides.</p><p>On the server side it is sufficient to
update the @Produces value for a given method:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default">public class Resource {
private List<Book> books;
@Produces("multipart/mixed;type=text/xml")
@@ -260,7 +248,7 @@ List<Attachment> atts = client.pos
public File postGetFile(@Multipart(value = "root2", type =
"application/octet-stream") File file) {}
}
</pre>
-</div></div><p>A method-level Multipart annotation will affect the writing on
the server side and the reading on the client side. A parameter-level Multipart
annotation will affect writing on the client (proxy) side and reading on the
server side. You don't have to use Multipart annotations.</p><h1
id="JAX-RSMultiparts-UploadingfileswithClientAPI">Uploading files with Client
API</h1><p>At the moment the only way to upload a file is to use a
MultipartBody, Attachment or File:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>A method-level Multipart annotation will affect the writing on
the server side and the reading on the client side. A parameter-level Multipart
annotation will affect writing on the client (proxy) side and reading on the
server side. You don't have to use Multipart annotations.</p><h1
id="JAXRSMultiparts-UploadingfileswithClientAPI">Uploading files with Client
API</h1><p>At the moment the only way to upload a file is to use a
MultipartBody, Attachment or File:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default">WebClient client =
WebClient.create("http://books");
client.type("multipart/form-data");
ContentDisposition cd = new
ContentDisposition("attachment;filename=image.jpg");
@@ -274,7 +262,7 @@ client.post(att);
client.post(getClass().getResource("image.png").getFile());
</pre>
-</div></div><p>Using File provides a simpler way as the runtime can figure out
how to create a ContentDisposition from a File.</p><h1
id="JAX-RSMultiparts-Readinglargeattachments">Reading large
attachments</h1><p>One can use the following properties to set up folder,
memory threshold and max size (from CXF 2.4.4 and 2.5) values when dealing with
large attachments:</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Using File provides a simpler way as the runtime can figure out
how to create a ContentDisposition from a File.</p><h1
id="JAXRSMultiparts-Readinglargeattachments">Reading large
attachments</h1><p>One can use the following properties to set up folder,
memory threshold and max size (from CXF 2.4.4 and 2.5) values when dealing with
large attachments:</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default"><beans>
<jaxrs:server id="bookstore1">
<jaxrs:properties>
@@ -287,7 +275,7 @@ client.post(getClass().getResource("imag
</jaxrs:server>
</beans>
</pre>
-</div></div><p>Note that such properties can be set up on a per-endpoint
basis. Alternatively you can set "attachmentDirectory", "attachmentThreshold"
and "attachmentMaxSize" properties directly on either
org.apache.cxf.jaxrs.provider.MultipartProvider or, when dealing with
multipart/form-data payloads,
org.apache.cxf.jaxrs.provider.FormEncodingProvider.</p><p>Alternatively, you
might want to set the following system properties which will apply to all
endpoints:</p><p>> -Dorg.apache.cxf.io.CachedOutputStream.Threshold=102400
<br clear="none"> and<br clear="none"> >
-Dorg.apache.cxf.io.CachedOutputStream.OutputDirectory=/temp</p><p>Starting
from CXF 2.5.0 and 2.4.4:<br clear="none"> >
-Dorg.apache.cxf.io.CachedOutputStream.MaxSize=10000000</p><p>Note that if a
given attachment exceeds the maximum size property (default is no-limit) then
HTTP 413 status will be returned. For more information on these configuration
properties, please see the documentation on <a shape="rect" hr
ef="securing-cxf-services.html">Securing CXF Services</a>.</p><h2
id="JAX-RSMultiparts-Formsandmultiparts">Forms and multiparts</h2><p>The <a
shape="rect" class="external-link"
href="http://www.w3.org/TR/html401/interact/forms.html" rel="nofollow">Forms in
HTML documents</a> recommendation <a shape="rect" class="external-link"
href="http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2"
rel="nofollow">suggests</a> that multipart/form-data requests should mainly be
used to upload files.</p><p>As mentioned in the previous section, one way to
deal with multipart/form-data submissions is to deal directly with a CXF JAXRS
Attachment class and get a Content-Disposition header and/or the underlying
input stream.</p><p>It is now possible (since 2.2.5) to have individual
multipart/form-data parts read by registered JAX-RS MessageBodyReaders,
something that is already possible to do for types like multipart/mixed or
multipart/related.</p><p>For example this <a shape="rect" class="exter
nal-link"
href="http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentFormJson">request</a>
can be handled by a method with the following signature:</p><div class="code
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Note that such properties can be set up on a per-endpoint
basis. Alternatively you can set "attachmentDirectory", "attachmentThreshold"
and "attachmentMaxSize" properties directly on either
org.apache.cxf.jaxrs.provider.MultipartProvider or, when dealing with
multipart/form-data payloads,
org.apache.cxf.jaxrs.provider.FormEncodingProvider.</p><p>Alternatively, you
might want to set the following system properties which will apply to all
endpoints:</p><p>> -Dorg.apache.cxf.io.CachedOutputStream.Threshold=102400
<br clear="none"> and<br clear="none"> >
-Dorg.apache.cxf.io.CachedOutputStream.OutputDirectory=/temp</p><p>Starting
from CXF 2.5.0 and 2.4.4:<br clear="none"> >
-Dorg.apache.cxf.io.CachedOutputStream.MaxSize=10000000</p><p>Note that if a
given attachment exceeds the maximum size property (default is no-limit) then
HTTP 413 status will be returned. For more information on these configuration
properties, please see the documentation on <a shape="rect" hr
ef="securing-cxf-services.html">Securing CXF Services</a>.</p><h2
id="JAXRSMultiparts-Formsandmultiparts">Forms and multiparts</h2><p>The <a
shape="rect" class="external-link"
href="http://www.w3.org/TR/html401/interact/forms.html" rel="nofollow">Forms in
HTML documents</a> recommendation <a shape="rect" class="external-link"
href="http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2"
rel="nofollow">suggests</a> that multipart/form-data requests should mainly be
used to upload files.</p><p>As mentioned in the previous section, one way to
deal with multipart/form-data submissions is to deal directly with a CXF JAXRS
Attachment class and get a Content-Disposition header and/or the underlying
input stream.</p><p>It is now possible (since 2.2.5) to have individual
multipart/form-data parts read by registered JAX-RS MessageBodyReaders,
something that is already possible to do for types like multipart/mixed or
multipart/related.</p><p>For example this <a shape="rect" class="extern
al-link"
href="http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/resources/attachmentFormJson">request</a>
can be handled by a method with the following signature:</p><div class="code
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default">@POST
@Path("/books/jsonform")
@Consumes("multipart/form-data")
@@ -308,7 +296,7 @@ public Response addBookJaxbJsonForm(@Mul
public Response addBookFilesForm(@Multipart("owner") String name,
@Multipart("files") List<Book> books)
{}
</pre>
-</div></div><p>If you need to know the names of the individual file parts
embedded in a "files" outer part (such as "book1" and "book2"), then please use
List<Attachment> instead. It is currently not possible to use a Multipart
annotation to refer to such inner parts but you can easily get the names from
the individual Attachment instances representing these inner parts.</p><p>Note
that it is only the last request which has been structured according to the
recommendation on how to upload multiple files but it is more complex than the
other simpler requests linked to in this section.</p><p>Please note that using
JAX-RS FormParams is recommended for dealing with plain
application/www-url-encoded submissions consisting of name/value pairs
only.</p><h2
id="JAX-RSMultiparts-Content-DispositionUTF-8filenames">Content-Disposition
UTF-8 file names</h2><p>Starting from CXF 3.0.4 it is possible to specify a
Content-Disposition file names in a UTF-8 format, using a "filename*" Content-Di
sposition extension parameter as opposed to the "filename" one.</p><p>Please
see <a shape="rect" class="external-link"
href="https://tools.ietf.org/html/rfc6266" rel="nofollow">RFC 6266</a> and <a
shape="rect" class="external-link"
href="https://git-wip-us.apache.org/repos/asf?p=cxf.git;a=blob;f=core/src/test/java/org/apache/cxf/attachment/AttachmentUtilTest.java;h=6eeedd42e965f4df8390ee6077222b34e1520732;hb=HEAD">this
unit test</a> for more information. </p><h1
id="JAX-RSMultiparts-XOPsupport">XOP support</h1><p>CXF JAXRS clients and
endpoints can support <a shape="rect" class="external-link"
href="http://www.w3.org/TR/xop10/" rel="nofollow">XML-binary Optimized
Packaging (XOP)</a>.<br clear="none"> What it means at a practical level is
that a JAXB bean containing binary data is serialized using a multipart
packaging, with the root part containing non-binary data only but also linking
to co-located parts containing the actual binary payloads. Next it is
deserialized into a JAX
B bean on the server side.</p><p>If you'd like to experiment with XOP then you
need to set an "mtom-enabled" property on CXF jaxrs endpoints and clients.<br
clear="none"> Please see <a shape="rect" class="external-link"
href="http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java">JAXRSMultipartTest</a>
(testXopWebClient) and <a shape="rect" class="external-link"
href="http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java">MultipartStore</a>
(addBookXop) for more details.</p><h1
id="JAX-RSMultiparts-MultipartFilters">Multipart Filters</h1><p> </p><p>It
is possible to intercept the attachment write or read process starting from CXF
3.1.12.</p><p><a shape="rect" class="external-link"
href="https://github.com/apache/cxf/blob/master/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/MultipartInputFilter.java"
rel="nofollow">Multipart
InputFilter</a> and <a shape="rect" class="external-link"
href="https://github.com/apache/cxf/blob/master/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/MultipartOutputFilter.java"
rel="nofollow">MultipartOutputFilter</a> have been introduced. These filters
can be used to modify the list of the attachment parts or customize some of the
individual part's properties, example, replace the part input stream,
etc.</p><p>These filters can be registered from JAX-RS 2.0 client or container
request/response filters or CXF in/out interceptors. <a shape="rect"
class="external-link"
href="https://github.com/apache/cxf/blob/master/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/MultipartInputFilter.java"
rel="nofollow">MultipartInputFilter</a> <a shape="rect" class="external-link"
href="https://github.com/apache/cxf/blob/master/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/AttachmentUtils.java#L71"
rel="nofollow">can be added</a> to t
he list of the input filters which is identified by a
"multipart.input.filters" property on the current CXF message.
Likewise, <a shape="rect" class="external-link"
href="https://github.com/apache/cxf/blob/master/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/MultipartOutputFilter.java"
rel="nofollow">MultipartOutputFilter</a> <a shape="rect" class="external-link"
href="https://github.com/apache/cxf/blob/master/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/AttachmentUtils.java#L61"
rel="nofollow">can be added</a> to the list of the output filters which is
identified by a "multipart.output.filters" property on the current CXF
message.</p><h1 id="JAX-RSMultiparts-SigningMultiparts">Signing
Multiparts</h1><p>See <a shape="rect"
href="http://cxf.apache.org/docs/jax-rs-jose.html#JAX-RSJOSE-SigningandVerificationofHTTPAttachments">this
section</a> for more information.</p><h1
id="JAX-RSMultiparts-NoteaboutStruts">Note about Struts</h1><p>If
you are using CXF and <a shape="rect" class="external-link"
href="http://struts.apache.org/2.2.1/index.html">Struts2</a> within the same
application and expecting CXF to process multipart/form-data payloads then you
need to make sure Struts2 dispatcher is not consuming the request input
stream.</p><p>One option is to let Struts2 handle URIs matching some specific
patterns only, for example:</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
+</div></div><p>If you need to know the names of the individual file parts
embedded in a "files" outer part (such as "book1" and "book2"), then please use
List<Attachment> instead. It is currently not possible to use a Multipart
annotation to refer to such inner parts but you can easily get the names from
the individual Attachment instances representing these inner parts.</p><p>Note
that it is only the last request which has been structured according to the
recommendation on how to upload multiple files but it is more complex than the
other simpler requests linked to in this section.</p><p>Please note that using
JAX-RS FormParams is recommended for dealing with plain
application/www-url-encoded submissions consisting of name/value pairs
only.</p><h2
id="JAXRSMultiparts-Content-DispositionUTF-8filenames">Content-Disposition
UTF-8 file names</h2><p>Starting from CXF 3.0.4 it is possible to specify a
Content-Disposition file names in a UTF-8 format, using a "filename*"
Content-Dis
position extension parameter as opposed to the "filename" one.</p><p>Please
see <a shape="rect" class="external-link"
href="https://tools.ietf.org/html/rfc6266" rel="nofollow">RFC 6266</a> and <a
shape="rect" class="external-link"
href="https://git-wip-us.apache.org/repos/asf?p=cxf.git;a=blob;f=core/src/test/java/org/apache/cxf/attachment/AttachmentUtilTest.java;h=6eeedd42e965f4df8390ee6077222b34e1520732;hb=HEAD">this
unit test</a> for more information. </p><h1
id="JAXRSMultiparts-XOPsupport">XOP support</h1><p>CXF JAXRS clients and
endpoints can support <a shape="rect" class="external-link"
href="http://www.w3.org/TR/xop10/" rel="nofollow">XML-binary Optimized
Packaging (XOP)</a>.<br clear="none"> What it means at a practical level is
that a JAXB bean containing binary data is serialized using a multipart
packaging, with the root part containing non-binary data only but also linking
to co-located parts containing the actual binary payloads. Next it is
deserialized into a JAXB
bean on the server side.</p><p>If you'd like to experiment with XOP then you
need to set an "mtom-enabled" property on CXF jaxrs endpoints and clients.<br
clear="none"> Please see <a shape="rect" class="external-link"
href="http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java">JAXRSMultipartTest</a>
(testXopWebClient) and <a shape="rect" class="external-link"
href="http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java">MultipartStore</a>
(addBookXop) for more details.</p><h1
id="JAXRSMultiparts-MultipartFilters">Multipart Filters</h1><p> </p><p>It
is possible to intercept the attachment write or read process starting from CXF
3.1.12.</p><p><a shape="rect" class="external-link"
href="https://github.com/apache/cxf/blob/master/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/MultipartInputFilter.java"
rel="nofollow">MultipartInp
utFilter</a> and <a shape="rect" class="external-link"
href="https://github.com/apache/cxf/blob/master/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/MultipartOutputFilter.java"
rel="nofollow">MultipartOutputFilter</a> have been introduced. These filters
can be used to modify the list of the attachment parts or customize some of the
individual part's properties, example, replace the part input stream,
etc.</p><p>These filters can be registered from JAX-RS 2.0 client or container
request/response filters or CXF in/out interceptors. <a shape="rect"
class="external-link"
href="https://github.com/apache/cxf/blob/master/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/MultipartInputFilter.java"
rel="nofollow">MultipartInputFilter</a> <a shape="rect" class="external-link"
href="https://github.com/apache/cxf/blob/master/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/AttachmentUtils.java#L71"
rel="nofollow">can be added</a> to the
list of the input filters which is identified by a "multipart.input.filters"
property on the current CXF message. Likewise, <a shape="rect"
class="external-link"
href="https://github.com/apache/cxf/blob/master/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/MultipartOutputFilter.java"
rel="nofollow">MultipartOutputFilter</a> <a shape="rect" class="external-link"
href="https://github.com/apache/cxf/blob/master/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/AttachmentUtils.java#L61"
rel="nofollow">can be added</a> to the list of the output filters which is
identified by a "multipart.output.filters" property on the current CXF
message.</p><h1 id="JAXRSMultiparts-SigningMultiparts">Signing
Multiparts</h1><p>See <a shape="rect"
href="http://cxf.apache.org/docs/jax-rs-jose.html#JAX-RSJOSE-SigningandVerificationofHTTPAttachments">this
section</a> for more information.</p><h1
id="JAXRSMultiparts-NoteaboutStruts">Note about Struts</h1><p>If you a
re using CXF and <a shape="rect" class="external-link"
href="http://struts.apache.org/2.2.1/index.html">Struts2</a> within the same
application and expecting CXF to process multipart/form-data payloads then you
need to make sure Struts2 dispatcher is not consuming the request input
stream.</p><p>One option is to let Struts2 handle URIs matching some specific
patterns only, for example:</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default"><web-app>
<filter>
<filter-name>struts2</filter-name>
Modified: websites/production/cxf/content/docs/jax-rs-nio.html
==============================================================================
--- websites/production/cxf/content/docs/jax-rs-nio.html (original)
+++ websites/production/cxf/content/docs/jax-rs-nio.html Wed Dec 22 21:03:39
2021
@@ -57,11 +57,7 @@ Apache CXF -- JAX-RS NIO
<td id="cell-1-1"> </td>
<td id="cell-1-2">
<!-- Banner -->
-<div class="banner" id="banner"><div><table border="0" cellpadding="0"
cellspacing="0" width="100%"><tr><td align="left" colspan="1" nowrap>
-<a shape="rect" href="http://cxf.apache.org/" title="Apache CXF"><span
style="font-weight: bold; font-size: 170%; color: white">Apache CXF</span></a>
-</td><td align="right" colspan="1" nowrap>
-<a shape="rect" href="http://www.apache.org/" title="The Apache Sofware
Foundation"><img border="0" alt="ASF Logo"
src="http://cxf.apache.org/images/asf-logo.png"></a>
-</td></tr></table></div></div>
+<div class="banner" id="banner"><img class="wysiwyg-unknown-macro"
src="https://cwiki.apache.org/confluence/plugins/servlet/confluence/placeholder/unknown-macro?name=html&locale=en_GB&version=2"></div>
<!-- Banner -->
<div id="top-menu">
<table border="0" cellpadding="1" cellspacing="0" width="100%">
@@ -98,15 +94,7 @@ Apache CXF -- JAX-RS NIO
<div id="wrapper-menu-page-bottom">
<div id="menu-page">
<!-- NavigationBar -->
-<div id="navigation"><ul class="alternate"><li><a shape="rect"
href="overview.html">Overview</a></li><li><a shape="rect"
href="how-tos.html">How-Tos</a></li><li><a shape="rect"
href="frontends.html">Frontends</a></li><li><a shape="rect"
href="databindings.html">DataBindings</a></li><li><a shape="rect"
href="transports.html">Transports</a></li><li><a shape="rect"
href="configuration.html">Configuration</a></li><li><a shape="rect"
href="debugging-and-logging.html">Debugging and Logging</a></li><li><a
shape="rect" href="tools.html">Tools</a></li><li><a shape="rect"
href="restful-services.html">RESTful Services</a></li><li><a shape="rect"
href="wsdl-bindings.html">WSDL Bindings</a></li><li><a shape="rect"
href="service-routing.html">Service Routing</a></li><li><a shape="rect"
href="dynamic-languages.html">Dynamic Languages</a></li><li><a shape="rect"
href="ws-support.html">WS-* Support</a></li><li><a shape="rect"
href="advanced-integration.html">Advanced Integration</a></li><li><a shape
="rect" href="deployment.html">Deployment</a></li><li><a shape="rect"
href="schemas-and-namespaces.html">Use of Schemas and
Namespaces</a></li></ul><hr><ul
class="alternate"><li><p>Search</p></li></ul><form
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box"
action="http://www.google.com/cse">
- <div>
- <input type="hidden" name="cx" value="002890367768291051730:o99qiwa09y4">
- <input type="hidden" name="ie" value="UTF-8">
- <input type="text" name="q" size="21">
- <input type="submit" name="sa" value="Search">
- </div>
-</form>
-<script type="text/javascript"
src="http://www.google.com/cse/brand?form=cse-search-box&lang=en"></script><hr><ul
class="alternate"><li><a shape="rect"
href="http://cxf.apache.org/javadoc/latest/">API 3.2.x (Javadoc)</a></li><li><a
shape="rect" href="http://cxf.apache.org/javadoc/latest-3.1.x/">API 3.1.x
(Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/">CXF
Website</a></li></ul><p> </p><p><a shape="rect" class="external-link"
href="http://www.apache.org/events/current-event.html"><span
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image
confluence-external-resource"
src="http://www.apache.org/events/current-event-125x125.png"
data-image-src="http://www.apache.org/events/current-event-125x125.png"></span></a></p></div>
+<div id="navigation"><ul class="alternate"><li><a shape="rect"
href="overview.html">Overview</a></li><li><a shape="rect"
href="how-tos.html">How-Tos</a></li><li><a shape="rect"
href="frontends.html">Frontends</a></li><li><a shape="rect"
href="databindings.html">DataBindings</a></li><li><a shape="rect"
href="transports.html">Transports</a></li><li><a shape="rect"
href="configuration.html">Configuration</a></li><li><a shape="rect"
href="debugging-and-logging.html">Debugging and Logging</a></li><li><a
shape="rect" href="tools.html">Tools</a></li><li><a shape="rect"
href="restful-services.html">RESTful Services</a></li><li><a shape="rect"
href="wsdl-bindings.html">WSDL Bindings</a></li><li><a shape="rect"
href="service-routing.html">Service Routing</a></li><li><a shape="rect"
href="dynamic-languages.html">Dynamic Languages</a></li><li><a shape="rect"
href="ws-support.html">WS-* Support</a></li><li><a shape="rect"
href="advanced-integration.html">Advanced Integration</a></li><li><a shape
="rect" href="deployment.html">Deployment</a></li><li><a shape="rect"
href="schemas-and-namespaces.html">Use of Schemas and
Namespaces</a></li></ul><hr><ul
class="alternate"><li><p>Search</p></li></ul><p><img
class="wysiwyg-unknown-macro"
src="https://cwiki.apache.org/confluence/plugins/servlet/confluence/placeholder/unknown-macro?name=html&locale=en_GB&version=2"></p><hr><ul
class="alternate"><li><a shape="rect"
href="http://cxf.apache.org/javadoc/latest-3.5.x/">API 3.5.x
(Javadoc)</a></li><li><a shape="rect"
href="http://cxf.apache.org/javadoc/latest-3.2.x/">API 3.2.x
(Javadoc)</a></li><li><a shape="rect"
href="http://cxf.apache.org/javadoc/latest-3.1.x/">API 3.1.x
(Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/">CXF
Website</a></li></ul><p><br clear="none"></p><p><a shape="rect"
class="external-link"
href="http://www.apache.org/events/current-event.html"><span
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image
confluence-exte
rnal-resource" src="http://www.apache.org/events/current-event-125x125.png"
data-image-src="http://www.apache.org/events/current-event-125x125.png"></span></a></p></div>
<!-- NavigationBar -->
</div>
</div>
@@ -117,18 +105,18 @@ Apache CXF -- JAX-RS NIO
<!-- Content -->
<div class="wiki-content">
<div id="ConfluenceContent"><p> </p><p><style
type="text/css">/*<![CDATA[*/
-div.rbtoc1524513415893 {padding: 0px;}
-div.rbtoc1524513415893 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1524513415893 li {margin-left: 0px;padding-left: 0px;}
-
-/*]]>*/</style></p><div class="toc-macro rbtoc1524513415893">
-<ul class="toc-indentation"><li><a shape="rect"
href="#JAX-RSNIO-NIOExtension">NIO Extension</a>
-<ul class="toc-indentation"><li><a shape="rect"
href="#JAX-RSNIO-Introduction">Introduction</a></li><li><a shape="rect"
href="#JAX-RSNIO-NIORead">NIO Read</a></li><li><a shape="rect"
href="#JAX-RSNIO-NIOWrite">NIO Write</a>
-<ul class="toc-indentation"><li><a shape="rect"
href="#JAX-RSNIO-EvenEasierNIOWrite">Even Easier NIO Write</a></li></ul>
+div.rbtoc1640206827258 {padding: 0px;}
+div.rbtoc1640206827258 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1640206827258 li {margin-left: 0px;padding-left: 0px;}
+
+/*]]>*/</style></p><div class="toc-macro rbtoc1640206827258">
+<ul class="toc-indentation"><li><a shape="rect"
href="#JAXRSNIO-NIOExtension">NIO Extension</a>
+<ul class="toc-indentation"><li><a shape="rect"
href="#JAXRSNIO-Introduction">Introduction</a></li><li><a shape="rect"
href="#JAXRSNIO-NIORead">NIO Read</a></li><li><a shape="rect"
href="#JAXRSNIO-NIOWrite">NIO Write</a>
+<ul class="toc-indentation"><li><a shape="rect"
href="#JAXRSNIO-EvenEasierNIOWrite">Even Easier NIO Write</a></li></ul>
</li></ul>
</li></ul>
-</div><h1 id="JAX-RSNIO-NIOExtension">NIO Extension</h1><h2
id="JAX-RSNIO-Introduction">Introduction</h2><p>Servlet 3.1 API introduces a
support for Non-Blocking IO, see <a shape="rect" class="external-link"
href="http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/HTML5andServlet31/HTML5andServlet%203.1.html"
rel="nofollow">this tutorial</a> for more information.</p><p>The idea is that
when the service code reads or writes the stream it does not block at all and
only does a read or write action when a servlet container is ready to handle it
effectively.</p><p>Early JAX-RS 2.1 API had a server-side prototype to help the
JAX-RS service code utilize this Servlet 3.1 NIO features in a JAX-RS friendly
way. Unfortunately that prototype was dropped from the final 2.1 API with the
future major JAX-RS version expected to provide a much more complete and
sophisticated NIO API.</p><p>CXF 3.2.0 has retained the implementation of the
original JAX-RS 2.1 NIO API prototype and made it
possible for the users to experiment with it.</p><h2
id="JAX-RSNIO-NIORead">NIO Read</h2><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">@POST
+</div><h1 id="JAXRSNIO-NIOExtension">NIO Extension</h1><h2
id="JAXRSNIO-Introduction">Introduction</h2><p>Servlet 3.1 API introduces a
support for Non-Blocking IO, see <a shape="rect" class="external-link"
href="http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/HTML5andServlet31/HTML5andServlet%203.1.html"
rel="nofollow">this tutorial</a> for more information.</p><p>The idea is that
when the service code reads or writes the stream it does not block at all and
only does a read or write action when a servlet container is ready to handle it
effectively.</p><p>Early JAX-RS 2.1 API had a server-side prototype to help the
JAX-RS service code utilize this Servlet 3.1 NIO features in a JAX-RS friendly
way. Unfortunately that prototype was dropped from the final 2.1 API with the
future major JAX-RS version expected to provide a much more complete and
sophisticated NIO API.</p><p>CXF 3.2.0 has retained the implementation of the
original JAX-RS 2.1 NIO API prototype and made it po
ssible for the users to experiment with it.</p><h2 id="JAXRSNIO-NIORead">NIO
Read</h2><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default">@POST
@Consumes(MediaType.TEXT_PLAIN)
@Produces(MediaType.TEXT_PLAIN)
public void uploadBookStream(@Suspended AsyncResponse response) {
@@ -160,8 +148,8 @@ public void uploadBookStream(@Suspended
//}
);
}</pre>
-</div></div><h2 id="JAX-RSNIO-NIOWrite">NIO Write</h2><div class="code panel
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">@GET
+</div></div><h2 id="JAXRSNIO-NIOWrite">NIO Write</h2><div class="code panel
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default">@GET
@Produces(MediaType.TEXT_PLAIN)
public Response getBookStream() throws IOException {
final ByteArrayInputStream in = new ByteArrayInputStream(
@@ -194,8 +182,8 @@ public void uploadBookStream(@Suspended
}
</pre>
-</div></div><h3 id="JAX-RSNIO-EvenEasierNIOWrite">Even Easier NIO
Write</h3><p> </p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">import org.apache.cxf.annotations.UseNio;
+</div></div><h3 id="JAXRSNIO-EvenEasierNIOWrite">Even Easier NIO
Write</h3><p> </p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default">import
org.apache.cxf.annotations.UseNio;
@GET
@Produces(MediaType.TEXT_PLAIN)
@Path("/is")
Modified: websites/production/cxf/content/docs/jax-rs-oauth.html
==============================================================================
--- websites/production/cxf/content/docs/jax-rs-oauth.html (original)
+++ websites/production/cxf/content/docs/jax-rs-oauth.html Wed Dec 22 21:03:39
2021
@@ -58,11 +58,7 @@ Apache CXF -- JAX-RS OAuth
<td id="cell-1-1"> </td>
<td id="cell-1-2">
<!-- Banner -->
-<div class="banner" id="banner"><div><table border="0" cellpadding="0"
cellspacing="0" width="100%"><tr><td align="left" colspan="1" nowrap>
-<a shape="rect" href="http://cxf.apache.org/" title="Apache CXF"><span
style="font-weight: bold; font-size: 170%; color: white">Apache CXF</span></a>
-</td><td align="right" colspan="1" nowrap>
-<a shape="rect" href="http://www.apache.org/" title="The Apache Sofware
Foundation"><img border="0" alt="ASF Logo"
src="http://cxf.apache.org/images/asf-logo.png"></a>
-</td></tr></table></div></div>
+<div class="banner" id="banner"><img class="wysiwyg-unknown-macro"
src="https://cwiki.apache.org/confluence/plugins/servlet/confluence/placeholder/unknown-macro?name=html&locale=en_GB&version=2"></div>
<!-- Banner -->
<div id="top-menu">
<table border="0" cellpadding="1" cellspacing="0" width="100%">
@@ -99,15 +95,7 @@ Apache CXF -- JAX-RS OAuth
<div id="wrapper-menu-page-bottom">
<div id="menu-page">
<!-- NavigationBar -->
-<div id="navigation"><ul class="alternate"><li><a shape="rect"
href="overview.html">Overview</a></li><li><a shape="rect"
href="how-tos.html">How-Tos</a></li><li><a shape="rect"
href="frontends.html">Frontends</a></li><li><a shape="rect"
href="databindings.html">DataBindings</a></li><li><a shape="rect"
href="transports.html">Transports</a></li><li><a shape="rect"
href="configuration.html">Configuration</a></li><li><a shape="rect"
href="debugging-and-logging.html">Debugging and Logging</a></li><li><a
shape="rect" href="tools.html">Tools</a></li><li><a shape="rect"
href="restful-services.html">RESTful Services</a></li><li><a shape="rect"
href="wsdl-bindings.html">WSDL Bindings</a></li><li><a shape="rect"
href="service-routing.html">Service Routing</a></li><li><a shape="rect"
href="dynamic-languages.html">Dynamic Languages</a></li><li><a shape="rect"
href="ws-support.html">WS-* Support</a></li><li><a shape="rect"
href="advanced-integration.html">Advanced Integration</a></li><li><a shape
="rect" href="deployment.html">Deployment</a></li><li><a shape="rect"
href="schemas-and-namespaces.html">Use of Schemas and
Namespaces</a></li></ul><hr><ul
class="alternate"><li><p>Search</p></li></ul><form
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box"
action="http://www.google.com/cse">
- <div>
- <input type="hidden" name="cx" value="002890367768291051730:o99qiwa09y4">
- <input type="hidden" name="ie" value="UTF-8">
- <input type="text" name="q" size="21">
- <input type="submit" name="sa" value="Search">
- </div>
-</form>
-<script type="text/javascript"
src="http://www.google.com/cse/brand?form=cse-search-box&lang=en"></script><hr><ul
class="alternate"><li><a shape="rect"
href="http://cxf.apache.org/javadoc/latest/">API 3.2.x (Javadoc)</a></li><li><a
shape="rect" href="http://cxf.apache.org/javadoc/latest-3.1.x/">API 3.1.x
(Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/">CXF
Website</a></li></ul><p> </p><p><a shape="rect" class="external-link"
href="http://www.apache.org/events/current-event.html"><span
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image
confluence-external-resource"
src="http://www.apache.org/events/current-event-125x125.png"
data-image-src="http://www.apache.org/events/current-event-125x125.png"></span></a></p></div>
+<div id="navigation"><ul class="alternate"><li><a shape="rect"
href="overview.html">Overview</a></li><li><a shape="rect"
href="how-tos.html">How-Tos</a></li><li><a shape="rect"
href="frontends.html">Frontends</a></li><li><a shape="rect"
href="databindings.html">DataBindings</a></li><li><a shape="rect"
href="transports.html">Transports</a></li><li><a shape="rect"
href="configuration.html">Configuration</a></li><li><a shape="rect"
href="debugging-and-logging.html">Debugging and Logging</a></li><li><a
shape="rect" href="tools.html">Tools</a></li><li><a shape="rect"
href="restful-services.html">RESTful Services</a></li><li><a shape="rect"
href="wsdl-bindings.html">WSDL Bindings</a></li><li><a shape="rect"
href="service-routing.html">Service Routing</a></li><li><a shape="rect"
href="dynamic-languages.html">Dynamic Languages</a></li><li><a shape="rect"
href="ws-support.html">WS-* Support</a></li><li><a shape="rect"
href="advanced-integration.html">Advanced Integration</a></li><li><a shape
="rect" href="deployment.html">Deployment</a></li><li><a shape="rect"
href="schemas-and-namespaces.html">Use of Schemas and
Namespaces</a></li></ul><hr><ul
class="alternate"><li><p>Search</p></li></ul><p><img
class="wysiwyg-unknown-macro"
src="https://cwiki.apache.org/confluence/plugins/servlet/confluence/placeholder/unknown-macro?name=html&locale=en_GB&version=2"></p><hr><ul
class="alternate"><li><a shape="rect"
href="http://cxf.apache.org/javadoc/latest-3.5.x/">API 3.5.x
(Javadoc)</a></li><li><a shape="rect"
href="http://cxf.apache.org/javadoc/latest-3.2.x/">API 3.2.x
(Javadoc)</a></li><li><a shape="rect"
href="http://cxf.apache.org/javadoc/latest-3.1.x/">API 3.1.x
(Javadoc)</a></li><li><a shape="rect" href="http://cxf.apache.org/">CXF
Website</a></li></ul><p><br clear="none"></p><p><a shape="rect"
class="external-link"
href="http://www.apache.org/events/current-event.html"><span
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image
confluence-exte
rnal-resource" src="http://www.apache.org/events/current-event-125x125.png"
data-image-src="http://www.apache.org/events/current-event-125x125.png"></span></a></p></div>
<!-- NavigationBar -->
</div>
</div>
@@ -121,11 +109,11 @@ Apache CXF -- JAX-RS OAuth
<br clear="none"></p><p><br clear="none"></p><p><style
type="text/css">/*<![CDATA[*/
-div.rbtoc1633042680040 {padding: 0px;}
-div.rbtoc1633042680040 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1633042680040 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1640206639068 {padding: 0px;}
+div.rbtoc1640206639068 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1640206639068 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></p><div class="toc-macro rbtoc1633042680040">
+/*]]>*/</style></p><div class="toc-macro rbtoc1640206639068">
<ul class="toc-indentation"><li><a shape="rect"
href="#JAXRSOAuth-Introduction">Introduction</a></li><li><a shape="rect"
href="#JAXRSOAuth-Mavendependencies">Maven dependencies</a></li><li><a
shape="rect" href="#JAXRSOAuth-DevelopingOAuth1.0Servers">Developing OAuth 1.0
Servers</a>
<ul class="toc-indentation"><li><a shape="rect"
href="#JAXRSOAuth-RequestTokenService">RequestTokenService</a></li><li><a
shape="rect"
href="#JAXRSOAuth-AuthorizationRequestService">AuthorizationRequestService</a>
<ul class="toc-indentation"><li><a shape="rect"
href="#JAXRSOAuth-OOBcallbacks">OOB callbacks</a></li></ul>