Domibus PMode Configuration for EMSWe RIM / AS4 Messaging

Sender-side (C2) example and configuration checklist

Implementation example
This page explains the main parts of a sender-side Domibus pmode.xml used for EMSWe RIM / AS4 messaging. The example is a template, not a production-ready bilateral agreement. Replace all sender-, receiver-, endpoint-, certificate-, retention-, and environment-specific values with the values agreed during onboarding.

1. Scope and message directions

The PMode configures the sender's Domibus Access Point, the C2 corner in the four-corner model. It defines who can communicate, which service and actions are accepted, which security and reliability policies are used, and how payloads are represented.

Request

C2 → C3

emswe-formality-request

The sender Access Point transmits an EMSWe formality to the Member State RIM.

Response

C3 → C2

emswe-formality-response

The Member State RIM sends the corresponding technical or business response back to the sender Access Point.

Do not copy environment values blindly. Party identifiers, endpoints, certificates and security policy aliases must match the bilateral configuration agreed with the receiving Member State.

2. Before importing the PMode

Prepare and verify the following information before creating the final file:

3. Finland (C3) environment configuration

The Finnish Maritime National Single Window (MNSW) RIM Access Point uses a different C3 party name, party identifier and endpoint in each environment. Configure the C3 party using exactly one row from the table below.

EnvironmentParty name and Party IDAS4 MSH endpoint
Development (DEV)mnsw-dev.mnsw.fihttps://rim.mnsw-dev.mnsw.fi/domibus/services/msh
Staging (STG)mnsw-stg.mnsw.fihttps://rim.mnsw-stg.mnsw.fi/domibus/services/msh
Production (PRD)mnsw.mnsw.fihttps://rim.mnsw.mnsw.fi/domibus/services/msh
Use matching values. The party name, nested partyId and endpoint must all belong to the same environment. Do not mix DEV, STG and PRD values in one party definition.

Development example

DEV C3 party
<party name="mnsw-dev.mnsw.fi"
       endpoint="https://rim.mnsw-dev.mnsw.fi/domibus/services/msh">
    <identifier partyId="mnsw-dev.mnsw.fi" partyIdType="rimParty"/>
</party>

Staging example

STG C3 party
<party name="mnsw-stg.mnsw.fi"
       endpoint="https://rim.mnsw-stg.mnsw.fi/domibus/services/msh">
    <identifier partyId="mnsw-stg.mnsw.fi" partyIdType="rimParty"/>
</party>

Production example

PRD C3 party
<party name="mnsw.mnsw.fi"
       endpoint="https://rim.mnsw.mnsw.fi/domibus/services/msh">
    <identifier partyId="mnsw.mnsw.fi" partyIdType="rimParty"/>
</party>

4. Configuration map

SectionPurposeRIM-specific consideration
rolesDefines ebMS initiator and responder roles.Use the standard ebMS 3.0 initiator and responder URI values.
partiesDefines C2 and C3 party identifiers and endpoints.Both parties are listed because the same process supports request and response directions.
mepsDefines the message exchange pattern and binding.The example uses one-way push legs for each direction.
propertiesDefines required ebMS message properties.originalSender and finalRecipient are required by the eDelivery-style property set.
payloadProfilesConstrains payload parts, MIME types and total size.Confirm the payload MIME type and maximum size against the actual RIM integration contract.
securitiesSelects the Domibus WS-Security policy.The alias must exist in the installed Domibus configuration and match the bilateral certificate setup.
servicesDefines the EMSWe RIM messaging service.Use rim-messaging-service and the agreed service type.
actionsDefines request and response message actions.Request: emswe-formality-request; response: emswe-formality-response.
legConfigurationsBinds service, action, security, reliability, MPC and error handling.One leg is defined for each direction.
processCombines parties, roles, MEP, binding and legs.C2 and C3 appear as both possible initiators and responders so that both directional legs can be resolved.
mpcsControls the message partition channel and retention.Retention values are operational settings and must be reviewed before production use.

5. Complete sender-side (C2) example

The following example uses senderap as the sender C2 party and the Finnish MNSW development RIM as the receiver C3 party. Replace the sender values with the values assigned to your Access Point. For STG or PRD, replace all three C3 environment values consistently using the table above.

