OpenPeppol AS4 profile for sending and receiving business documents across the Peppol network using phase4.
The Peppol profile implements the OpenPeppol AS4 profile specification, which defines the mandatory security settings and message exchange patterns for Access Points (AP) in the Peppol network.
Communication between C2 and C3 uses AS4 with the Peppol profile. The profile enforces one-way/push messaging: the initiator sends a business document and the responder returns only an AS4 receipt.
Every Peppol user message must carry two mandatory EBMS message properties:
originalSender – the C1 party identifier (e.g. Peppol participant ID)
finalRecipient – the C4 party identifier (e.g. Peppol participant ID)
// These are checked by PeppolCompatibilityValidator.validateUserMessage(...)// Example values:// originalSender: "iso6523-actorid-upis::0088:5060001000002"// finalRecipient: "iso6523-actorid-upis::0088:5060001000008"
Phase4PeppolHttpClientSettings extends HttpClientSettings with Peppol-specific defaults:
Setting
Value
TLS version
TLS 1.2
Connection request timeout
1 second
Connect timeout
5 seconds
Response timeout
2 minutes (per Peppol SLA)
User-Agent
phase4/{version} https://github.com/phax/phase4
import com.helger.phase4.profile.peppol.Phase4PeppolHttpClientSettings;Phase4PeppolHttpClientSettings httpSettings = new Phase4PeppolHttpClientSettings();// Use with your HTTP client builder:// AS4ClientUserMessage.builder()// .httpClientSettings(httpSettings)// ...
Phase4PeppolHttpClientSettings trusts all TLS certificates. In production you should configure proper trust anchors using Peppol’s PKI.
Endpoint URLs are typically discovered at runtime via the Peppol SMP/SML infrastructure and passed dynamically to createPeppolPMode(...) as the sAddress parameter.