Skip to content

Commit ef24536

Browse files
Clean up MCP/OpenAPI docs for 2.0.1 release; fix XML parse bug
- Fix unescaped '<' in BigDataH2Service services.xml mcpInputSchema ("<10MB" broke XML parsing on all containers) - Replace generic placeholder service example with FinancialBenchmarkService in json-rpc-mcp-guide.xml - Update inputSchema status from "not implemented" to "implemented" (mcpInputSchema in services.xml has been working since April) - Convert all curl examples to HTTPS/HTTP2 on port 8443 (Tomcat mTLS, WildFly self-signed cert, both ALPN h2 verified) - Add container/JDK testing matrix (WildFly 32/39, Tomcat 11, OpenJDK 21/25 — all validated) - Inline full test flow in WildFly README (was cross-ref to Tomcat) - Add quick-start build/deploy/test instructions to mcp-examples.md - Reference sample READMEs from main docs (mcp-architecture.md, json-rpc-mcp-guide.xml) for discoverability - Remove stale Axis2/C next-steps (C1 complete, code committed) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1fcb977 commit ef24536

6 files changed

Lines changed: 258 additions & 58 deletions

File tree

modules/samples/userguide/src/userguide/springbootdemo-tomcat11/README.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,30 @@ reason. Do not rename the directory before copying to `webapps/`.
8181

8282
## Test flow
8383

84-
### 1. Verify OpenAPI docs
84+
All tests use **HTTPS/HTTP2 on port 8443** with mTLS client certificates. The Tomcat connector
85+
requires `certificateVerification="required"` — plain HTTP is not available.
86+
87+
Set up the cert variables first:
88+
89+
```bash
90+
CERTS=/path/to/axis-axis2-java-core/certs
91+
CURL_MTLS="curl -s --http2 --cert $CERTS/client.crt --key $CERTS/client.key --cacert $CERTS/ca.crt"
92+
```
93+
94+
### 1. Verify OpenAPI and MCP endpoints
8595

8696
```bash
87-
curl http://localhost:8080/axis2-json-api/openapi.json
88-
curl http://localhost:8080/axis2-json-api/openapi.yaml
97+
$CURL_MTLS https://localhost:8443/axis2-json-api/openapi.json
98+
$CURL_MTLS https://localhost:8443/axis2-json-api/openapi.yaml
99+
$CURL_MTLS https://localhost:8443/axis2-json-api/openapi-mcp.json
89100
# Interactive UI:
90-
curl http://localhost:8080/axis2-json-api/swagger-ui
101+
$CURL_MTLS https://localhost:8443/axis2-json-api/swagger-ui
91102
```
92103

93104
### 2. Login (get Bearer token)
94105

95106
```bash
96-
curl -s -X POST http://localhost:8080/axis2-json-api/services/loginService \
107+
$CURL_MTLS -X POST https://localhost:8443/axis2-json-api/services/loginService \
97108
-H 'Content-Type: application/json' \
98109
-d '{"doLogin":[{"arg0":{"email":"java-dev@axis.apache.org","credentials":"userguide"}}]}'
99110
```
@@ -107,19 +118,19 @@ characters).
107118

108119
```bash
109120
TOKEN="<token from step 2>"
110-
curl -s -X POST http://localhost:8080/axis2-json-api/services/testws \
121+
$CURL_MTLS -X POST https://localhost:8443/axis2-json-api/services/testws \
111122
-H 'Content-Type: application/json' \
112123
-H "Authorization: Bearer $TOKEN" \
113124
-d '{"doTestws":[{"arg0":{"messagein":"hello world"}}]}'
114125
```
115126

116127
### 4. Call BigData service
117128

118-
`datasetSize` is in bytes. Size determines processing path: <10 MB → standard,
129+
`datasetSize` is in bytes. Size determines processing path: under 10 MB → standard,
119130
10–50 MB → multiplexing, >50 MB → streaming. Use at least 1 000 000 to get populated results.
120131

