# spring-projects/spring-ws architecture

> Architecture diagram of the GitHub repository spring-projects/spring-ws, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/spring-projects/spring-ws
- Repository: https://github.com/spring-projects/spring-ws

## Overview

##### Project Type and Purpose
- This is a multi-module, open-source Java library suite (“Spring Web Services”) focused on contract-first SOAP/WS-* development. It provides core SOAP messaging, XML utilities, security interceptors, transport support, testing helpers, and documentation modules.

##### High-Level Module Structure
- spring-ws-bom: Bill of Materials, centralizes version alignment
- spring-ws-core: Core SOAP/WS message factory, client template, server dispatch, endpoint mapping
- spring-xml: XML utilities (DOM/SAX/transform/validation/xpath) used by core and support
- spring-ws-security: WS-Security interceptors (WSS4J, X.509, callback handlers) on top of core
- spring-ws-support: Transport adapters (JMS, Mail, XMPP) extending core messaging
- spring-ws-test: Mock clients/servers and assertion DSL for testing WS endpoints
- spring-ws-docs: Asciidoc-based reference and guides
- spring-ws-platform: (optional) aggregates platform-level conventions/plugins

##### External Dependencies & Services
- Spring Framework (beans, context, AOP)
- JAXP / Xml APIs, WSS4J, JMS provider libraries
- Gradle build system + custom conventions/optional-dependencies plugins
- GitHub Actions CI/CD, Maven Central (release & snapshot repositories), Slack/email notifications

##### Architectural Patterns
- Layered, plugin-style modules: Core → Security / Support → Test / Docs
- Contract-first SOAP messaging (WebServiceTemplate, MessageDispatcher)
- Interceptor chain (security, validation, logging)
- Dependency injection via Spring configuration namespaces

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Management Layer
    subgraph "Management Layer"
        direction TB
        BOM["spring-ws-bom\n(Bill of Materials)"]:::management
        Platform["spring-ws-platform\n(Platform conventions/plugins)"]:::management
        Conventions["Gradle Conventions Plugin"]:::management
        OptionalDeps["Optional Dependencies Plugin"]:::management
    end

    %% Core Layer
    subgraph "Core Layer"
        direction TB
        Core["spring-ws-core\n(Core SOAP/WS engine)"]:::core
        XML["spring-xml\n(XML utilities)"]:::core
    end

    %% Security Layer
    subgraph "Security Layer"
        direction TB
        Security["spring-ws-security\n(WS-Security interceptors)"]:::security
    end

    %% Support Layer
    subgraph "Support Layer"
        direction TB
        Support["spring-ws-support\n(Transport adapters)"]:::support
    end

    %% Test Layer
    subgraph "Test Layer"
        direction TB
        Test["spring-ws-test\n(Mock clients/servers)"]:::test
    end

    %% Docs Layer
    subgraph "Docs Layer"
        direction TB
        Docs["spring-ws-docs\n(Asciidoc guides)"]:::docs
    end

    %% External & Build
    subgraph "External Dependencies & CI/CD"
        direction TB
        SpringFW["Spring Framework"]:::external
        JAXP["JAXP / XML APIs"]:::external
        WSS4J["WSS4J"]:::external
        JMSLib["JMS Provider"]:::external
        GradleWrapper["Gradle Wrapper"]:::build
        RootBuild["Root Build"]:::build
        MavenCentral["Maven Central"]:::external
        GitHubActions["GitHub Actions CI/CD"]:::ci
        Notifications["Slack / Email Notifications"]:::external
    end

    %% Dependencies
    BOM -->|manages versions| Core
    BOM -->|manages versions| XML
    BOM -->|manages versions| Security
    BOM -->|manages versions| Support
    BOM -->|manages versions| Test
    BOM -->|manages versions| Docs
    BOM -->|manages versions| Platform
    BOM -->|manages versions| Conventions
    BOM -->|manages versions| OptionalDeps

    Core -->|depends on| XML
    Core -->|depends on| SpringFW
    Core -->|depends on| JAXP

    Security -->|depends on| Core
    Security -->|uses| WSS4J

    Support -->|depends on| Core
    Support -->|uses| JMSLib

    Test -->|depends on| Core
    Test -->|depends on| Support

    %% Build & Release Flow
    GradleWrapper -->|invokes| RootBuild
    RootBuild -->|builds/tests| Core & XML & Security & Support & Test & Docs & Platform
    RootBuild -->|publishes| MavenCentral
    GitHubActions -->|triggers| GradleWrapper
    GitHubActions -->|deploys snapshots| MavenCentral
    GitHubActions -->|creates release| MavenCentral
    GitHubActions -->|sends| Notifications

    %% Styling & Legend
    classDef management fill:#D8BFD8,stroke:#800080,color:#000
    classDef core fill:#AED6F1,stroke:#3498DB,color:#000
    classDef security fill:#F5B7B1,stroke:#CB4335,color:#000
    classDef support fill:#ABEBC6,stroke:#27AE60,color:#000
    classDef test fill:#F9E79F,stroke:#D4AC0D,color:#000
    classDef docs fill:#D5D8DC,stroke:#7F8C8D,color:#000
    classDef external fill:#FFFFFF,stroke:#000000,color:#000,stroke-dasharray: 5 5
    classDef build fill:#FADBD8,stroke:#EC7063,color:#000
    classDef ci fill:#EBDEF0,stroke:#A569BD,color:#000

    %% Click Events
    click BOM "https://github.com/spring-projects/spring-ws/blob/main/spring-ws-bom/build.gradle"
    click Platform "https://github.com/spring-projects/spring-ws/blob/main/spring-ws-platform/build.gradle"
    click Conventions "https://github.com/spring-projects/spring-ws/tree/main/gradle/plugins/conventions-plugin/src/main/java/org/springframework/ws/gradle/conventions"
    click OptionalDeps "https://github.com/spring-projects/spring-ws/tree/main/gradle/plugins/optional-dependencies-plugin/src/main/java/org/springframework/ws/gradle/optional"
    click Core "https://github.com/spring-projects/spring-ws/blob/main/spring-ws-core/build.gradle"
    click Core "https://github.com/spring-projects/spring-ws/tree/main/spring-ws-core/src/main/java/org/springframework/ws"
    click XML "https://github.com/spring-projects/spring-ws/blob/main/spring-xml/build.gradle"
    click XML "https://github.com/spring-projects/spring-ws/tree/main/spring-xml/src/main/java/org/springframework/xml"
    click Security "https://github.com/spring-projects/spring-ws/blob/main/spring-ws-security/build.gradle"
    click Security "https://github.com/spring-projects/spring-ws/tree/main/spring-ws-security/src/main/java/org/springframework/ws/soap/security"
    click Support "https://github.com/spring-projects/spring-ws/blob/main/spring-ws-support/build.gradle"
    click Support "https://github.com/spring-projects/spring-ws/tree/main/spring-ws-support/src/main/java/org/springframework/ws/transport"
    click Test "https://github.com/spring-projects/spring-ws/blob/main/spring-ws-test/build.gradle"
    click Test "https://github.com/spring-projects/spring-ws/tree/main/spring-ws-test/src/main/java/org/springframework/ws/test"
    click Docs "https://github.com/spring-projects/spring-ws/blob/main/spring-ws-docs/build.gradle"
    click Docs "https://github.com/spring-projects/spring-ws/tree/main/spring-ws-docs/src/docs/asciidoc"
    click GitHubActions "https://github.com/spring-projects/spring-ws/tree/main/.github/workflows"
    click GitHubActions "https://github.com/spring-projects/spring-ws/tree/main/.github/actions"
```
