blob: a96de58d344f695b870eef93fed69b53a6b4c273 [file]
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 2.0.0 from src/site/markdown/docs/mcp-examples.md 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>MCP Examples: Financial Services on Axis2/Java – 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">MCP Examples: Financial Services on Axis2/Java</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&apos;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="MCP_Examples.3A_Financial_Services_on_Axis2.2FJava"></a>
<h1>MCP Examples: Financial Services on Axis2/Java</h1>
<p><strong>Summary</strong>: Apache Axis2/Java serves the same financial calculations as Axis2/C &#x2014;
portfolio variance, Monte Carlo VaR (GBM and Merton jump-diffusion), scenario
analysis &#x2014; over JSON on WildFly 32/39 and Tomcat 11 with Spring Security JWT
authentication. This document shows the same live demos as the Axis2/C
<code>MCP_EXAMPLES.md</code>, run against the Java implementation, with head-to-head
performance numbers.</p>
<p>The financial results are identical (same algorithms, same inputs, same outputs).
The implementations compete only on performance.</p><hr /><section><a id="Transport_and_Timing_Note"></a>
<h2>Transport and Timing Note</h2>
<p>Both Axis2/C and Axis2/Java support <strong>HTTPS/HTTP2</strong>. Axis2/C runs over
Apache httpd with mod_h2; Axis2/Java runs over WildFly or Tomcat with
ALPN-negotiated HTTP/2 on port 8443. Verified on WildFly 32, WildFly 39,
and Tomcat 11 &#x2014; all negotiate <code>h2</code> via ALPN when accessed over TLS.</p>
<p>All timings in this document use the <strong>server-reported <code>calcTimeUs</code> field</strong>
&#x2014; wall-clock time measured inside the service handler, after request
parsing and before response serialization. Transport overhead (TLS, HTTP/2
framing) is excluded. The computation comparison is apples-to-apples.</p><hr /></section><section><a id="Authentication"></a>
<h2>Authentication</h2>
<p>All examples use <strong>HTTPS/HTTP2 on port 8443</strong>. WildFly uses a self-signed certificate,
so <code>-k</code> skips certificate verification. Tomcat uses mTLS with CA-signed client certs
(see <code>mcp-architecture.md</code> for PKI details).</p>
<p>Axis2/Java requires JWT authentication via Spring Security. All financial service
calls need a <code>Bearer</code> token obtained from the login endpoint:</p>
<pre class="prettyprint"><code class="language-bash">TOKEN=$(curl -s --http2 -k https://localhost:8443/axis2-json-api/services/loginService \
-H 'Content-Type: application/json' \
-d '{&quot;doLogin&quot;:[{&quot;arg0&quot;:{&quot;email&quot;:&quot;java-dev@axis.apache.org&quot;,&quot;credentials&quot;:&quot;userguide&quot;}}]}' \
| python3 -c &quot;import sys,json; print(json.load(sys.stdin)['response']['token'])&quot;)
</code></pre>
<p>All subsequent examples assume <code>$TOKEN</code> is set.</p><hr /></section><section><a id="API_Differences.3A_Java_vs_C"></a>
<h2>API Differences: Java vs C</h2>
<p>The financial calculations are identical. The wire format differs:</p>
<table class="table table-striped">
<thead>
<tr class="a">
<th> </th>
<th>Axis2/C</th>
<th>Axis2/Java</th></tr></thead><tbody>
<tr class="b">
<td>URL pattern</td>
<td><code>.../portfolioVariance</code></td>
<td><code>.../FinancialBenchmarkService</code></td></tr>
<tr class="a">
<td>Request format</td>
<td><code>{&quot;n_assets&quot;: 5, ...}</code></td>
<td><code>{&quot;portfolioVariance&quot;:[{&quot;arg0&quot;:{...}}]}</code></td></tr>
<tr class="b">
<td>Response format</td>
<td><code>{&quot;status&quot;: &quot;SUCCESS&quot;, ...}</code></td>
<td><code>{&quot;response&quot;: {&quot;status&quot;: &quot;SUCCESS&quot;, ...}}</code></td></tr>
<tr class="a">
<td>Field naming</td>
<td><code>snake_case</code></td>
<td><code>camelCase</code></td></tr>
<tr class="b">
<td>Authentication</td>
<td>None (HTTP/2 + TLS)</td>
<td>JWT Bearer token</td></tr>
<tr class="a">
<td>Memory field</td>
<td><code>memory_used_kb</code> (KB)</td>
<td><code>memoryUsedMb</code> (MB)</td></tr>
<tr class="b">
<td>Covariance input</td>
<td>Flat array (row-major)</td>
<td>2D array <code>[[...],[...]]</code></td></tr></tbody>
</table>
<hr /></section><section><a id="MCP_Bridge"></a>
<h2>MCP Bridge</h2>
<p>Axis2/Java exposes MCP via <code>axis2-mcp-bridge</code>, a stdio JAR that reads
<code>/openapi-mcp.json</code> and proxies <code>tools/call</code> to the Axis2 service. The
bridge handles authentication (mTLS on Tomcat, JWT on WildFly) so the AI
client sees only standard MCP JSON-RPC.</p>
<p><strong>Claude Desktop configuration</strong> (WildFly, JWT auth):</p>
<pre class="prettyprint"><code class="language-json">{
&quot;mcpServers&quot;: {
&quot;axis2-java-finbench&quot;: {
&quot;command&quot;: &quot;java&quot;,
&quot;args&quot;: [&quot;-jar&quot;, &quot;/path/to/axis2-mcp-bridge-2.0.1-SNAPSHOT-exe.jar&quot;,
&quot;--base-url&quot;, &quot;https://localhost:8443/axis2-json-api&quot;]
}
}
}
</code></pre>
<p><strong>MCP stdio call format</strong> (what the bridge sends/receives):</p>
<pre class="prettyprint"><code class="language-bash">echo '{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:1,&quot;method&quot;:&quot;tools/call&quot;,&quot;params&quot;:{
&quot;name&quot;:&quot;portfolioVariance&quot;,&quot;arguments&quot;:{...}}}' \
| java -jar axis2-mcp-bridge-2.0.1-SNAPSHOT-exe.jar \
--base-url https://localhost:8443/axis2-json-api
</code></pre>
<p>All curl examples below include paired MCP stdio equivalents.</p><hr /></section><section><a id="Live_Examples_.28Tested_on_WildFly_32.2F39_and_Tomcat_11.29"></a>
<h2>Live Examples (Tested on WildFly 32/39 and Tomcat 11)</h2><section><a id="Portfolio_Variance_.E2.80.94_5_assets"></a>
<h3>Portfolio Variance &#x2014; 5 assets</h3>
<pre class="prettyprint"><code class="language-bash">curl -s --http2 -k https://localhost:8443/axis2-json-api/services/FinancialBenchmarkService \
-H 'Content-Type: application/json' -H &quot;Authorization: Bearer $TOKEN&quot; \
-d '{&quot;portfolioVariance&quot;:[{&quot;arg0&quot;:{
&quot;nAssets&quot;: 5,
&quot;weights&quot;: [0.25, 0.25, 0.20, 0.15, 0.15],
&quot;covarianceMatrix&quot;: [
[0.0691, 0.0313, 0.0457, 0.0272, -0.0035],
[0.0313, 0.0976, 0.0591, 0.0408, 0.0058],
[0.0457, 0.0591, 0.1207, 0.0437, -0.0086],
[0.0272, 0.0408, 0.0437, 0.0638, 0.0015],
[-0.0035, 0.0058,-0.0086, 0.0015, 0.0303]
],
&quot;normalizeWeights&quot;: true
}}]}'
</code></pre>
<pre class="prettyprint"><code class="language-json">{
&quot;response&quot;: {
&quot;status&quot;: &quot;SUCCESS&quot;,
&quot;portfolioVariance&quot;: 0.0392,
&quot;portfolioVolatility&quot;: 0.198,
&quot;annualizedVolatility&quot;: 3.143,
&quot;calcTimeUs&quot;: 1,
&quot;matrixOperations&quot;: 25,
&quot;memoryUsedMb&quot;: 198,
&quot;runtimeInfo&quot;: &quot;Java (JVM heap tier: &lt; 2 GB)&quot;
}
}
</code></pre>
<p><strong>MCP stdio equivalent:</strong></p>
<pre class="prettyprint"><code class="language-bash">echo '{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:1,&quot;method&quot;:&quot;tools/call&quot;,&quot;params&quot;:{&quot;name&quot;:&quot;portfolioVariance&quot;,&quot;arguments&quot;:{&quot;nAssets&quot;:5,&quot;weights&quot;:[0.25,0.25,0.20,0.15,0.15],&quot;covarianceMatrix&quot;:[[0.0691,0.0313,0.0457,0.0272,-0.0035],[0.0313,0.0976,0.0591,0.0408,0.0058],[0.0457,0.0591,0.1207,0.0437,-0.0086],[0.0272,0.0408,0.0437,0.0638,0.0015],[-0.0035,0.0058,-0.0086,0.0015,0.0303]],&quot;normalizeWeights&quot;:true}}}' \
| java -jar axis2-mcp-bridge-2.0.1-SNAPSHOT-exe.jar --base-url https://localhost:8443/axis2-json-api
</code></pre></section><section><a id="Portfolio_Variance_.E2.80.94_500_assets"></a>
<h3>Portfolio Variance &#x2014; 500 assets</h3>
<pre class="prettyprint"><code class="language-bash"># Generate 500-asset test data
python3 -c &quot;
import json
n=500; w=[1.0/n]*n; c=[]
for i in range(n):
row=[]
for j in range(n):
if i==j: row.append(0.04)
else: row.append(0.01*max(0,1.0-abs(i-j)/50.0))
c.append(row)
print(json.dumps({'portfolioVariance':[{'arg0':{'nAssets':n,'weights':w,'covarianceMatrix':c}}]}))&quot; \
&gt; /tmp/pv500.json
curl -s --http2 -k https://localhost:8443/axis2-json-api/services/FinancialBenchmarkService \
-H 'Content-Type: application/json' -H &quot;Authorization: Bearer $TOKEN&quot; \
-d @/tmp/pv500.json
</code></pre>
<pre class="prettyprint"><code class="language-json">{
&quot;response&quot;: {
&quot;status&quot;: &quot;SUCCESS&quot;,
&quot;portfolioVariance&quot;: 0.001027,
&quot;portfolioVolatility&quot;: 0.0320,
&quot;calcTimeUs&quot;: 660,
&quot;matrixOperations&quot;: 250000,
&quot;memoryUsedMb&quot;: 229
}
}
</code></pre>
<p>(MCP equivalent omitted for 500-asset &#x2014; the arguments object is identical,
just wrapped in <code>tools/call</code> JSON-RPC as shown above.)</p></section><section><a id="Monte_Carlo_VaR_.E2.80.94_100K_simulations"></a>
<h3>Monte Carlo VaR &#x2014; 100K simulations</h3>
<p>Monte Carlo Value at Risk estimates portfolio loss at a given confidence
level by simulating thousands of random price paths. The default model is
Geometric Brownian Motion (GBM): <code>S(t+dt) = S(t) &#xd7; exp((&#x3bc; &#x2212; &#x3c3;&#xb2;/2)&#xb7;dt + &#x3c3;&#xb7;&#x221a;dt&#xb7;Z)</code>
where Z ~ N(0,1). A Merton jump-diffusion model is also available
(<code>&quot;model&quot;:&quot;merton&quot;</code>) which adds Poisson-distributed jumps for fat-tailed
scenarios &#x2014; configurable via <code>jumpIntensity</code>, <code>jumpMean</code>, and <code>jumpVol</code>
parameters. Run 100,000 paths, sort the terminal values, read off the
1st percentile loss &#x2014; that's your 99% VaR. Production risk systems run
this nightly for regulatory capital calculations.</p>
<pre class="prettyprint"><code class="language-bash">curl -s --http2 -k https://localhost:8443/axis2-json-api/services/FinancialBenchmarkService \
-H 'Content-Type: application/json' -H &quot;Authorization: Bearer $TOKEN&quot; \
-d '{&quot;monteCarlo&quot;:[{&quot;arg0&quot;:{
&quot;nSimulations&quot;: 100000,
&quot;nPeriods&quot;: 252,
&quot;initialValue&quot;: 1000000,
&quot;expectedReturn&quot;: 0.10,
&quot;volatility&quot;: 0.198,
&quot;nPeriodsPerYear&quot;: 252
}}]}'
</code></pre>
<pre class="prettyprint"><code class="language-json">{
&quot;response&quot;: {
&quot;status&quot;: &quot;SUCCESS&quot;,
&quot;meanFinalValue&quot;: 1104699.76,
&quot;var95&quot;: 219309.63,
&quot;var99&quot;: 317526.89,
&quot;cvar95&quot;: 279538.64,
&quot;maxDrawdown&quot;: 0.567,
&quot;probProfit&quot;: 0.657,
&quot;calcTimeUs&quot;: 1380378,
&quot;simulationsPerSecond&quot;: 72443,
&quot;memoryUsedMb&quot;: 142
}
}
</code></pre>
<p><strong>MCP stdio equivalent:</strong></p>
<pre class="prettyprint"><code class="language-bash">echo '{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:2,&quot;method&quot;:&quot;tools/call&quot;,&quot;params&quot;:{&quot;name&quot;:&quot;monteCarlo&quot;,&quot;arguments&quot;:{&quot;nSimulations&quot;:100000,&quot;nPeriods&quot;:252,&quot;initialValue&quot;:1000000,&quot;expectedReturn&quot;:0.10,&quot;volatility&quot;:0.198,&quot;nPeriodsPerYear&quot;:252}}}' \
| java -jar axis2-mcp-bridge-2.0.1-SNAPSHOT-exe.jar --base-url https://localhost:8443/axis2-json-api
</code></pre><hr /></section></section><section><a id="Demo_1.3A_Stress-test_.E2.80.94_.E2.80.9CWhat_if_correlations_spike.3F.E2.80.9D"></a>
<h2>Demo 1: Stress-test &#x2014; &#x201c;What if correlations spike?&#x201d;</h2>
<p>Same test as Axis2/C <code>MCP_EXAMPLES.md</code> Demo 1. Baseline portfolio at real
market correlations, then stressed to &#x3c1; = 0.8, then Monte Carlo on the
stressed portfolio.</p>
<p>Each curl below has an MCP equivalent &#x2014; same <code>tools/call</code> pattern as
the Live Examples above, with the arguments object matching the <code>arg0</code>
payload. The bridge handles the Axis2 JSON-RPC wrapping transparently.</p>
<p><strong>Step 1 &#x2014; Baseline:</strong></p>
<pre class="prettyprint"><code class="language-bash">curl -s --http2 -k https://localhost:8443/axis2-json-api/services/FinancialBenchmarkService \
-H 'Content-Type: application/json' -H &quot;Authorization: Bearer $TOKEN&quot; \
-d '{&quot;portfolioVariance&quot;:[{&quot;arg0&quot;:{
&quot;nAssets&quot;: 5,
&quot;weights&quot;: [0.25, 0.25, 0.20, 0.15, 0.15],
&quot;covarianceMatrix&quot;: [
[0.0691, 0.0313, 0.0457, 0.0272, -0.0035],
[0.0313, 0.0976, 0.0591, 0.0408, 0.0058],
[0.0457, 0.0591, 0.1207, 0.0437, -0.0086],
[0.0272, 0.0408, 0.0437, 0.0638, 0.0015],
[-0.0035, 0.0058,-0.0086, 0.0015, 0.0303]
],
&quot;normalizeWeights&quot;: true
}}]}'
</code></pre>
<pre class="prettyprint"><code class="language-json">{
&quot;response&quot;: {
&quot;status&quot;: &quot;SUCCESS&quot;,
&quot;portfolioVariance&quot;: 0.0392,
&quot;portfolioVolatility&quot;: 0.198,
&quot;calcTimeUs&quot;: 1,
&quot;memoryUsedMb&quot;: 198
}
}
</code></pre>
<p><strong>Step 2 &#x2014; Stressed (all pairwise correlations &#x2192; 0.8):</strong></p>
<pre class="prettyprint"><code class="language-bash">curl -s --http2 -k https://localhost:8443/axis2-json-api/services/FinancialBenchmarkService \
-H 'Content-Type: application/json' -H &quot;Authorization: Bearer $TOKEN&quot; \
-d '{&quot;portfolioVariance&quot;:[{&quot;arg0&quot;:{
&quot;nAssets&quot;: 5,
&quot;weights&quot;: [0.25, 0.25, 0.20, 0.15, 0.15],
&quot;covarianceMatrix&quot;: [
[0.0691, 0.0656, 0.0730, 0.0530, 0.0366],
[0.0656, 0.0974, 0.0866, 0.0629, 0.0434],
[0.0730, 0.0866, 0.1204, 0.0699, 0.0483],
[0.0530, 0.0629, 0.0699, 0.0635, 0.0351],
[0.0366, 0.0434, 0.0483, 0.0351, 0.0303]
],
&quot;normalizeWeights&quot;: true
}}]}'
</code></pre>
<pre class="prettyprint"><code class="language-json">{
&quot;response&quot;: {
&quot;status&quot;: &quot;SUCCESS&quot;,
&quot;portfolioVariance&quot;: 0.0649,
&quot;portfolioVolatility&quot;: 0.2547,
&quot;calcTimeUs&quot;: 1,
&quot;memoryUsedMb&quot;: 198
}
}
</code></pre>
<p><strong>Step 3 &#x2014; Monte Carlo on stressed portfolio (100K paths):</strong></p>
<pre class="prettyprint"><code class="language-bash">curl -s --http2 -k https://localhost:8443/axis2-json-api/services/FinancialBenchmarkService \
-H 'Content-Type: application/json' -H &quot;Authorization: Bearer $TOKEN&quot; \
-d '{&quot;monteCarlo&quot;:[{&quot;arg0&quot;:{
&quot;nSimulations&quot;: 100000,
&quot;nPeriods&quot;: 252,
&quot;initialValue&quot;: 1000000,
&quot;expectedReturn&quot;: 0.10,
&quot;volatility&quot;: 0.255,
&quot;nPeriodsPerYear&quot;: 252
}}]}'
</code></pre>
<pre class="prettyprint"><code class="language-json">{
&quot;response&quot;: {
&quot;status&quot;: &quot;SUCCESS&quot;,
&quot;meanFinalValue&quot;: 1104718.26,
&quot;var95&quot;: 296582.35,
&quot;var99&quot;: 409644.96,
&quot;cvar95&quot;: 364494.42,
&quot;maxDrawdown&quot;: 0.668,
&quot;probProfit&quot;: 0.602,
&quot;calcTimeUs&quot;: 1437421,
&quot;simulationsPerSecond&quot;: 69569
}
}
</code></pre>
<p><strong>MCP stdio equivalent (stressed MC):</strong></p>
<pre class="prettyprint"><code class="language-bash">echo '{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:3,&quot;method&quot;:&quot;tools/call&quot;,&quot;params&quot;:{&quot;name&quot;:&quot;monteCarlo&quot;,&quot;arguments&quot;:{&quot;nSimulations&quot;:100000,&quot;nPeriods&quot;:252,&quot;initialValue&quot;:1000000,&quot;expectedReturn&quot;:0.10,&quot;volatility&quot;:0.255,&quot;nPeriodsPerYear&quot;:252}}}' \
| java -jar axis2-mcp-bridge-2.0.1-SNAPSHOT-exe.jar --base-url https://localhost:8443/axis2-json-api
</code></pre>
<p><strong>Comparison &#x2014; Axis2/C vs Axis2/Java (same inputs, same day):</strong></p>
<table class="table table-striped">
<thead>
<tr class="a">
<th>Metric</th>
<th>Normal &#x3c1;</th>
<th>Stressed &#x3c1; = 0.8</th>
<th>Change</th></tr></thead><tbody>
<tr class="b">
<td>Portfolio vol</td>
<td>19.8%</td>
<td>25.5%</td>
<td><strong>+29%</strong></td></tr>
<tr class="a">
<td>95% VaR (1yr, $1M)</td>
<td>$219K</td>
<td>$297K</td>
<td><strong>+$78K</strong></td></tr>
<tr class="b">
<td>99% VaR</td>
<td>$318K</td>
<td>$410K</td>
<td><strong>+$92K</strong></td></tr>
<tr class="a">
<td>Prob of profit</td>
<td>65.7%</td>
<td>60.2%</td>
<td>-5.5pp</td></tr></tbody>
</table>
<table class="table table-striped">
<thead>
<tr class="a">
<th>Timing</th>
<th>Axis2/C</th>
<th>Axis2/Java</th>
<th>Ratio</th></tr></thead><tbody>
<tr class="b">
<td><code>portfolioVariance</code> (&#xd7;2)</td>
<td>&lt; 1 &#x3bc;s each</td>
<td>1 &#x3bc;s each</td>
<td>~1x</td></tr>
<tr class="a">
<td><code>monteCarlo</code> (100K)</td>
<td>727 ms</td>
<td>1,437 ms</td>
<td><strong>2.0x</strong></td></tr>
<tr class="b">
<td>Total compute</td>
<td>~0.73 sec</td>
<td>~1.44 sec</td>
<td>2.0x</td></tr></tbody>
</table>
<p>Both produce the same financial results. Java's Monte Carlo is ~2x slower
on this run; the JIT-warmed steady state is typically 1.3-1.5x (see
convergence section below).</p><hr /></section><section><a id="Demo_2.3A_Pre-trade_risk_.E2.80.94_.E2.80.9CShould_I_add_this_name.3F.E2.80.9D"></a>
<h2>Demo 2: Pre-trade risk &#x2014; &#x201c;Should I add this name?&#x201d;</h2>
<p>Same test as Axis2/C Demo 2. Two candidate 6-asset portfolios: European
semiconductor (high correlation to existing tech) vs Japanese peer (low
correlation). All calls have MCP equivalents via the bridge (same pattern
as Live Examples).</p>
<p><strong>Candidate A &#x2014; European semi (vol 44%, &#x3c1; = 0.68 to tech):</strong></p>
<pre class="prettyprint"><code class="language-bash">curl -s --http2 -k https://localhost:8443/axis2-json-api/services/FinancialBenchmarkService \
-H 'Content-Type: application/json' -H &quot;Authorization: Bearer $TOKEN&quot; \
-d '{&quot;portfolioVariance&quot;:[{&quot;arg0&quot;:{
&quot;nAssets&quot;: 6,
&quot;weights&quot;: [0.2425, 0.2425, 0.194, 0.1455, 0.1455, 0.03],
&quot;covarianceMatrix&quot;: [
[0.0691, 0.0313, 0.0457, 0.0272,-0.0035, 0.0787],
[0.0313, 0.0976, 0.0591, 0.0408, 0.0058, 0.0934],
[0.0457, 0.0591, 0.1207, 0.0437,-0.0086, 0.1039],
[0.0272, 0.0408, 0.0437, 0.0638, 0.0015, 0.0610],
[-0.0035, 0.0058,-0.0086, 0.0015, 0.0303, 0.0115],
[0.0787, 0.0934, 0.1039, 0.0610, 0.0115, 0.1936]
],
&quot;normalizeWeights&quot;: true
}}]}'
</code></pre>
<pre class="prettyprint"><code class="language-json">{&quot;response&quot;: {&quot;status&quot;: &quot;SUCCESS&quot;, &quot;portfolioVolatility&quot;: 0.2035, &quot;calcTimeUs&quot;: 1}}
</code></pre>
<p><strong>Candidate B &#x2014; Japanese peer (vol 38%, &#x3c1; = 0.31 to US tech):</strong></p>
<pre class="prettyprint"><code class="language-bash">curl -s --http2 -k https://localhost:8443/axis2-json-api/services/FinancialBenchmarkService \
-H 'Content-Type: application/json' -H &quot;Authorization: Bearer $TOKEN&quot; \
-d '{&quot;portfolioVariance&quot;:[{&quot;arg0&quot;:{
&quot;nAssets&quot;: 6,
&quot;weights&quot;: [0.2425, 0.2425, 0.194, 0.1455, 0.1455, 0.03],
&quot;covarianceMatrix&quot;: [
[0.0691, 0.0313, 0.0457, 0.0272,-0.0035, 0.0310],
[0.0313, 0.0976, 0.0591, 0.0408, 0.0058, 0.0368],
[0.0457, 0.0591, 0.1207, 0.0437,-0.0086, 0.0409],
[0.0272, 0.0408, 0.0437, 0.0638, 0.0015, 0.0239],
[-0.0035, 0.0058,-0.0086, 0.0015, 0.0303, 0.0066],
[0.0310, 0.0368, 0.0409, 0.0239, 0.0066, 0.1444]
],
&quot;normalizeWeights&quot;: true
}}]}'
</code></pre>
<pre class="prettyprint"><code class="language-json">{&quot;response&quot;: {&quot;status&quot;: &quot;SUCCESS&quot;, &quot;portfolioVolatility&quot;: 0.1968, &quot;calcTimeUs&quot;: 1}}
</code></pre>
<p><strong>Head-to-head Monte Carlo (100K paths each):</strong></p>
<pre class="prettyprint"><code class="language-bash"># European candidate (vol 21.1%)
curl -s --http2 -k https://localhost:8443/axis2-json-api/services/FinancialBenchmarkService \
-H 'Content-Type: application/json' -H &quot;Authorization: Bearer $TOKEN&quot; \
-d '{&quot;monteCarlo&quot;:[{&quot;arg0&quot;:{&quot;nSimulations&quot;:100000,&quot;nPeriods&quot;:252,
&quot;initialValue&quot;:1000000,&quot;expectedReturn&quot;:0.10,&quot;volatility&quot;:0.211,
&quot;nPeriodsPerYear&quot;:252}}]}'
# Japanese candidate (vol 20.1%)
curl -s --http2 -k https://localhost:8443/axis2-json-api/services/FinancialBenchmarkService \
-H 'Content-Type: application/json' -H &quot;Authorization: Bearer $TOKEN&quot; \
-d '{&quot;monteCarlo&quot;:[{&quot;arg0&quot;:{&quot;nSimulations&quot;:100000,&quot;nPeriods&quot;:252,
&quot;initialValue&quot;:1000000,&quot;expectedReturn&quot;:0.10,&quot;volatility&quot;:0.201,
&quot;nPeriodsPerYear&quot;:252}}]}'
</code></pre>
<p><strong>European candidate response:</strong></p>
<pre class="prettyprint"><code class="language-json">{&quot;response&quot;: {&quot;var95&quot;: 237481, &quot;var99&quot;: 340245, &quot;cvar95&quot;: 300412, &quot;probProfit&quot;: 0.643, &quot;maxDrawdown&quot;: 0.610, &quot;calcTimeUs&quot;: 1360351}}
</code></pre>
<p><strong>Japanese candidate response:</strong></p>
<pre class="prettyprint"><code class="language-json">{&quot;response&quot;: {&quot;var95&quot;: 221367, &quot;var99&quot;: 322087, &quot;cvar95&quot;: 282371, &quot;probProfit&quot;: 0.656, &quot;maxDrawdown&quot;: 0.555, &quot;calcTimeUs&quot;: 1364834}}
</code></pre>
<p><strong>Results summary (2026-04-08):</strong></p>
<table class="table table-striped">
<thead>
<tr class="a">
<th> </th>
<th>Before (5 names)</th>
<th>+ European semi</th>
<th>+ Japanese peer</th></tr></thead><tbody>
<tr class="b">
<td>Portfolio vol</td>
<td>19.8%</td>
<td><strong>20.3%</strong> (+55bp)</td>
<td><strong>19.7%</strong> (-13bp)</td></tr>
<tr class="a">
<td>95% VaR ($1M)</td>
<td>$219K</td>
<td>$237K</td>
<td>$221K</td></tr>
<tr class="b">
<td>99% VaR</td>
<td>$318K</td>
<td>$340K</td>
<td>$322K</td></tr>
<tr class="a">
<td>CVaR 95%</td>
<td>$280K</td>
<td>$300K</td>
<td>$282K</td></tr>
<tr class="b">
<td>Prob of profit</td>
<td>65.7%</td>
<td>64.3%</td>
<td>65.6%</td></tr></tbody>
</table>
<p><strong>Timing comparison:</strong></p>
<table class="table table-striped">
<thead>
<tr class="a">
<th>Call</th>
<th>Axis2/C</th>
<th>Axis2/Java</th>
<th>Ratio</th></tr></thead><tbody>
<tr class="b">
<td><code>portfolioVariance</code> (&#xd7;4)</td>
<td>&lt; 1 &#x3bc;s each</td>
<td>1 &#x3bc;s each</td>
<td>~1x</td></tr>
<tr class="a">
<td><code>monteCarlo</code> European</td>
<td>716 ms</td>
<td>1,360 ms</td>
<td>1.9x</td></tr>
<tr class="b">
<td><code>monteCarlo</code> Japanese</td>
<td>672 ms</td>
<td>1,365 ms</td>
<td>2.0x</td></tr>
<tr class="a">
<td>Total compute</td>
<td>~1.4 sec</td>
<td>~2.7 sec</td>
<td>1.9x</td></tr></tbody>
</table>
<p>Financial conclusions are identical &#x2014; the Japanese name provides genuine
diversification. Java takes roughly twice as long for the Monte Carlo
simulations.</p><hr /></section><section><a id="Demo_3.3A_Convergence_.E2.80.94_.E2.80.9CHow_much_compute_do_I_actually_need.3F.E2.80.9D"></a>
<h2>Demo 3: Convergence &#x2014; &#x201c;How much compute do I actually need?&#x201d;</h2>
<p>Run <code>monteCarlo</code> at 1K, 10K, 100K, and 1M paths:</p>
<pre class="prettyprint"><code class="language-bash">for N in 1000 10000 100000 1000000; do
curl -s --http2 -k https://localhost:8443/axis2-json-api/services/FinancialBenchmarkService \
-H 'Content-Type: application/json' -H &quot;Authorization: Bearer $TOKEN&quot; \
-d &quot;{\&quot;monteCarlo\&quot;:[{\&quot;arg0\&quot;:{\&quot;nSimulations\&quot;:$N,\&quot;nPeriods\&quot;:252,
\&quot;initialValue\&quot;:1000000,\&quot;expectedReturn\&quot;:0.10,\&quot;volatility\&quot;:0.198,
\&quot;nPeriodsPerYear\&quot;:252}}]}&quot;
done
</code></pre>
<p><strong>MCP stdio equivalent (example for 100K):</strong></p>
<pre class="prettyprint"><code class="language-bash">echo '{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:4,&quot;method&quot;:&quot;tools/call&quot;,&quot;params&quot;:{&quot;name&quot;:&quot;monteCarlo&quot;,&quot;arguments&quot;:{&quot;nSimulations&quot;:100000,&quot;nPeriods&quot;:252,&quot;initialValue&quot;:1000000,&quot;expectedReturn&quot;:0.10,&quot;volatility&quot;:0.198,&quot;nPeriodsPerYear&quot;:252}}}' \
| java -jar axis2-mcp-bridge-2.0.1-SNAPSHOT-exe.jar --base-url https://localhost:8443/axis2-json-api
</code></pre>
<p><strong>Axis2/Java results (2026-04-08):</strong></p>
<table class="table table-striped">
<thead>
<tr class="a">
<th>Simulations</th>
<th>95% VaR</th>
<th>99% VaR</th>
<th>Calc time</th>
<th>Sims/sec</th></tr></thead><tbody>
<tr class="b">
<td>1,000</td>
<td>$221,665</td>
<td>$325,340</td>
<td><strong>13 ms</strong></td>
<td>77,863</td></tr>
<tr class="a">
<td>10,000</td>
<td>$216,407</td>
<td>$312,895</td>
<td><strong>136 ms</strong></td>
<td>73,378</td></tr>
<tr class="b">
<td>100,000</td>
<td>$218,868</td>
<td>$315,163</td>
<td><strong>1.37 sec</strong></td>
<td>73,211</td></tr>
<tr class="a">
<td>1,000,000</td>
<td>$217,286</td>
<td>$315,700</td>
<td><strong>13.8 sec</strong></td>
<td>72,710</td></tr></tbody>
</table>
<p><strong>Head-to-head with Axis2/C (same inputs, same machine):</strong></p>
<table class="table table-striped">
<thead>
<tr class="a">
<th>Simulations</th>
<th>C time</th>
<th>Java time</th>
<th>Ratio</th>
<th>C sims/sec</th>
<th>Java sims/sec</th></tr></thead><tbody>
<tr class="b">
<td>1,000</td>
<td>6 ms</td>
<td>13 ms</td>
<td>2.1x</td>
<td>164,295</td>
<td>77,863</td></tr>
<tr class="a">
<td>10,000</td>
<td>66 ms</td>
<td>136 ms</td>
<td>2.1x</td>
<td>152,423</td>
<td>73,378</td></tr>
<tr class="b">
<td>100,000</td>
<td>716 ms</td>
<td>1,370 ms</td>
<td>1.9x</td>
<td>139,650</td>
<td>73,211</td></tr>
<tr class="a">
<td>1,000,000</td>
<td>6.6 sec</td>
<td>13.8 sec</td>
<td>2.1x</td>
<td>150,773</td>
<td>72,710</td></tr></tbody>
</table>
<p>The ratio is a consistent <strong>~2x</strong> across all simulation counts. C processes
~150K simulations/sec vs Java's ~73K sims/sec.</p>
<p><strong>Production capacity math (Java)</strong>: at 1.37 sec per 100K-path run, a single
core processes <strong>44 funds per minute</strong>. A 500-fund universe completes in
~11.4 minutes on one core, or <strong>~69 seconds on a 10-core node</strong>.</p>
<p>For comparison, Axis2/C: 500 funds in 6 minutes on one core, 36 seconds
on 10 cores.</p><hr /></section><section><a id="a500-Asset_Portfolio_Variance_.E2.80.94_The_Big_Comparison"></a>
<h2>500-Asset Portfolio Variance &#x2014; The Big Comparison</h2>
<p>This is where the gap widens. O(n^2) matrix math at n=500 means 250,000
multiply-accumulate operations on a flat array (C) vs a 2D Java array
with bounds checking.</p>
<p><strong>Axis2/C:</strong></p>
<pre class="prettyprint"><code class="language-json">{&quot;portfolio_volatility&quot;: 0.0320, &quot;calc_time_us&quot;: 232, &quot;matrix_operations&quot;: 250000}
</code></pre>
<p><strong>Axis2/Java:</strong></p>
<pre class="prettyprint"><code class="language-json">{&quot;portfolioVolatility&quot;: 0.0320, &quot;calcTimeUs&quot;: 660, &quot;matrixOperations&quot;: 250000}
</code></pre>
<table class="table table-striped">
<thead>
<tr class="a">
<th> </th>
<th>Axis2/C</th>
<th>Axis2/Java</th>
<th>Ratio</th></tr></thead><tbody>
<tr class="b">
<td>Calc time</td>
<td><strong>232 &#x3bc;s</strong></td>
<td><strong>660 &#x3bc;s</strong></td>
<td>2.8x</td></tr>
<tr class="a">
<td>Memory</td>
<td>~193 MB RSS</td>
<td>229 MB heap</td>
<td>1.2x</td></tr>
<tr class="b">
<td>Result</td>
<td>0.0320</td>
<td>0.0320</td>
<td>identical</td></tr></tbody>
</table>
<p>At 500 assets Java is 2.8x slower &#x2014; the JVM's array bounds checking and
object overhead becomes measurable at O(n^2). Both are still sub-millisecond,
which is fast enough for interactive use.</p><hr /></section><section><a id="Full_Performance_Summary"></a>
<h2>Full Performance Summary</h2>
<p>All measurements from 2026-04-08, same machine (Linux, 32 GB RAM).
Timings are server-reported <code>calcTimeUs</code> &#x2014; pure computation time, no
transport overhead. Monte Carlo timings vary &#xb1;5% across runs due to JIT
warmup and GC; values below are from the Demo 3 convergence runs (JIT-warm
steady state).</p>
<table class="table table-striped">
<thead>
<tr class="a">
<th>Benchmark</th>
<th>Axis2/C</th>
<th>Axis2/Java</th>
<th>Ratio</th></tr></thead><tbody>
<tr class="b">
<td>portfolioVariance (5 assets)</td>
<td>&lt; 1 &#x3bc;s</td>
<td>1 &#x3bc;s</td>
<td>~1x</td></tr>
<tr class="a">
<td>portfolioVariance (500 assets)</td>
<td>232 &#x3bc;s</td>
<td>660 &#x3bc;s</td>
<td>2.8x</td></tr>
<tr class="b">
<td>monteCarlo (1K &#xd7; 252)</td>
<td>6 ms</td>
<td>13 ms</td>
<td>2.1x</td></tr>
<tr class="a">
<td>monteCarlo (10K &#xd7; 252)</td>
<td>66 ms</td>
<td>136 ms</td>
<td>2.1x</td></tr>
<tr class="b">
<td>monteCarlo (100K &#xd7; 252)</td>
<td>716 ms</td>
<td>1,366 ms</td>
<td>1.9x</td></tr>
<tr class="a">
<td>monteCarlo (1M &#xd7; 252)</td>
<td>6.6 sec</td>
<td>13.8 sec</td>
<td>2.1x</td></tr>
<tr class="b">
<td>MC throughput (sims/sec)</td>
<td>~150K</td>
<td>~73K</td>
<td>2.1x</td></tr>
<tr class="a">
<td>Peak memory (500-asset PV)</td>
<td>~193 MB</td>
<td>229 MB</td>
<td>1.2x</td></tr>
<tr class="b">
<td>Peak memory (100K MC)</td>
<td>~44 MB</td>
<td>142 MB</td>
<td>3.2x</td></tr>
<tr class="a">
<td>Startup</td>
<td>instant</td>
<td>~7 sec (WildFly)</td>
<td>N/A</td></tr></tbody>
</table>
<section><a id="When_to_use_which"></a>
<h3>When to use which</h3>
<ul>
<li>
<p><strong>Axis2/C</strong>: Edge devices, Android (1-2 GB RAM), IoT gateways, latency-critical
paths, environments where a JVM cannot run or its memory overhead is unacceptable.
Sub-millisecond portfolio variance at 500 assets. Startup in milliseconds.</p></li>
<li>
<p><strong>Axis2/Java</strong>: Standard Java EE/Jakarta EE deployment on WildFly or Tomcat,
teams with existing Java infrastructure, environments requiring Spring Security
(JWT/mTLS), or integration with Java-based data providers. 2x slower on Monte
Carlo but still interactive (1.4 sec for 100K paths). Deploys as a standard WAR
with OpenAPI/Swagger UI and MCP bridge included.</p></li>
</ul>
<p>Both implement the same MCP tool schemas. An AI assistant configured with
either backend gets the same financial capabilities &#x2014; the same questions
produce the same answers. The choice is deployment context, not functionality.</p><hr /></section></section><section><a id="MCP_Tool_Discovery"></a>
<h2>MCP Tool Discovery</h2>
<p>Axis2/Java exposes an MCP tool catalog at:</p>
<pre class="prettyprint"><code class="nohighlight nocode">GET https://localhost:8443/axis2-json-api/openapi-mcp.json
</code></pre>
<p>This endpoint returns the same tool schema structure that Claude Desktop
and other MCP clients consume. The catalog includes <code>doLogin</code>,
<code>portfolioVariance</code>, <code>monteCarlo</code>, and <code>scenarioAnalysis</code> &#x2014; each with full
input schemas, parameter types, constraints, and defaults. The three
financial tools are identical in capability to the Axis2/C MCP stdio server.</p><hr /></section><section><a id="Container.2FJDK_Testing_Matrix"></a>
<h2>Container/JDK Testing Matrix</h2>
<p>MCP bridge and OpenAPI endpoints need validation across all supported containers
and JDK versions before the 2.0.1 release:</p>
<table class="table table-striped">
<thead>
<tr class="a">
<th>Container</th>
<th>JDK</th>
<th>MCP Bridge</th>
<th>OpenAPI/Swagger UI</th>
<th>Status</th></tr></thead><tbody>
<tr class="b">
<td>WildFly 32</td>
<td>OpenJDK 21</td>
<td>&#x2705; Tested</td>
<td>&#x2705; Tested</td>
<td>Validated</td></tr>
<tr class="a">
<td>WildFly 39</td>
<td>OpenJDK 25</td>
<td>&#x2705; Tested</td>
<td>&#x2705; Tested</td>
<td>Validated</td></tr>
<tr class="b">
<td>Tomcat 11</td>
<td>OpenJDK 21</td>
<td>&#x2705; Tested</td>
<td>&#x2705; Tested</td>
<td>Validated</td></tr>
<tr class="a">
<td>Tomcat 11</td>
<td>OpenJDK 25</td>
<td>&#x2705; Tested</td>
<td>&#x2705; Tested</td>
<td>Validated</td></tr></tbody>
</table>
<p>All four container/JDK combinations negotiate HTTP/2 via ALPN over TLS.</p><hr /></section><section><a id="Build_and_Deploy"></a>
<h2>Build and Deploy</h2><section><a id="WildFly"></a>
<h3>WildFly</h3>
<p>Full build, deploy, and test instructions are in
<code>modules/samples/userguide/src/userguide/springbootdemo-wildfly/README.md</code>.
Quick start:</p>
<pre class="prettyprint"><code class="language-bash">cd modules/samples/userguide/src/userguide/springbootdemo-wildfly
mvn -Dmaven.test.skip.exec clean install
# Deploy exploded WAR to WildFly
rsync -a --delete target/deploy/axis2-json-api/ ~/wildfly/standalone/deployments/axis2-json-api.war/
touch ~/wildfly/standalone/deployments/axis2-json-api.war.dodeploy
</code></pre></section><section><a id="Tomcat_11"></a>
<h3>Tomcat 11</h3>
<p>Full build, deploy, and test instructions are in
<code>modules/samples/userguide/src/userguide/springbootdemo-tomcat11/README.md</code>.
Quick start:</p>
<pre class="prettyprint"><code class="language-bash">cd modules/samples/userguide/src/userguide/springbootdemo-tomcat11
mvn -Dmaven.test.skip.exec clean install
# Deploy exploded WAR to Tomcat
cp -r target/deploy/axis2-json-api /path/to/tomcat/webapps/
</code></pre></section><section><a id="Verify_all_endpoints_after_deploy"></a>
<h3>Verify all endpoints after deploy</h3>
<p><strong>Tomcat 11</strong> (HTTPS/HTTP2 on port 8443 with mTLS):</p>
<pre class="prettyprint"><code class="language-bash">CERTS=/path/to/axis-axis2-java-core/certs
CURL_MTLS=&quot;curl -s --http2 --cert $CERTS/client.crt --key $CERTS/client.key --cacert $CERTS/ca.crt&quot;
# OpenAPI and MCP (no auth required, but mTLS handshake still needed)
$CURL_MTLS https://localhost:8443/axis2-json-api/openapi.json
$CURL_MTLS https://localhost:8443/axis2-json-api/openapi.yaml
$CURL_MTLS https://localhost:8443/axis2-json-api/openapi-mcp.json
$CURL_MTLS https://localhost:8443/axis2-json-api/swagger-ui
# Login
TOKEN=$($CURL_MTLS -X POST https://localhost:8443/axis2-json-api/services/loginService \
-H 'Content-Type: application/json' \
-d '{&quot;doLogin&quot;:[{&quot;arg0&quot;:{&quot;email&quot;:&quot;java-dev@axis.apache.org&quot;,&quot;credentials&quot;:&quot;userguide&quot;}}]}' \
| python3 -c &quot;import sys,json; print(json.load(sys.stdin)['response']['token'])&quot;)
# Financial benchmark
$CURL_MTLS -X POST https://localhost:8443/axis2-json-api/services/FinancialBenchmarkService \
-H 'Content-Type: application/json' -H &quot;Authorization: Bearer $TOKEN&quot; \
-d '{&quot;portfolioVariance&quot;:[{&quot;arg0&quot;:{&quot;nAssets&quot;:2,&quot;weights&quot;:[0.6,0.4],&quot;covarianceMatrix&quot;:[[0.04,0.006],[0.006,0.09]]}}]}'
</code></pre>
<p><strong>WildFly 32/39</strong> (HTTPS/HTTP2 on port 8443 with self-signed cert, JWT auth):</p>
<pre class="prettyprint"><code class="language-bash"># OpenAPI and MCP
curl -s --http2 -k https://localhost:8443/axis2-json-api/openapi.json
curl -s --http2 -k https://localhost:8443/axis2-json-api/openapi-mcp.json
# Login + financial benchmark
TOKEN=$(curl -s --http2 -k https://localhost:8443/axis2-json-api/services/loginService \
-H 'Content-Type: application/json' \
-d '{&quot;doLogin&quot;:[{&quot;arg0&quot;:{&quot;email&quot;:&quot;java-dev@axis.apache.org&quot;,&quot;credentials&quot;:&quot;userguide&quot;}}]}' \
| python3 -c &quot;import sys,json; print(json.load(sys.stdin)['response']['token'])&quot;)
curl -s --http2 -k https://localhost:8443/axis2-json-api/services/FinancialBenchmarkService \
-H 'Content-Type: application/json' -H &quot;Authorization: Bearer $TOKEN&quot; \
-d '{&quot;portfolioVariance&quot;:[{&quot;arg0&quot;:{&quot;nAssets&quot;:2,&quot;weights&quot;:[0.6,0.4],&quot;covarianceMatrix&quot;:[[0.04,0.006],[0.006,0.09]]}}]}'
</code></pre>
<p>See the sample READMEs for the complete test flow covering all services.</p><hr /></section></section><section><a id="WildFly_Deployment_Notes"></a>
<h2>WildFly Deployment Notes</h2>
<p>See <code>WILDFLY32_DEPLOY_STATE.md</code> in the Axis2/C repo for the full deployment
walkthrough. Key points (apply to both WildFly 32 and WildFly 39):</p>
<ul>
<li>WildFly 32.0.1.Final or WildFly 39 with <code>--add-modules=java.se</code> in <code>standalone.conf</code></li>
<li><code>jboss-deployment-structure.xml</code> from production deployment template (includes <code>jdk.net</code> module dependency)</li>
<li><code>beans.xml</code> with <code>bean-discovery-mode=&quot;none&quot;</code> (satisfies Weld without CDI scanning)</li>
<li>Spring Boot 3.4.3 starts in ~0.9 seconds inside WildFly</li>
<li>WAR: <code>axis2-json-api-0.0.1-SNAPSHOT.war</code></li>
</ul></section></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>