121132
```bash
122-
curl -s -X POST http://localhost:8080/axis2-json-api/services/BigDataH2Service \
133+
$CURL_MTLS -X POST https://localhost:8443/axis2-json-api/services/BigDataH2Service \
123134
-H 'Content-Type: application/json' \
124135
-H "Authorization: Bearer $TOKEN" \
125136
-d '{"processBigDataSet":[{"arg0":{"datasetId":"test-001","datasetSize":1000000,"processingMode":"streaming","enableMemoryOptimization":true,"analyticsType":"summary"}}]}'
@@ -132,19 +143,19 @@ Response includes `processedRecordCount`, `http2Optimized`, `memoryOptimized`, a
132143

133144
```bash
134145
# Portfolio variance — O(n²) covariance matrix
135-
curl -s -X POST http://localhost:8080/axis2-json-api/services/FinancialBenchmarkService \
146+
$CURL_MTLS -X POST https://localhost:8443/axis2-json-api/services/FinancialBenchmarkService \
136147
-H 'Content-Type: application/json' \
137148
-H "Authorization: Bearer $TOKEN" \
138149
-d '{"portfolioVariance":[{"arg0":{"nAssets":2,"weights":[0.6,0.4],"covarianceMatrix":[[0.04,0.006],[0.006,0.09]],"normalizeWeights":false,"nPeriodsPerYear":252}}]}'
139150

140151
# Monte Carlo VaR — GBM simulation
141-
curl -s -X POST http://localhost:8080/axis2-json-api/services/FinancialBenchmarkService \
152+
$CURL_MTLS -X POST https://localhost:8443/axis2-json-api/services/FinancialBenchmarkService \
142153
-H 'Content-Type: application/json' \
143154
-H "Authorization: Bearer $TOKEN" \
144155
-d '{"monteCarlo":[{"arg0":{"nSimulations":10000,"nPeriods":252,"initialValue":100.0,"expectedReturn":0.08,"volatility":0.20,"nPeriodsPerYear":252,"randomSeed":42}}]}'
145156

146157
# Scenario analysis — probability-weighted expected return
147-
curl -s -X POST http://localhost:8080/axis2-json-api/services/FinancialBenchmarkService \
158+
$CURL_MTLS -X POST https://localhost:8443/axis2-json-api/services/FinancialBenchmarkService \
148159
-H 'Content-Type: application/json' \
149160
-H "Authorization: Bearer $TOKEN" \
150161
-d '{"scenarioAnalysis":[{"arg0":{"assets":[{"assetId":1,"currentPrice":100.0,"positionSize":100,"scenarios":[{"price":120.0,"probability":0.3},{"price":100.0,"probability":0.5},{"price":75.0,"probability":0.2}]}],"useHashLookup":true,"probTolerance":0.001}}]}'

modules/samples/userguide/src/userguide/springbootdemo-tomcat11/resources-axis2/bigdata_h2_resources/services.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"required": ["datasetId", "datasetSize"],
8282
"properties": {
8383
"datasetId": {"type": "string", "description": "Unique dataset identifier for tracking"},
84-
"datasetSize": {"type": "integer", "description": "Dataset size in bytes (determines processing mode: streaming for 50MB+, multiplexing for 10-50MB, standard for <10MB)"}
84+
"datasetSize": {"type": "integer", "description": "Dataset size in bytes (determines processing mode: streaming for 50MB+, multiplexing for 10-50MB, standard for under 10MB)"}
8585
}
8686
}</parameter>
8787

modules/samples/userguide/src/userguide/springbootdemo-wildfly/README.md

Lines changed: 74 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
Axis2 JSON-RPC services deployed as a WAR in **WildFly** (Undertow), using Spring Boot 3.x as
2323
a configuration framework only — there is no embedded container.
2424

25-
Tested with: **WildFly 39.0.1.Final** · **OpenJDK 25** · **Spring Boot 3.4.3**
25+
Tested with: **WildFly 32.0.1.Final** (OpenJDK 21) · **WildFly 39.0.1.Final** (OpenJDK 25) · **Spring Boot 3.4.3**
2626

