| <!DOCTYPE html> |
| |
| |
| <!-- |
| | Generated by Apache Maven Doxia Site Renderer 2.0.0 from src/site/xdoc/docs/axis2-http2-simplified-example.xml at 2026-05-18 |
| | Rendered using Apache Maven Fluido Skin 2.0.0-M11 |
| --> |
| <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> |
| <head> |
| <meta charset="UTF-8" /> |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| <meta name="generator" content="Apache Maven Doxia Site Renderer 2.0.0" /> |
| <title>Axis2 HTTP/2 Simplified Configuration Example – Apache Axis2</title> |
| <link rel="stylesheet" href="../css/apache-maven-fluido-2.0.0-M11.min.css" /> |
| <link rel="stylesheet" href="../css/site.css" /> |
| <link rel="stylesheet" href="../css/print.css" media="print" /> |
| <script src="../js/apache-maven-fluido-2.0.0-M11.min.js"></script> |
| </head> |
| <body> |
| <div class="container-fluid container-fluid-top"> |
| <header> |
| <div id="banner"> |
| <div class="pull-left"><div id="bannerLeft"><h1><a href="https://www.apache.org/"><img class="class java.lang.Object" src="https://www.apache.org/images/asf_logo_wide.png" /> Apache Axis2</a></h1></div></div> |
| <div class="pull-right"><div id="bannerRight"><h1><a href="https://axis.apache.org/axis2/java/core/"><img class="class java.lang.Object" src="https://axis.apache.org/axis2/java/core/images/axis.jpg" /></a></h1></div></div> |
| <div class="clear"><hr/></div> |
| </div> |
| |
| <div id="breadcrumbs"> |
| <ul class="breadcrumb"> |
| <li id="publishDate">Last Published: 2026-05-17<span class="divider">|</span> |
| </li> |
| <li id="projectVersion">Version: 2.0.1<span class="divider">|</span></li> |
| <li><a href="https://www.apache.org" class="externalLink">Apache</a><span class="divider">/</span></li> |
| <li><a href="../index.html">Axis2/Java</a><span class="divider">/</span></li> |
| <li class="active">Axis2 HTTP/2 Simplified Configuration Example</li> |
| </ul> |
| </div> |
| </header> |
| <div class="row-fluid"> |
| <header id="leftColumn" class="span2"> |
| <nav class="well sidebar-nav"> |
| <ul class="nav nav-list"> |
| <li class="nav-header">Axis2/Java</li> |
| <li><a href="../index.html">Home</a></li> |
| <li><a href="../download.html">Downloads</a></li> |
| <li><a href="javascript:void(0)"><span class="icon-chevron-down"></span>Release Notes</a> |
| <ul class="nav nav-list"> |
| <li><a href="../release-notes/1.6.1.html">1.6.1</a></li> |
| <li><a href="../release-notes/1.6.2.html">1.6.2</a></li> |
| <li><a href="../release-notes/1.6.3.html">1.6.3</a></li> |
| <li><a href="../release-notes/1.6.4.html">1.6.4</a></li> |
| <li><a href="../release-notes/1.7.0.html">1.7.0</a></li> |
| <li><a href="../release-notes/1.7.1.html">1.7.1</a></li> |
| <li><a href="../release-notes/1.7.2.html">1.7.2</a></li> |
| <li><a href="../release-notes/1.7.3.html">1.7.3</a></li> |
| <li><a href="../release-notes/1.7.4.html">1.7.4</a></li> |
| <li><a href="../release-notes/1.7.5.html">1.7.5</a></li> |
| <li><a href="../release-notes/1.7.6.html">1.7.6</a></li> |
| <li><a href="../release-notes/1.7.7.html">1.7.7</a></li> |
| <li><a href="../release-notes/1.7.8.html">1.7.8</a></li> |
| <li><a href="../release-notes/1.7.9.html">1.7.9</a></li> |
| <li><a href="../release-notes/1.8.0.html">1.8.0</a></li> |
| <li><a href="../release-notes/1.8.1.html">1.8.1</a></li> |
| <li><a href="../release-notes/1.8.2.html">1.8.2</a></li> |
| <li><a href="../release-notes/2.0.0.html">2.0.0</a></li> |
| <li><a href="../release-notes/2.0.1.html">2.0.1</a></li> |
| </ul></li> |
| <li><a href="../modules/index.html">Modules</a></li> |
| <li><a href="../tools/index.html">Tools</a></li> |
| <li class="nav-header">Documentation</li> |
| <li><a href="../docs/toc.html">Table of Contents</a></li> |
| <li><a href="../docs/installationguide.html">Installation Guide</a></li> |
| <li><a href="../docs/quickstartguide.html">QuickStart Guide</a></li> |
| <li><a href="../docs/userguide.html">User Guide</a></li> |
| <li><a href="../docs/jaxws-guide.html">JAXWS Guide</a></li> |
| <li><a href="../docs/pojoguide.html">POJO Guide</a></li> |
| <li><a href="../docs/spring.html">Spring Guide</a></li> |
| <li><a href="../docs/webadminguide.html">Web Administrator's Guide</a></li> |
| <li><a href="../docs/migration.html">Migration Guide (from Axis1)</a></li> |
| <li class="nav-header">Resources</li> |
| <li><a href="../faq.html">FAQ</a></li> |
| <li><a href="https://github.com/apache/axis-axis2-java-core" class="externalLink">Source Code</a></li> |
| <li class="nav-header">Get Involved</li> |
| <li><a href="../overview.html">Overview</a></li> |
| <li><a href="../mail-lists.html">Mailing Lists</a></li> |
| <li><a href="../release-process.html">Release Process</a></li> |
| <li><a href="../guidelines.html">Developer Guidelines</a></li> |
| <li><a href="../siteHowTo.html">Build the Site</a></li> |
| <li class="nav-header">Project Information</li> |
| <li><a href="https://github.com/apache/axis-axis2-java-core/graphs/contributors" class="externalLink">Contributors</a></li> |
| <li><a href="https://issues.apache.org/jira/projects/AXIS2/issues" class="externalLink">Issues</a></li> |
| <li class="nav-header">Apache</li> |
| <li><a href="https://www.apache.org/licenses/LICENSE-2.0.html" class="externalLink">License</a></li> |
| <li><a href="https://www.apache.org/foundation/sponsorship.html" class="externalLink">Sponsorship</a></li> |
| <li><a href="https://www.apache.org/foundation/thanks.html" class="externalLink">Thanks</a></li> |
| <li><a href="https://www.apache.org/security/" class="externalLink">Security</a></li> |
| </ul> |
| </nav> |
| <div class="well sidebar-nav"> |
| <div id="poweredBy"> |
| <div class="clear"></div> |
| <div class="clear"></div> |
| <a href="https://maven.apache.org/" class="builtBy" target="_blank"><img class="builtBy" alt="Built by Maven" src="../images/logos/maven-feather.png" /></a> |
| </div> |
| </div> |
| </header> |
| <main id="bodyColumn" class="span10"> |
| |
| |
| |
| <section><a id="Axis2_HTTP.2F2_Simplified_Configuration_Example"></a> |
| <h1>Axis2 HTTP/2 Simplified Configuration Example</h1> |
| |
| |
| <div style="background-color: #f0f8ff; border: 1px solid #0066cc; padding: 15px; margin: 15px 0;"> |
| <section><a id="a.3F.3F_Configuration_Simplification_Success"></a> |
| <h2>🎯 Configuration Simplification Success</h2> |
| |
| <p><strong>Achievement:</strong> 95% reduction in configuration complexity through intelligent defaults!</p> |
| |
| <p><strong>Before:</strong> 35+ parameters requiring manual tuning</p> |
| |
| <p><strong>After:</strong> 2 parameters for full HTTP/2 + Enhanced Moshi H2 optimization</p> |
| </div> |
| |
| </section><section><a id="Minimal_axis2.xml_Configuration"></a> |
| <h2>Minimal axis2.xml Configuration</h2> |
| |
| |
| <p>This example demonstrates the <strong>minimal configuration required</strong> for complete HTTP/2 support with Enhanced Moshi H2 JSON processing and production-ready performance optimization:</p> |
| |
| <section><a id="Complete_Minimal_Configuration"></a> |
| <h3>Complete Minimal Configuration</h3> |
| |
| |
| <pre class="prettyprint"><code> |
| |
| <?xml version="1.0" encoding="UTF-8"?> |
| <axisconfig name="AxisJava2.0"> |
| |
| <!-- ================================================= --> |
| <!-- Core Configuration with Intelligent Defaults --> |
| <!-- ================================================= --> |
| |
| <!-- JSON Processing: Enhanced Moshi H2 (Automatic Optimization) --> |
| <parameter name="enableJSONOnly">true</parameter> |
| |
| <!-- ================================================= --> |
| <!-- Message Receivers (Unchanged) --> |
| <!-- ================================================= --> |
| |
| <messageReceivers> |
| <messageReceiver mep="http://www.w3.org/ns/wsdl/in-out" |
| class="org.apache.axis2.json.moshi.rpc.JsonRpcMessageReceiver" /> |
| <messageReceiver mep="http://www.w3.org/ns/wsdl/in-only" |
| class="org.apache.axis2.json.moshi.rpc.JsonInOnlyRPCMessageReceiver"/> |
| </messageReceivers> |
| |
| <!-- ================================================= --> |
| <!-- Message Formatters: Enhanced Moshi H2 (GSON H2 also available) --> |
| <!-- ================================================= --> |
| |
| <messageFormatters> |
| <!-- Enhanced Moshi H2 JSON Formatter (Intelligent Defaults) - Recommended --> |
| <messageFormatter contentType="application/json" |
| class="org.apache.axis2.json.moshih2.EnhancedMoshiJsonFormatter"/> |
| <!-- Alternative: Enhanced GSON H2 JSON Formatter |
| <messageFormatter contentType="application/json" |
| class="org.apache.axis2.json.gsonh2.EnhancedGsonJsonFormatter"/> --> |
| </messageFormatters> |
| |
| <!-- ================================================= --> |
| <!-- Message Builders: Enhanced Moshi H2 (GSON H2 also available) --> |
| <!-- ================================================= --> |
| |
| <messageBuilders> |
| <!-- Enhanced Moshi H2 JSON Builder (Intelligent Defaults) - Recommended --> |
| <messageBuilder contentType="application/json" |
| class="org.apache.axis2.json.moshih2.EnhancedMoshiJsonBuilder"/> |
| <!-- Alternative: Enhanced GSON H2 JSON Builder |
| <messageBuilder contentType="application/json" |
| class="org.apache.axis2.json.gsonh2.EnhancedGsonJsonBuilder"/> --> |
| </messageBuilders> |
| |
| <!-- ================================================= --> |
| <!-- HTTP/2 Transport: Minimal Configuration --> |
| <!-- ================================================= --> |
| |
| <!-- HTTP/2 Transport Sender (Intelligent Defaults) --> |
| <transportSender name="http" |
| class="org.apache.axis2.transport.h2.impl.httpclient5.H2TransportSender"> |
| <parameter name="PROTOCOL">HTTP/2.0</parameter> |
| </transportSender> |
| |
| <!-- HTTPS HTTP/2 Transport (Inherits All Intelligent Defaults) --> |
| <transportSender name="https" |
| class="org.apache.axis2.transport.h2.impl.httpclient5.H2TransportSender"> |
| <parameter name="PROTOCOL">HTTP/2.0</parameter> |
| </transportSender> |
| |
| </axisconfig> |
| |
| </code></pre> |
| |
| </section></section><section><a id="What.27s_Automatically_Configured"></a> |
| <h2>What's Automatically Configured</h2> |
| |
| |
| <div style="background-color: #e8f5e8; border: 1px solid #4CAF50; padding: 10px; margin: 10px 0;"> |
| <section><a id="a.E2.9C.85_HTTP.2F2_Transport_Intelligent_Defaults"></a> |
| <h3>✅ HTTP/2 Transport Intelligent Defaults</h3> |
| |
| <p>The following parameters are <strong>automatically optimized</strong> without any configuration:</p> |
| </div> |
| |
| |
| <pre class="prettyprint"><code> |
| |
| # HTTP/2 Core Parameters (Automatic) |
| maxConcurrentStreams = 100 # Memory-constrained optimization |
| maxConnectionsTotal = 50 # Enterprise connection management |
| maxConnectionsPerRoute = 10 # Route-specific optimization |
| initialWindowSize = 2097152 # 2MB flow-control window (not related to 64KB flush interval) |
| streamingBufferSize = 65536 # Server-side flush interval (64KB is correct here) |
| connectionKeepAliveTime = 300000 # 5-minute balanced timeout |
| connectionTimeout = 30000 # 30-second connection establishment |
| responseTimeout = 300000 # 5-minute large payload tolerance |
| |
| # JSON processing is configured by selecting the message builder and |
| # formatter classes in axis2.xml (e.g. EnhancedMoshiJsonBuilder). |
| # No additional threshold parameters are needed here. |
| |
| # Security and TLS (Automatic) |
| supportedProtocols = "TLSv1.2,TLSv1.3" # Modern TLS versions |
| enableALPN = true # HTTP/2 protocol negotiation |
| |
| </code></pre> |
| |
| </section></section><section><a id="Configuration_Comparison"></a> |
| <h2>Configuration Comparison</h2> |
| |
| |
| <table class="bodyTableBorder" style="width:100%"> |
| |
| <tr class="a"> |
| <th>Aspect</th> |
| <th>Complex Configuration (Before)</th> |
| <th>Intelligent Defaults (After)</th></tr> |
| |
| <tr class="b"> |
| <td>Configuration Lines</td> |
| <td>120+ lines</td> |
| <td>15 lines</td></tr> |
| |
| <tr class="a"> |
| <td>Required Parameters</td> |
| <td>35+ parameters</td> |
| <td>2 parameters</td></tr> |
| |
| <tr class="b"> |
| <td>Setup Time</td> |
| <td>45+ minutes</td> |
| <td>5 minutes</td></tr> |
| |
| <tr class="a"> |
| <td>Error Probability</td> |
| <td>High (manual tuning)</td> |
| <td>Minimal (tested defaults)</td></tr> |
| |
| <tr class="b"> |
| <td>Performance Optimization</td> |
| <td>Manual calculation required</td> |
| <td>Automatic for all scenarios</td></tr> |
| |
| <tr class="a"> |
| <td>Maintenance Effort</td> |
| <td>Ongoing parameter tuning</td> |
| <td>Zero maintenance required</td></tr> |
| </table> |
| |
| </section><section><a id="Advanced_Customization_.28Optional.29"></a> |
| <h2>Advanced Customization (Optional)</h2> |
| |
| |
| <p>If you need to override specific defaults for specialized requirements:</p> |
| |
| |
| <pre class="prettyprint"><code> |
| |
| <!-- Example: Override specific parameters for custom requirements --> |
| <transportSender name="http" class="org.apache.axis2.transport.h2.impl.httpclient5.H2TransportSender"> |
| <parameter name="PROTOCOL">HTTP/2.0</parameter> |
| |
| <!-- Override defaults only if needed --> |
| <parameter name="maxConcurrentStreams">200</parameter> <!-- Higher for powerful servers --> |
| <parameter name="responseTimeout">600000</parameter> <!-- 10 minutes for very large payloads --> |
| </transportSender> |
| |
| </code></pre> |
| |
| </section><section><a id="Migration_from_Complex_Configuration"></a> |
| <h2>Migration from Complex Configuration</h2> |
| |
| <section><a id="Step_1.3A_Backup_Current_Configuration"></a> |
| <h3>Step 1: Backup Current Configuration</h3> |
| |
| <pre class="prettyprint"><code> |
| cp axis2.xml axis2-complex-backup.xml |
| </code></pre> |
| |
| </section><section><a id="Step_2.3A_Replace_with_Simplified_Configuration"></a> |
| <h3>Step 2: Replace with Simplified Configuration</h3> |
| |
| <p>Replace the extensive parameter configuration with the minimal example above.</p> |
| |
| </section><section><a id="Step_3.3A_Test_Performance"></a> |
| <h3>Step 3: Test Performance</h3> |
| |
| <p>Intelligent defaults are designed to provide optimal performance. Test to confirm performance meets or exceeds the complex configuration.</p> |
| |
| </section><section><a id="Step_4.3A_Fine-tune_Only_If_Necessary"></a> |
| <h3>Step 4: Fine-tune Only If Necessary</h3> |
| |
| <p>Use the built-in optimization recommendations to identify if any specific parameters need adjustment for your use case.</p> |
| |
| </section></section><section><a id="Benefits_Realized"></a> |
| <h2>Benefits Realized</h2> |
| |
| |
| <ul> |
| |
| <li><strong>📦 Configuration Simplicity</strong>: 95% reduction in required parameters</li> |
| |
| <li><strong>⚡ Faster Setup</strong>: 5 minutes vs 45+ minutes configuration time</li> |
| |
| <li><strong>🎯 Optimal Performance</strong>: Production-tested defaults for all scenarios</li> |
| |
| <li><strong>🔧 Zero Maintenance</strong>: No ongoing parameter tuning required</li> |
| |
| <li><strong>🛡️ Reduced Errors</strong>: Eliminates configuration mistakes and compatibility issues</li> |
| |
| <li><strong>📈 Consistent Results</strong>: Same high performance across different environments</li> |
| </ul> |
| |
| </section><section><a id="Support_and_Documentation"></a> |
| <h2>Support and Documentation</h2> |
| |
| |
| <ul> |
| |
| <li><a href="http2-integration-guide.html">Axis2 HTTP/2 Integration Guide</a> - Complete implementation details</li> |
| |
| <li><a href="wildfly-http2-integration-guide.html">WildFly + Axis2 HTTP/2 Integration</a> - WildFly-specific optimization</li> |
| </ul> |
| |
| </section> |
| </main> |
| </div> |
| </div> |
| <hr/> |
| <footer> |
| <div class="container-fluid"> |
| <div class="row-fluid"> |
| <p>© 2004–2026 |
| <a href="https://www.apache.org/">The Apache Software Foundation</a> |
| </p> |
| </div> |
| </div> |
| </footer> |
| </body> |
| </html> |