Migration Deep Dive für 10 · SOAP öffnen →
⌂ ÜbersichtAlle Vergleiche
Modul 10 · 100 % Codeabdeckung

SOAP

Vollständiger Legacy-Modern-Vergleich aller Java-Klassen, Tests, Maven-POMs und relevanten Ressourcen dieses Moduls. Jede Datei ist genau einmal einer fachlich passenden Vergleichsgruppe zugeordnet.

4Legacy-Dateien
4Modern-Dateien
87 → 87Codezeilen
9/9vollständig erfasst

Fachliche Einordnung

Legacy

JAX-WS mit javax.jws

Endpoint und Annotationen verwenden den javax-Namespace.

Modern

Jakarta XML Web Services

Endpoint und Annotationen verwenden die Jakarta-API.

Vergleichsfokus: Alle Dateien werden nach technischer Rolle und fachlicher Verantwortung gruppiert.
Wichtige Abgrenzung: One-to-many-Änderungen werden als Gruppe dargestellt; eine künstliche 1:1-Zuordnung wird vermieden.

Vollständige Abdeckungsmatrix

Die Ähnlichkeit ist eine technische Orientierung auf normalisiertem Quelltext. Sie ersetzt keine fachliche Bewertung.

VergleichsgruppeLegacy-DateienModern-DateienLegacy-ZeilenModern-ZeilenÄhnlichkeit
Build-Konfiguration11464643%
SOAP-Endpunkt und Test22252593%
Bootstrap11161675%

Gemeinsame Modulstruktur

Das Pair-POM bindet die Legacy- und Modern-Submodule zusammen und gehört deshalb ebenfalls zur vollständigen Codeabdeckung.

Gemeinsam · 19 Zeilenpom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>at.aydin.academy</groupId>
        <artifactId>java-modernization-deep-dive</artifactId>
        <version>1.0.0</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>
    <artifactId>10soap-pair</artifactId>
    <packaging>pom</packaging>
    <name>SOAP: Legacy und Modern</name>
    <modules>
        <module>legacy</module>
        <module>modern</module>
    </modules>
</project>

Alle semantischen Codevergleiche

01Build-KonfigurationDirektvergleich · Legacy 46 / Modern 46 Zeilen · Ähnlichkeit 43%

javax-/Jakarta-Webservice-Abhängigkeiten werden verglichen.

Legacy-DateienModern-DateienEinordnung
pom.xmlpom.xmlDirektvergleich
Semantische Ähnlichkeit: 43%

Legacy

Legacy · 46 Zeilenlegacy/pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>at.aydin.academy</groupId>
        <artifactId>10soap-pair</artifactId>
        <version>1.0.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <artifactId>soap-legacy</artifactId>
    <packaging>jar</packaging>
    <name>SOAP Legacy (javax JAX-WS)</name>
    <dependencies>
        <dependency>
            <groupId>javax.jws</groupId>
            <artifactId>javax.jws-api</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>javax.xml.ws</groupId>
            <artifactId>jaxws-api</artifactId>
            <version>2.3.1</version>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.ws</groupId>
            <artifactId>jaxws-rt</artifactId>
            <version>${jaxws.legacy.version}</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>

        </plugins>
    </build>
</project>

Modern

Modern · 46 Zeilenmodern/pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>at.aydin.academy</groupId>
        <artifactId>10soap-pair</artifactId>
        <version>1.0.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <artifactId>soap-modern</artifactId>
    <packaging>jar</packaging>
    <name>SOAP Modern (Jakarta XML Web Services)</name>
    <dependencies>
        <dependency>
            <groupId>jakarta.jws</groupId>
            <artifactId>jakarta.jws-api</artifactId>
            <version>3.0.0</version>
        </dependency>
        <dependency>
            <groupId>jakarta.xml.ws</groupId>
            <artifactId>jakarta.xml.ws-api</artifactId>
            <version>4.0.2</version>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.ws</groupId>
            <artifactId>jaxws-rt</artifactId>
            <version>${jaxws.modern.version}</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>

        </plugins>
    </build>
</project>
02SOAP-Endpunkt und TestDirektvergleich · Legacy 25 / Modern 25 Zeilen · Ähnlichkeit 93%

Endpoint-Implementierung und Vertragstest werden direkt verglichen.

Legacy-DateienModern-DateienEinordnung
LegacyCalculatorEndpoint.java
LegacyCalculatorEndpointTest.java
ModernCalculatorEndpoint.java
ModernCalculatorEndpointTest.java
Direktvergleich
Semantische Ähnlichkeit: 93%

Legacy

package at.aydin.lab.soap.legacy;

import javax.jws.WebMethod;
import javax.jws.WebService;

@WebService(serviceName = "LegacyCalculatorService")
// Design Pattern: Remote Facade
// Zweck: Eine grobe, stabile SOAP-Schnittstelle schützt die interne Fachlogik.
public class LegacyCalculatorEndpoint {
    @WebMethod
    public int add(int left, int right) {
        return left + right;
    }
}

Modern

package at.aydin.lab.soap.modern;

import jakarta.jws.WebMethod;
import jakarta.jws.WebService;

@WebService(serviceName = "ModernCalculatorService")
// Design Pattern: Remote Facade
// Zweck: Der Vertrag bleibt stabil, während die Laufzeit auf Jakarta migriert wird.
public class ModernCalculatorEndpoint {
    @WebMethod
    public int add(int left, int right) {
        return left + right;
    }
}
03BootstrapDirektvergleich · Legacy 16 / Modern 16 Zeilen · Ähnlichkeit 75%

Publizieren und Starten des Endpunkts werden verglichen.

Legacy-DateienModern-DateienEinordnung
SoapLegacyApplication.javaSoapModernApplication.javaDirektvergleich
Semantische Ähnlichkeit: 75%

Legacy

package at.aydin.lab.soap.legacy;

import javax.xml.ws.Endpoint;

public final class SoapLegacyApplication {
    private SoapLegacyApplication() {
    }

    public static void main(String[] args) throws Exception {
        Endpoint endpoint = Endpoint.publish("http://localhost:8085/calculator", new LegacyCalculatorEndpoint());
        System.out.println("Legacy WSDL: http://localhost:8085/calculator?wsdl");
        System.out.println("ENTER beendet den Server.");
        System.in.read();
        endpoint.stop();
    }
}

Modern

package at.aydin.lab.soap.modern;

import jakarta.xml.ws.Endpoint;

public final class SoapModernApplication {
    private SoapModernApplication() {
    }

    public static void main(String[] args) throws Exception {
        Endpoint endpoint = Endpoint.publish("http://localhost:8086/calculator", new ModernCalculatorEndpoint());
        System.out.println("Modernes WSDL: http://localhost:8086/calculator?wsdl");
        System.out.println("ENTER beendet den Server.");
        System.in.read();
        endpoint.stop();
    }
}
⌂ Cockpit