Skip to content

Profiles

Philip Helger edited this page Jan 2, 2024 · 10 revisions

To handle common parts of AS4 PModes this project uses so called "profiles". Profiles are very similar to PModes but they don't necessarily contain all information of a PMode but leave room for dynamic injections like certificates or URLs as e.g. required by the Dynamic Discovery mechanism of Peppol.

Supported Profiles out of the box

Currently the following profiles are provided out of the box, in alphabetic order:

  • BDEW in submodule phase4-profile-bdew (since v2.1.0)
  • BPC in submodule phase4-profile-bpc (since v1.3.6)
  • CEF in submodule phase4-profile-cef
  • DBNAlliance in submodule phase4-profile-dbnalliance (since v2.7.0)
  • EESPA in submodule phase4-profile-eespa (since v1.3.7)
  • ENTSOG in submodule phase4-profile-entsog (since v0.14.0)
  • Peppol in submodule phase4-profile-peppol

Developing custom profiles

If you want to create your own profile, you need to provide an SPI implementation of the phase4-lib interface com.helger.phase4.profile.IAS4ProfileRegistrarSPI. See the above mentioned predefined profiles as examples on how to do that. This is e.g. how it was done in the ENTSOG case: https://github.com/phax/phase4/blob/master/phase4-profile-entsog/src/main/java/com/helger/phase4/profile/entsog/AS4ENTSOGProfileRegistarSPI.java

If multiple AS4 profiles are available at runtime, and you need to choose a different default profile, use this code snippet:

MetaAS4Manager.getProfileMgr ().setDefaultProfileID (profileID);

If you have developed an AS4 profile that you want to share with the community, feel free to ping me. I am always happy to onboard external contributions, as long as you agree to the License terms.