Selecting the XML backend
Set the following property inapplication.properties:
phoss-smp-webapp-xml WAR when deploying. This is the only deployable artifact that includes the XML backend.
Data directory
All XML files are written to the directory specified bywebapp.datapath:
File structure
Withinwebapp.datapath, the backend creates the following XML files on first use:
| File | Contents |
|---|---|
sml-info.xml | SML (Service Metadata Locator) endpoint configuration |
smp-settings.xml | SMP runtime settings |
transportprofiles.xml | Registered transport profiles |
smp-servicegroup.xml | All service groups (participants) |
smp-redirect.xml | Document-type redirects |
smp-serviceinformation.xml | Service metadata and endpoints |
smp-participant-migration.xml | Participant migration records |
smp-business-card.xml | Business card data (Peppol Directory) |
security/ subdirectory holds user, role, and user-group XML files managed by the ph-oton framework.
Each file is read into memory on startup and written back atomically on every change. All in-memory state is authoritative at runtime.
File-access check
Thewebapp.checkfileaccess property controls whether the application verifies that all required files inside the data directory are readable at startup:
false in production when webapp.datapath is an absolute path.
Docker: persisting data with volumes
When running phoss SMP in a Docker container you must mount the data directory as a volume so that XML files survive container restarts.compose.yml:
Advantages
- No external dependencies. No database server to install, configure, or maintain.
- Simple setup. A single
webapp.datapathproperty is all that is required. - Portable. Data directory can be copied, backed up, or version-controlled as a set of plain text files.
- Ideal for small deployments with low request rates and few participants.
Limitations
- All data is held in memory; a large number of service groups increases memory usage.
- No built-in replication or high-availability support.
- No connection-pool tuning or query optimization is possible.
Migrating to or from the XML backend
Exporting from XML
All data lives in the XML files underwebapp.datapath. Copy these files to a safe location before switching backends.
Importing into SQL or MongoDB
phoss SMP does not include an automated migration tool. To move data from XML to another backend:- Stop the SMP server.
- Start the server with the new backend configured.
- Re-register all service groups, service metadata, and business cards via the management UI or REST API.
The MongoDB backend performs an automatic one-time migration of the ph-oton security files (users, roles, user groups, user tokens) from XML if it detects an empty collection on first start. SMP-specific data (service groups, redirects, etc.) must be migrated manually.