pmode.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:configuration xmlns:ns2="http://domibus.eu/configuration" party="senderap">
    <businessProcesses>
        <roles>
            <role name="senderRole" value="http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/initiator"/>
            <role name="recipientRole" value="http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/responder"/>
        </roles>
        <parties>
            <partyIdTypes>
                <partyIdType name="rimParty" value="urn:oasis:names:tc:ebcore:partyid-type:unregistered"/>
            </partyIdTypes>

            <party name="senderap" endpoint="https://localhost:8444/domibus/services/msh">
                <identifier partyId="senderap" partyIdType="rimParty"/>
            </party>
            <party name="mnsw-dev.mnsw.fi" endpoint="https://rim.mnsw-dev.mnsw.fi/domibus/services/msh">
                <identifier partyId="mnsw-dev.mnsw.fi" partyIdType="rimParty"/>
            </party>
        </parties>
        <meps>
            <mep name="oneway" value="http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/oneWay" legs="0"/>
            <binding name="push" value="http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/push"/>
        </meps>
        <properties>
            <property name="originalSenderProperty" key="originalSender" datatype="string" required="true"/>
            <property name="finalRecipientProperty" key="finalRecipient" datatype="string" required="true"/>
            <propertySet name="eDeliveryPropertySet">
                <propertyRef property="finalRecipientProperty"/>
                <propertyRef property="originalSenderProperty"/>
            </propertySet>
        </properties>
        <payloadProfiles>
            <payload name="businessContentPayload" cid="cid:message" mimeType="text/xml" maxSize="0" required="true" inBody="false"/>
            <payload name="businessContentAttachment" cid="cid:attachment" mimeType="application/octet-stream" maxSize="0" required="false" inBody="false"/>
            <payloadProfile name="rimProfile" maxSize="40894464">
                <attachment name="businessContentPayload"/>
                <attachment name="businessContentAttachment"/>
            </payloadProfile>
        </payloadProfiles>
        <securities>
            <security name="eDeliveryAS4Policy_BST_PKIP_RIM" profile="rsa"/>
        </securities>
        <errorHandlings>
            <errorHandling name="defaultErrorHandling" default="true" errorAsResponse="true" businessErrorNotifyProducer="true" businessErrorNotifyConsumer="true" deliveryFailureNotifyProducer="true"/>
        </errorHandlings>
        <agreements>
            <agreement name="agreementEmpty" value="" type=""/>
        </agreements>
        <services>
            <service name="rim-service" value="rim-messaging-service" type="rim-process-schema"/>
        </services>
        <actions>
            <action name="b2sw-action" value="emswe-formality-request"/>
            <action name="sw2b-action" value="emswe-formality-response"/>
        </actions>
        <as4>
            <receptionAwareness name="receptionAwareness" retry="5;5;CONSTANT" duplicateDetection="true"/>
            <reliability name="noReliability" replyPattern="response" nonRepudiation="true"/>
        </as4>
        <legConfigurations>
            <legConfiguration name="rim-leg1" reliability="noReliability" security="eDeliveryAS4Policy_BST_PKIP_RIM" receptionAwareness="receptionAwareness" service="rim-service" action="b2sw-action" defaultMpc="defaultMpc" errorHandling="defaultErrorHandling" compressPayloads="false"/>
            <legConfiguration name="rim-leg2" reliability="noReliability" security="eDeliveryAS4Policy_BST_PKIP_RIM" receptionAwareness="receptionAwareness" service="rim-service" action="sw2b-action" defaultMpc="defaultMpc" errorHandling="defaultErrorHandling" compressPayloads="false"/>
        </legConfigurations>
        <process name="rim-process" initiatorRole="senderRole" responderRole="recipientRole" agreement="agreementEmpty" mep="oneway" binding="push">
            <initiatorParties>
                <initiatorParty name="senderap"/>
                <initiatorParty name="mnsw-dev.mnsw.fi"/>
            </initiatorParties>
            <responderParties>
                <responderParty name="senderap"/>
                <responderParty name="mnsw-dev.mnsw.fi"/>
            </responderParties>
            <legs>
                <leg name="rim-leg1"/>
                <leg name="rim-leg2"/>
            </legs>
        </process>
    </businessProcesses>
    <mpcs>
        <mpc name="defaultMpc" retention_downloaded="10" retention_undownloaded="240" retention_sent_success="10" retention_sent_failure="10" delete_message_metadata="false" max_batch_delete="-1" default="true" enabled="true" qualifiedName="http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/defaultMPC"/>
    </mpcs>
</ns2:configuration>

6. Values that must be replaced

Example valueReplace withWhy it matters
party="senderap"The local Domibus party name.Identifies which configured party represents this Domibus instance.
senderapThe agreed C2 party ID and matching internal party name.Must match the identifier used in outbound and inbound AS4 headers.
mnsw-dev.mnsw.fiThe Finnish C3 party name and Party ID for the selected environment.Use the DEV, STG or PRD value consistently in the party definition and process party references.
https://localhost:8444/...The externally reachable sender AS4 MSH endpoint.The receiver must be able to deliver response messages to C2.
https://rim.mnsw-dev.mnsw.fi/...The Finnish C3 endpoint for DEV, STG or PRD.Each environment has a distinct hostname and trust setup.
rimParty / unregistered URIThe bilateral party ID type, when different.The type forms part of the ebMS party identity.
eDeliveryAS4Policy_BST_PKIP_RIMThe installed Domibus security policy alias.The alias must resolve to a policy supported by both Access Points.
40894464The approved maximum message size.Oversized messages are rejected before business processing.
Retention valuesValues approved for operations, audit and storage capacity.Very short retention can hinder incident investigation; excessive retention consumes storage.

Values normally kept unchanged

7. Import and test

  1. Back up the current Domibus PMode and certificate stores.
  2. Validate that every referenced party, leg, service, action, MPC and security alias is internally consistent.
  3. Import the XML through the supported Domibus administration mechanism for the installed version.
  4. Verify that the PMode becomes active and inspect the Domibus log for schema or reference errors.
  5. Send a controlled request in the staging environment.
  6. Confirm successful AS4 receipt/non-repudiation evidence and the expected RIM response action.
  7. Test negative cases, including an unknown party, invalid certificate, invalid action and duplicate message.
  8. Promote the reviewed environment-specific configuration to production using change control.
Expected result: Domibus resolves the outbound request to rim-leg1, signs and encrypts it with the configured policy, sends it to the C3 endpoint, and resolves the inbound emswe-formality-response to rim-leg2.

8. Production readiness checklist

Related documentation