2727
All Java source is shared from `../springbootdemo-tomcat11/src/main/java` via
2828
`build-helper-maven-plugin`. This module only adds WildFly-specific WEB-INF descriptors.
@@ -146,7 +146,77 @@ retried by a new WildFly instance — it must be removed.
146146

147147
## Test flow
148148

149-
See `../springbootdemo-tomcat11/README.md` for the full curl-based test sequence; it applies
150-
identically to WildFly (same context path, same JSON-RPC format, same credentials).
149+
All tests use **HTTPS/HTTP2 on port 8443**. WildFly uses a self-signed certificate
150+
(`generate-self-signed-certificate-host="localhost"`), so `-k` is needed to skip
151+
certificate verification.
151152

152-
The only difference: use port `8080` on WildFly (same default as Tomcat 11).
153+
```bash
154+
CURL_H2="curl -s --http2 -k"
155+
```
156+
157+
### 1. Verify OpenAPI and MCP endpoints
158+
159+
```bash
160+
$CURL_H2 https://localhost:8443/axis2-json-api/openapi.json
161+
$CURL_H2 https://localhost:8443/axis2-json-api/openapi.yaml
162+
$CURL_H2 https://localhost:8443/axis2-json-api/openapi-mcp.json
163+
# Interactive UI:
164+
$CURL_H2 https://localhost:8443/axis2-json-api/swagger-ui
165+
```
166+
167+
### 2. Login (get Bearer token)
168+
169+
```bash
170+
$CURL_H2 -X POST https://localhost:8443/axis2-json-api/services/loginService \
171+
-H 'Content-Type: application/json' \
172+
-d '{"doLogin":[{"arg0":{"email":"java-dev@axis.apache.org","credentials":"userguide"}}]}'
173+
```
174+
175+
Response: `{"response":{"token":"<TOKEN>","uuid":"<UUID>","status":"OK"}}`
176+
177+
### 3. Call protected service (testws)
178+
179+
`messagein` must pass ESAPI `SafeString` validation (`[A-Za-z0-9.,\-_ ]*` — no `+` or special
180+
characters).
181+
182+
```bash
183+
TOKEN="<token from step 2>"
184+
$CURL_H2 -X POST https://localhost:8443/axis2-json-api/services/testws \
185+
-H 'Content-Type: application/json' \
186+
-H "Authorization: Bearer $TOKEN" \
187+
-d '{"doTestws":[{"arg0":{"messagein":"hello world"}}]}'
188+
```
189+
190+
### 4. Call BigData service
191+
192+
`datasetSize` is in bytes. Size determines processing path: under 10 MB → standard,
193+
10–50 MB → multiplexing, >50 MB → streaming. Use at least 1 000 000 to get populated results.
194+
195+
```bash
196+
$CURL_H2 -X POST https://localhost:8443/axis2-json-api/services/BigDataH2Service \
197+
-H 'Content-Type: application/json' \
198+
-H "Authorization: Bearer $TOKEN" \
199+
-d '{"processBigDataSet":[{"arg0":{"datasetId":"test-001","datasetSize":1000000,"processingMode":"streaming","enableMemoryOptimization":true,"analyticsType":"summary"}}]}'
200+
```
201+
202+
### 5. Financial Benchmark Service
203+
204+
```bash
205+
# Portfolio variance — O(n²) covariance matrix
206+
$CURL_H2 -X POST https://localhost:8443/axis2-json-api/services/FinancialBenchmarkService \
207+
-H 'Content-Type: application/json' \
208+
-H "Authorization: Bearer $TOKEN" \
209+
-d '{"portfolioVariance":[{"arg0":{"nAssets":2,"weights":[0.6,0.4],"covarianceMatrix":[[0.04,0.006],[0.006,0.09]],"normalizeWeights":false,"nPeriodsPerYear":252}}]}'
210+
211+
# Monte Carlo VaR — GBM simulation
212+
$CURL_H2 -X POST https://localhost:8443/axis2-json-api/services/FinancialBenchmarkService \
213+
-H 'Content-Type: application/json' \
214+
-H "Authorization: Bearer $TOKEN" \
215+
-d '{"monteCarlo":[{"arg0":{"nSimulations":10000,"nPeriods":252,"initialValue":100.0,"expectedReturn":0.08,"volatility":0.20,"nPeriodsPerYear":252,"randomSeed":42}}]}'
216+
217+
# Scenario analysis — probability-weighted expected return
218+
$CURL_H2 -X POST https://localhost:8443/axis2-json-api/services/FinancialBenchmarkService \
219+
-H 'Content-Type: application/json' \
220+
-H "Authorization: Bearer $TOKEN" \
221+
-d '{"scenarioAnalysis":[{"arg0":{"assets":[{"assetId":1,"currentPrice":100.0,"positionSize":100,"scenarios":[{"price":120.0,"probability":0.3},{"price":100.0,"probability":0.5},{"price":75.0,"probability":0.2}]}],"useHashLookup":true,"probTolerance":0.001}}]}'
222+
```

