Skip to content

Bugfix/135 receipt validation#48

Open
harsha-amarasiri wants to merge 1 commit intoOxalisCommunity:masterfrom
harsha-amarasiri:bugfix/135-receipt-validation
Open

Bugfix/135 receipt validation#48
harsha-amarasiri wants to merge 1 commit intoOxalisCommunity:masterfrom
harsha-amarasiri:bugfix/135-receipt-validation

Conversation

@harsha-amarasiri
Copy link

@harsha-amarasiri harsha-amarasiri commented Feb 7, 2026

Pull Request Description

Fixes AS4 Receipt XML Schema validation issue : OxalisCommunity/Oxalis-AS4#135

  • Adds XML schema validation for AS4 receipts against EBMSv3, CEF eDelivery and PEPPOL specifications
  • Implements PEPPOL AS4 profile conformance validation for receipts including:
    • NonRepudiationInformation element presence check
    • MessagePartNRInformation validation
    • <ds:Reference> and <ebbp:MessagePartIdentifier> mutual exclusivity (AS4 Profile §5.1.9)
  • Provides configurable validation modes: NONE, LOGGING (default), STRICT
  • Thread-safe schema validator factory with caching
  • Comprehensive test coverage with valid/invalid message samples

Key components:

  • SchemaValidatorFactory - Extensible, thread-safe XSD based validation with schema caching
  • PeppolAs4ReceiptValidator - PEPPOL-specific conformance rules
  • As4ReceiptValidationInInterceptor - CXF interceptor with configurable validation modes
  • Configuration: oxalis.as4.receipt.validation (values: none, logging, strict)

Design rationale:

  • Isolated and transparent validation - does not break existing flows
  • DOM parsing and XPath for precise validation against specifications

Backward compatibility:

  • Default behavior: validation errors are logged but do not block transmission
  • Operators can enable strict validation via configuration if desired
  • No breaking changes to existing AS4 message flows

Type of Pull Request

  • New feature/Enhancement - non-breaking change which adds functionality
  • Bug fix
  • Breaking change (Require Major version change?)

Type of Change

  • OpenPeppol eDEC Specifications
  • Peppol AS4 Profile specification
  • Peppol Business Envelope specification
  • Peppol Policies specification
  • Peppol eDEC Code Lists specification
  • OpenPeppol Spring/Fall release
  • Oxalis software internal change or enhancement
  • General change

Pull Request Checklist:

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas. But did not add unnecessary annotation/comment say @author name etc
  • I have checked my code for variable and method name and corrected grammar/spelling mistakes if any
  • I have made corresponding changes to the documentation where needed
  • My changes generate no new/additional warnings
  • My change is not breaking or creating conflict with associated dependencies
  • I have performed a self-review of my own code
  • I ran mvn clean install before commit and all tests run successfully
  • I conducted basic QA to assure all features are working fine
  • My pull request generate no conflicts with master branch
  • I requested code review from other team members

@harsha-amarasiri harsha-amarasiri marked this pull request as ready for review February 7, 2026 20:27
@harsha-amarasiri harsha-amarasiri force-pushed the bugfix/135-receipt-validation branch 3 times, most recently from 2d7c791 to 0ae070c Compare February 14, 2026 11:56
Fix introduces XML schema validation and specific PEPPOL conformance checks for AS4 receipts.

Key Components
- As4ReceiptValidationInInterceptor.java
- SchemaValidatorFactory.java
- PeppolAs4ReceiptValidator.java

Design:
- receipt validation configured via `oxalis.as4.receipt.validation` with `logging` as default
- SchemaValidatorFactory can be used for UserMessage or other message type validations
- PeppolAs4ReceiptValidator ensures specific peppol conformance rules.
@harsha-amarasiri harsha-amarasiri force-pushed the bugfix/135-receipt-validation branch from 0ae070c to 796121d Compare February 14, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants