What is phase4?
phase4 is an open-source Java library that implements the AS4 messaging protocol (OASIS ebMS 3.0 AS4 Profile). It is designed to be embedded directly into existing Java applications, giving you full control over AS4 message exchange without requiring a standalone middleware server. AS4 is the protocol of choice for many B2B and government e-delivery networks including:- Peppol — European procurement and invoicing network (OpenPeppol)
- CEF eDelivery — European Commission Connecting Europe Facility
- BDEW — German energy sector data exchange
- ENTSOG — European Network of Transmission System Operators for Gas
- EUDAMED — EU Medical Devices database
- DBNAlliance — North American B2B document exchange
- HRE-Delivery — HR electronic delivery
Quickstart
Send your first AS4 message in minutes
Installation
Add phase4 to your Maven or Gradle project
Core Concepts
Understand AS4, PModes, and messaging profiles
Peppol Integration
Send Peppol-compliant documents with dynamic SMP discovery
Key features
Multi-profile support
Peppol, CEF, BDEW, ENTSOG, EUDAMED, EuCTP, DBNAlliance, and HRE-Delivery profiles built-in
Send and receive
Full AS4 client and server capabilities — send user messages and receive via servlet
WS-Security
WSS4J-based signing and encryption with flexible key store configuration
Dynamic discovery
Automatic SMP/SML endpoint lookup for Peppol, BDXR, and BDXR2 networks
Builder pattern API
Fluent Java builder API for constructing and sending AS4 messages
PMode management
In-memory and XML-persistent PMode management with full validation
Architecture overview
phase4 is structured as a multi-module Maven project:| Module | Purpose |
|---|---|
phase4-lib | Core AS4 library — sender, receiver, crypto, PMode |
phase4-profile-peppol | Peppol AS4 profile definitions and validators |
phase4-profile-cef | CEF eDelivery profile (also used by EUDAMED) |
phase4-profile-bdew | BDEW energy sector profile |
phase4-profile-entsog | ENTSOG gas network profile |
phase4-profile-dbnalliance | DBNAlliance North American B2B profile |
phase4-profile-edelivery2 | eDelivery AS4 2.0 profile (EdDSA/ECDSA variants) |
phase4-peppol-client | High-level Peppol sender (Phase4PeppolSender) |
phase4-cef-client | High-level CEF sender (Phase4CEFSender) |
phase4-bdew-client | High-level BDEW sender (Phase4BDEWSender) |
phase4-eudamed-client | High-level EUDAMED sender (Phase4EudamedSender) |
phase4-peppol-servlet | Peppol AS4 receiving servlet |
phase4-peppol-server-webapp | Example Peppol server web application |
phase4-dynamic-discovery | SMP/BDXR dynamic endpoint discovery |
Maven coordinates
The core library is published to Maven Central under thecom.helger.phase4 group ID:
pom.xml