The Peppol Access Point (AP) setup and the configuration of the test bed can indeed be a bit confusing if you're unfamiliar with the specifics.
The Peppol test bed sends two types of messages:
These two components are typically sent in separate HTTP requests to the endpoint you provide in the test bed configuration. However, the test bed will not send both the SBDH and AS4 message in the same HTTP request.
Here’s how you can differentiate them:
SBDH: This will generally appear as part of the HTTP headers or as part of the body in a specific structured format (for example, an XML or JSON object that contains metadata like message ID, sender, receiver, etc.). The SBDH is typically used for routing information and metadata.
AS4 message: This is the main content (such as the invoice or order) and will be sent in the body of the message after the SBDH. You can identify it by its content type or by inspecting the message structure, which will contain the actual business data.
You need to provide the same endpoint URL in the Peppol test bed configuration for both types of messages, because they will be sent as separate requests to the same endpoint. This means:
If you're using a single endpoint, you'll need to parse and handle both the SBDH metadata and the AS4 message in your system, so your endpoint should be prepared to:
Your endpoint URL should be configured to:
The endpoint should then process the SBDH metadata first and then act on the AS4 message once it is validated and processed. Ensure your endpoint is capable of distinguishing the SBDH metadata from the actual business document (user message) based on the request structure.