src/site/markdown/docs/mcp-architecture.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,16 @@ modelcontextprotocol.io.
3232

3333
### Reference implementations
3434

35+
Build, deploy, and test instructions for each container are in the sample READMEs:
36+
- **Tomcat 11**: `modules/samples/userguide/src/userguide/springbootdemo-tomcat11/README.md`
37+
- **WildFly 32/39**: `modules/samples/userguide/src/userguide/springbootdemo-wildfly/README.md`
38+
3539
```
3640
springbootdemo-tomcat11 base URL: https://localhost:8443/axis2-json-api
3741
- LoginService (auth, port 8080 only)
3842
- BigDataH2Service (streaming/multiplexing demo, accessible via mTLS on 8443)
3943
40-
springbootdemo-wildfly base URL: http://localhost:8080/axis2-json-api
44+
springbootdemo-wildfly base URL: https://localhost:8443/axis2-json-api
4145
- LoginService (JWT auth)
4246
- FinancialBenchmarkService (portfolioVariance, monteCarlo VaR, scenarioAnalysis)
4347
- BigDataH2Service (HTTP/2 streaming)
@@ -330,12 +334,6 @@ opt-in per-operation.
330334

331335
## Next Steps
332336

333-
### C1 — complete ✅
334-
335-
`finbench_mcp.c` + `finbench_mcp_main.c` committed to `axis-axis2-c-core`.
336-
Builds with `build_financial_service.sh`; installs to `/usr/local/axis2c/bin/financial-benchmark-mcp`.
337-
See `docs/MCP.md` in the `axis-axis2-c-core` repo for the full C implementation plan.
338-
339337
### Track A remaining
340338

341339
| Step | Work | Notes |
@@ -349,11 +347,16 @@ See `docs/MCP.md` in the `axis-axis2-c-core` repo for the full C implementation
349347
2. stdio transport first (B1) — validates JSON-RPC 2.0 ↔ MessageContext translation
350348
3. HTTP/SSE transport (B2) — reuses Axis2 HTTP infrastructure
351349

352-
### Axis2/C deployment
350+
### Testing matrix
351+
352+
MCP and OpenAPI support needs validation across the full container/JDK matrix:
353353

354-
`build_financial_service.sh` in `axis-axis2-c-core` needs to be run on the target
355-
host after Axis2/C is installed. The service is committed and compiles clean — the
356-
script is the only remaining deployment step.
354+
| Container | JDK | MCP | OpenAPI | Status |
355+
|-----------|-----|-----|---------|--------|
356+
| WildFly 32 | OpenJDK 21 ||| Validated |
357+
| WildFly 39 | OpenJDK 25 ||| Validated |
358+
| Tomcat 11 | OpenJDK 21 ||| Validated |
359+
| Tomcat 11 | OpenJDK 25 ||| Validated |
357360

358361
---
359362

0 commit comments

Comments
 (0)