What is an AS4 profile?
An AS4 profile is a set of constraints layered on top of the base AS4 specification. While AS4 defines the general message format and security framework, a profile narrows the choices — mandating specific signature algorithms, encryption strengths, party identifier formats, service/action values, and PMode defaults. Examples of constraints a profile can impose:- Which signing algorithm to use (e.g. RSA-SHA256 or ECDSA-SHA256)
- Whether encryption is required or optional
- The exact format of party identifiers (e.g.
iso6523-actorid-upis::0088:...) - Which SOAP version to use
- Whether receipts must be sent and how (synchronous or asynchronous)
IAS4Profile interface
All profiles implement theIAS4Profile interface:
Supported profiles
Peppol
Profile ID:
Module:
Used on the Pan-European Public Procurement Online (PEPPOL) network for electronic invoicing, ordering, and catalogue exchange.
peppolModule:
phase4-profile-peppolUsed on the Pan-European Public Procurement Online (PEPPOL) network for electronic invoicing, ordering, and catalogue exchange.
CEF eDelivery (four corner)
Profile ID:
Module:
European Commission Connecting Europe Facility four-corner model. Also used for EUDAMED.
cefModule:
phase4-profile-cefEuropean Commission Connecting Europe Facility four-corner model. Also used for EUDAMED.
CEF eDelivery (two corner)
Profile ID:
Module:
Variant of the CEF profile for two-party exchanges without intermediate access points.
cef-two-cornerModule:
phase4-profile-cefVariant of the CEF profile for two-party exchanges without intermediate access points.
BDEW
Profile ID:
Module:
German energy sector data exchange standard (Bundesverband der Energie- und Wasserwirtschaft).
bdewModule:
phase4-profile-bdewGerman energy sector data exchange standard (Bundesverband der Energie- und Wasserwirtschaft).
ENTSOG
Profile ID:
Module:
European Network of Transmission System Operators for Gas — cross-border gas transport data exchange.
entsogModule:
phase4-profile-entsogEuropean Network of Transmission System Operators for Gas — cross-border gas transport data exchange.
EuCTP Push
Profile ID:
Module:
EU Customs Trade Platform — push variant.
euctp-pushModule:
phase4-profile-euctpEU Customs Trade Platform — push variant.
EuCTP Pull
Profile ID:
Module:
EU Customs Trade Platform — pull variant.
euctp-pullModule:
phase4-profile-euctpEU Customs Trade Platform — pull variant.
DBNAlliance
Profile ID:
Module:
North American B2B document exchange network (Digital Business Networks Alliance).
dbnallianceModule:
phase4-profile-dbnallianceNorth American B2B document exchange network (Digital Business Networks Alliance).
HRE-Delivery
Profile ID:
Module:
HR electronic delivery profile.
hredeliveryModule:
phase4-profile-hredeliveryHR electronic delivery profile.
eDelivery AS4 2.0 EdDSA
Profile ID:
Module:
Next-generation eDelivery profile using EdDSA (Ed25519/Ed448) signatures and X25519 key agreement.
edelivery2-eddsa / edelivery2-eddsa-two-cornerModule:
phase4-profile-edelivery2Next-generation eDelivery profile using EdDSA (Ed25519/Ed448) signatures and X25519 key agreement.
eDelivery AS4 2.0 ECDSA
Profile ID:
Module:
Next-generation eDelivery profile using ECDSA signatures and ECDH-ES key agreement.
edelivery2-ecdsa / edelivery2-ecdsa-two-cornerModule:
phase4-profile-edelivery2Next-generation eDelivery profile using ECDSA signatures and ECDH-ES key agreement.
EUDAMED uses the CEF four-corner profile (
cef). The phase4-eudamed-client module provides EUDAMED-specific sender helpers on top of the CEF profile.Profile registration via SPI
Profiles are discovered at startup using the JavaServiceLoader mechanism (SPI). Each profile module places a META-INF/services/com.helger.phase4.profile.IAS4ProfileRegistrarSPI file on the classpath that points to its registrar class.
The AS4ProfileManager calls all discovered IAS4ProfileRegistrarSPI implementations during initialization:
Writing a custom profile registrar
If you need a custom profile, implementIAS4ProfileRegistrarSPI and register it:
Accessing profiles at runtime
Setting the default profile
phase4 reads the default profile ID from thephase4.default.profile configuration key. Set it in your application.properties or phase4.properties: