[
https://issues.apache.org/jira/browse/CAMEL-24391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18104600#comment-18104600
]
Omar Atie commented on CAMEL-24391:
-----------------------------------
h3. Intent to implement
_AI-generated comment on behalf of Omar Atie (atiaomar1978-hub)_
I would like to pick up this issue and implement camel-as4 in phases, building
on the recently merged camel-ubl data format (Preview, 4.23) which already uses
Philip Helger's ph-ubl stack.
h3. Investigation summary
* camel-ubl is on main and covers UBL 2.1 marshal/unmarshal (65 document types)
— good foundation for Peppol payloads
* camel-as2 exists as a reference B2B component (parent + api + component
modules) but AS2 (RFC4130/MIME) is a different protocol from AS4 (ebMS
3.0/SOAP/WS-Security) — a new component is appropriate, not an AS2 extension
* No existing AS4/ebMS/Peppol transport code in the repo today
* phase4 (https://github.com/phax/phase4) looks like the right integration
point — same author ecosystem as ph-ubl, with Peppol AS4 client/servlet and SMP
discovery artifacts (e.g. phase4-peppol-client, phase4-dynamic-discovery)
h3. Proposed phased implementation
*Phase 1 — AS4 transport (MVP)*
* New modules: camel-as4-parent → camel-as4-api + camel-as4-component (Preview)
* Wrap phase4 Peppol AS4 client for outbound send (producer)
* Inbound AS4 receive via servlet/HTTP adapter (consumer) — evaluate
phase4-peppol-servlet integration with Camel platform-http or undertow
* Keystore/certificate configuration with appropriate @UriParam security
annotations
* Unit tests + mocked HTTP; Peppol test-bed ITs as follow-up
*Phase 2 — SMP/SML discovery*
* Integrate phase4-dynamic-discovery (or equivalent SMP client)
* Resolve recipient access point URL + supported document types from
participant ID
* Expose as producer operation or URI options on send endpoint
*Phase 3 — Peppol BIS validation*
* Validate UBL payloads against Peppol BIS Billing 3.0 rules (Schematron/XSLT)
* Evaluate Helger validation artifacts vs camel-schematron with bundled rules
* Optional pre-send / post-receive validation step in routes
*Target end-to-end route:*
{code}
direct:invoice → bean (InvoiceType) → marshal().ubl()
→ (optional) validate Peppol BIS
→ as4 discovery lookup
→ as4 client send
{code}
h3. Questions before starting
# Should Phase 1 scope be Peppol profile only, or generic ebMS 3.0 AS4 as well?
# Preference for inbound AS4: embedded servlet (phase4 style) vs Camel HTTP
consumer adapter?
# OK to depend on phase4 (~4.5.x) in production code (unlike camel-as2 which
only uses phase2 in tests)?
# Any PMC preference on splitting into multiple PRs per phase?
If this approach looks reasonable, I will assign the ticket to myself and move
it to In Progress, then open a draft PR for Phase 1 spike/implementation.
Thanks,
Omar
> Add camel-as4 component for Peppol AS4 transport, validation, and SMP lookup
> ----------------------------------------------------------------------------
>
> Key: CAMEL-24391
> URL: https://issues.apache.org/jira/browse/CAMEL-24391
> Project: Camel
> Issue Type: New Feature
> Reporter: Claus Ibsen
> Priority: Major
> Fix For: 4.x
>
>
> Add a new camel-as4 component to provide Peppol AS4 transport support.
> Together with the new camel-ubl data format (added in 4.23), this would give
> Camel a complete Peppol e-Invoicing solution.
> The component should cover three areas:
> h3. 1. AS4 Transport
> Implement the AS4 (ebMS 3.0) messaging profile used by the Peppol eDelivery
> network. AS4 is the mandatory transport protocol for Peppol and is distinct
> from AS2 (which serves traditional EDI/supply-chain). AS4 uses
> SOAP/WS-Security for message exchange with signing, encryption, and receipt
> signals.
> h3. 2. Peppol BIS Validation
> Support for validating UBL documents against Peppol BIS (Business
> Interoperability Specifications) rules, e.g. Peppol BIS Billing 3.0 for
> invoices and credit notes. These are country-specific (CIUS) constraints on
> top of UBL 2.1 that Peppol requires.
> h3. 3. SMP/SML Lookup
> Support for Peppol SMP (Service Metadata Publisher) and SML (Service Metadata
> Locator) lookups to discover a recipient's access point URL and supported
> document types. This is needed to route messages to the correct Peppol access
> point.
> h3. Together with camel-ubl
> * camel-ubl: marshal/unmarshal UBL 2.1 documents (Invoice, CreditNote, Order,
> etc.)
> * camel-as4: transport (AS4), validation (Peppol BIS), and discovery (SMP/SML)
> h3. Libraries to evaluate
> [phase4|https://github.com/phax/phase4] by Philip Helger (same author as
> ph-ubl used by camel-ubl), which provides a Peppol AS4 implementation and SMP
> client.
> Peppol e-Invoicing is becoming increasingly important as more countries
> mandate electronic invoicing, making this a strategic addition to Camel's B2B
> integration capabilities.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)