Skip to main content
The BDEW profile is used by German energy and water market participants for electronic data interchange. It is based on the AS4 standard and is tailored to the requirements of the German energy sector (BDEW – Bundesverband der Energie- und Wasserwirtschaft) as well as DVGW (gas and water) and BAHN (railway).

Maven Artifact

phase4-profile-bdew

Profile ID

bdew

Maven dependency

<dependency>
  <groupId>com.helger.phase4</groupId>
  <artifactId>phase4-profile-bdew</artifactId>
  <version>4.4.1-SNAPSHOT</version>
</dependency>

Overview

The BDEW AS4 profile covers multiple market process types within the German energy market:
Service constantURI
SERVICE_TESThttp://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/service
SERVICE_PATH_SWITCHhttps://www.bdew.de/as4/communication/services/pathSwitch
SERVICE_MARKTPROZESSEhttps://www.bdew.de/as4/communication/services/MP
SERVICE_FAHRPLANhttps://www.bdew.de/as4/communication/services/FP
SERVICE_REDISPATCH_2_0https://www.bdew.de/as4/communication/services/RD
SERVICE_KWEPhttps://www.bdew.de/as4/communication/services/KW
SERVICE_SOGLhttps://www.bdew.de/as4/communication/services/SO

PMode structure

The BDEW PMode uses one-way/push. The createBDEWPMode method requires both initiator and responder party type IDs in addition to the party ID values.
import com.helger.phase4.profile.bdew.BDEWPMode;
import com.helger.phase4.model.pmode.IPModeIDProvider;

// Create a PMode with GLN party type IDs
PMode pMode = BDEWPMode.createBDEWPMode(
    "initiator-gln-id",
    BDEWPMode.BDEW_PARTY_ID_TYPE_GLN,   // urn:oasis:names:tc:ebcore:partyid-type:iso6523:0088
    "responder-gln-id",
    BDEWPMode.BDEW_PARTY_ID_TYPE_GLN,
    "https://responder.example.com/as4",
    IPModeIDProvider.DEFAULT_DYNAMIC,
    true  // persist
);

Available party type ID constants

ConstantValue
BDEW_PARTY_ID_TYPE_GLNurn:oasis:names:tc:ebcore:partyid-type:iso6523:0088
BDEW_PARTY_ID_TYPE_BDEWurn:oasis:names:tc:ebcore:partyid-type:unregistered:BDEW
BDEW_PARTY_ID_TYPE_DVGWurn:oasis:names:tc:ebcore:partyid-type:unregistered:DVGW
BDEW_PARTY_ID_TYPE_BAHNurn:oasis:names:tc:ebcore:partyid-type:unregistered:BAHN

Service and action overload

Since v2.8.0 you can specify service and action values when creating a PMode:
PMode pMode = BDEWPMode.createBDEWPMode(
    "initiator-id",
    BDEWPMode.BDEW_PARTY_ID_TYPE_GLN,
    "responder-id",
    BDEWPMode.BDEW_PARTY_ID_TYPE_GLN,
    BDEWPMode.SERVICE_MARKTPROZESSE,
    BDEWPMode.ACTION_DEFAULT,
    "https://responder.example.com/as4",
    IPModeIDProvider.DEFAULT_DYNAMIC,
    true
);

Security requirements

The BDEW profile uses ECDSA signatures (unlike most other profiles that use RSA). This is mandated by BSI TR03116-3 section 9.1 and BDEW AS4 profile section 2.2.6.2.1.
BDEW requires ECDSA with the brainpoolP256r1 curve, not RSA. Using RSA will cause the compatibility validator to reject the PMode.
SettingRequired value
Signature algorithmECDSA_SHA_256 (http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256)
Signature hash functionSHA-256
Encryption algorithmAES-128-GCM
Minimum encryption strength128-bit
WSS version1.1.1
PModeAuthorizefalse
Receipt reply patternResponse
Non-repudiationtrue
Curve (key-level)brainpoolP256r1

Compression

The BDEW profile mandates GZIP compression. Unlike other profiles, generatePModePayloadSevice() is always included with GZIP:
// From BDEWPMode.generatePModePayloadSevice():
new PModePayloadService(EAS4CompressionMode.GZIP)

Agreement ID

https://www.bdew.de/as4/communication/agreement

Reception awareness

// From BDEWPMode.generatePModeReceptionAwareness():
// receptionAwareness = true
// retry = true
// maxRetries = 1
// retryIntervalMS = 10_000 (10 seconds)
// duplicateDetection = true

Helper methods

// Check if a given service URI is a valid BDEW service
boolean valid = BDEWPMode.containsService("https://www.bdew.de/as4/communication/services/MP");

// Check if a given action URI is a valid BDEW action
boolean validAction = BDEWPMode.containsAction(BDEWPMode.ACTION_DEFAULT);
The BDEW profile sets isInvokeSPIForPingMessage to true, meaning the custom SPI message handler will also be invoked for AS4 ping (test) messages, unlike other profiles.

Build docs developers (and LLMs) love