davsclaus opened a new pull request, #145:
URL: https://github.com/apache/camel-jbang-examples/pull/145
_Claude Code on behalf of Claus Ibsen_
Closes #144
Two WSDL-first examples with the shop's orders, in `contracts/` next to
`openapi-server` and `openapi-client`. They follow the update on #144:
`bodyFormat: json` on both Kamelets, so no XML is mapped by hand.
- **`contracts/soap-facade`:** `soap-source` serves the shop's order service
from `orders.wsdl` at `/services/orders`, so old SOAP clients keep calling
`getOrder`. The route answers each call from the JSON order API
(`orders-api.camel.yaml`, in the same example) and maps the answer with `jq`.
An unknown order gets the fault that the WSDL declares, `orderNotFound`:
`SoapFault` and `SoapFaultCode` as headers, and the detail as the body.
- **`contracts/soap-client`:** `soap-action` calls `getOrder` once for each
order with `bodyFormat: json`, and the route logs each order's status. With
`faultAsBody: true`, the fault for an order the service does not have reaches
the route and doesn't fail the message. The old order service is a
`soap-source` route in the same example, so no external SOAP server is needed.
Each has a Citrus YAML test (`camel test run test/<name>.citrus.it.yaml`),
and both are added to the CI matrix. The READMEs have "Good to know" as listed
on #144, "Build it step by step" starting with `camel generate wsdl orders.wsdl
--samples`, and WS-Security and SOAP 1.2 under "Try changing". Also:
- The keycloak example moves to order 6.
- The contracts group intro mentions SOAP.
- `generate-catalog.sh` has been rerun.
## Draft until Camel 4.24.0
The Kamelets are new in camel-kamelets 4.24.0. The CI runs `CAMEL_VERSION:
4.23.0`, whose default Kamelets (4.23.0) don't have them, so the two new CI
jobs fail until that is moved to 4.24.0.
## Checked locally
On Camel 4.24.0-SNAPSHOT (main at 919988ef4c32), with
`--kamelets-version=4.24.0-SNAPSHOT` (in the Citrus tests: `kameletsVersion`,
in a scratch copy only):
- Both Citrus tests pass.
- `camel run *` gives the log lines and SOAP answers shown in the READMEs.
- The "Try changing" items that I ran give what the READMEs say:
- a request with `<orderNo>` gets a schema-validation fault naming
`<orderId>`;
- an order API that is down gives `Exchange processing failed`;
- WS-Security with the right password works, and a wrong password gets `A
security error was encountered when verifying the message`.
SOAP 1.2 was not run here; the camel-kamelets test
`soap-soap12.citrus.it.yaml` covers it.
Seen while building, for the Kamelets, not changed here: at startup CXF logs
three WARN lines ("The endpoint/port name of ... is empty, cxf will try to load
the first one in wsdl for you", and the same for the service name). The Kamelet
docs say `serviceName` and `portName` are only needed when the WSDL has more
than one, so a user who follows them still sees WARN lines on every start.
🤖 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]