Skip to main content
Package: com.helger.phase4.entsog
Maven artifact: com.helger.phase4:phase4-entsog-client
Phase4ENTSOGSender sends AS4 messages conforming to the ENTSOG profile used by European natural gas transmission system operators. The builder applies ENTSOG-specific defaults automatically.

Factory method

Phase4ENTSOGSender.ENTSOGUserMessageBuilder builder = Phase4ENTSOGSender.builder();

Default settings applied by the builder

SettingValue
AS4 profileentsog
Key identifier type (sign & crypt)ISSUER_SERIAL
Conversation ID"" (empty, must not be changed)

ENTSOGUserMessageBuilder fields

Required fields

body.fromPartyID
String
required
The sender AS4 party ID value.
body.fromRole
String
required
The sender role.
body.toPartyID
String
required
The receiver AS4 party ID value.
body.toRole
String
required
The receiver role.
body.endpointURL
String
required
The destination AS4 endpoint URL.
body.payload(AS4OutgoingAttachment.Builder, ENTSOGPayloadParams)
AS4OutgoingAttachment.Builder
required
Set the payload. GZip compression is automatically applied. Pass ENTSOGPayloadParams to set EDIG@S payload type metadata.

Crypto overrides

body.encryptionKeyIdentifierType
ECryptoKeyIdentifierType
Override the default encryption key identifier type (ISSUER_SERIAL).
body.signingKeyIdentifierType
ECryptoKeyIdentifierType
Override the default signing key identifier type (ISSUER_SERIAL). Since 2.2.2.

ENTSOGPayloadParams

Optional ENTSOG-specific parameters for the MIME part.
body.setDocumentType
String
The EDIG@S document type code (e.g. "01G" for EDIG@S Nomination). Set as EDIGASDocumentType MIME part property.

Example

import com.helger.phase4.entsog.Phase4ENTSOGSender;
import com.helger.phase4.attachment.AS4OutgoingAttachment;

Phase4ENTSOGSender.ENTSOGPayloadParams payloadParams =
    new Phase4ENTSOGSender.ENTSOGPayloadParams();
payloadParams.setDocumentType("01G"); // EDIG@S Nomination

EAS4UserMessageSendResult result = Phase4ENTSOGSender.builder()
    .cryptoFactorySign(cryptoFactory)
    .cryptoFactoryCrypt(cryptoFactory)
    .fromPartyID("21X-EU-A-A0A0A-A")
    .fromRole("http://entsog.eu/as4/routing/AS4RoleShipper")
    .toPartyID("21X-EU-B-B0B0B-B")
    .toRole("http://entsog.eu/as4/routing/AS4RoleOperator")
    .endpointURL("https://tso-receiver.example.com/as4")
    .receiverCertificate(receiverCert)
    .service("http://entsog.eu/as4/routing/noService")
    .action("http://entsog.eu/as4/routing/noAction")
    .payload(
        AS4OutgoingAttachment.builder()
            .data(ediGasMessageBytes)
            .mimeTypeXML(),
        payloadParams
    )
    .sendMessageAndCheckForReceipt();

Build docs developers (and LLMs) love