code: @OverrideOnDemand
    protected void validateOutgoingBusinessDocument (@Nonnull final Element aXML) throws AS2ClientBuilderException
    {
      if (m_aVESRegistry == null)
      {
        // Create lazily
        m_aVESRegistry = createValidationRegistry ();
      }
      final IValidationExecutorSet aVES = m_aVESRegistry.getOfID (m_aVESID);
      if (aVES == null)
        throw new AS2ClientBuilderException ("The validation executor set ID " +
                                             m_aVESID.getAsSingleID () +
                                             " is unknown!");
  
      final ValidationExecutionManager aVEM = aVES.createExecutionManager ();
      final ValidationResultList aValidationResult = aVEM.executeValidation (ValidationSource.create (null, aXML),
                                                                             (Locale) null);
      if (aValidationResult.containsAtLeastOneError ())
        throw new AS2ClientBuilderValidationException (aValidationResult);
    }
docs: Perform the standard PEPPOL validation of the outgoing business document
  before sending takes place. In case validation fails, an exception is
  thrown. The validation is configured using the validation key. This method
  is only called, when a validation key was set.
  
  @param aXML
  The DOM Element with the business document to be validated.
  @throws AS2ClientBuilderException
  In case the validation executor set ID is unknown.
  @throws AS2ClientBuilderValidationException
  In case validation failed.
  @see #setValidationKey(VESID)