davsclaus opened a new pull request, #30616: URL: https://github.com/apache/camel/pull/30616
Fixes CAMEL-27396. **Stacked on #30614 (CAMEL-27397)**: this PR targets its branch and will be retargeted to `main` once #30614 is merged. Only the last three commits belong here. An MCP tool for `camel generate wsdl` (CAMEL-27376), and a TUI view of a WSDL. ## camel-jbang-wsdl: a module of its own (commit 1) Claus chose a new small module rather than camel-jbang-core. - `WsdlModel`, `WsdlRouteScaffold` and `WsdlSamples` move from `camel-jbang-plugin-generate` (package-private) to the new `dsl/camel-jbang/camel-jbang-wsdl` (public, package `org.apache.camel.dsl.jbang.wsdl`). Its only dependencies are camel-xsd-json and snakeyaml. - With that, the MCP server and the TUI use the code without the generate plugin and its openapi-generator. - New `WsdlModel.parse(byte[])` reads a WSDL given as content and follows no `wsdl:import` (each one is a warning). - The module is registered in `dsl/camel-jbang/pom.xml`, the parent and camel-bom. The `WsdlModel` unit tests moved along (`WsdlModelTest`), with new tests for the content mode. ## camel-jbang-mcp: `camel_wsdl_inspect` and `camel_wsdl_scaffold` (commit 2) - Like the OpenAPI tools, they take the WSDL as content, so they read no file and call no host. A `wsdl:import` is listed as a warning, and an `xs:import` of the schema is refused, so its elements have no samples. Both are read-only and `openWorldHint = false`. - `camel_wsdl_inspect`: services, ports (SOAP version, address with the user info masked, and the cxf endpoint options), and operations (SOAP action, request, response and faults). With `samples=true` it adds the sample messages from `WsdlSamples`. - `camel_wsdl_scaffold`: a consumer or producer route for one port, with `wsdlUrl` (default `classpath:service.wsdl`) and the service, port and operation choices. - Docs: `camel-jbang-mcp.adoc` (example prompts and a tool table). ## TUI: the WSDL of a cxf endpoint (commit 3) - In the Endpoints tab, `w` on a `cxf` endpoint with a `wsdlURL` shows its WSDL in the bottom panel, in place of the endpoint documentation. A WSDL sub-view sits next to Chart and Detail, and the footer gets a `w` hint. The panel lists the services and ports with the SOAP version and address, and a table of operations with their request, response and fault elements, ending with the `camel generate wsdl ... --samples` command. - A `file:` or `classpath:` WSDL is looked up in the folder of the integration and its `src/main/resources`. An `http(s)` URL is read with `WsdlModel.load` (imports only from its host, a redirect only to the same scheme, host and port). - It is read once and cached, on a thread of its own, so a slow server does not block the screen. Values from the WSDL are made printable and cannot break the markdown table. - The help text of the Endpoints tab is updated. ## Tests - camel-jbang-wsdl: `WsdlModelTest` (4). - camel-jbang-plugin-generate: `CodeWsdlGeneratorTest` (32) on the moved classes. - camel-jbang-mcp: `WsdlToolsTest` (6). The whole module (493 tests) passes; the one flake was an OpenAPI rest-openapi test that timed out at 30 s and passed on rerun. - camel-jbang-plugin-tui: `WsdlViewTest` (4) and `EndpointsTabRenderTest` (`w` on a cxf endpoint renders the WSDL panel; nothing for another endpoint). The whole module (2679 tests, including `SourceSizeTest`) passes. - The launcher distribution builds, and now ships camel-jbang-wsdl, camel-xsd-json and xmlschema-core (about 330 KB) through the TUI plugin. _Claude Code on behalf of Claus Ibsen_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
