This is an automated email from the ASF dual-hosted git repository.

robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git

commit 43f03af4c57f44f00e0bc90e0d36eaaabbd8cb83
Author: Robert Lazarski <[email protected]>
AuthorDate: Sat Apr 11 10:36:57 2026 -1000

    AXIS2-6102 Remove Woden (WSDL 2.0) dependency from Axis2 kernel
    
    WSDL 2.0 was a W3C specification that the industry rejected. It was
    published in 2007, no major platform adopted it, and Apache Woden
    itself never reached a final 1.0 release in 19 years. WSDL 1.1 won.
    
    Changes:
    - Make woden-core <optional> in kernel pom.xml
    - Remove woden imports from AxisService.java; printUserWSDL2() now
      throws AxisFault("WSDL 2.0 output is no longer supported")
    - Remove WSDL 2.0 client-side service creation from AxisService
    - Remove URIResolver interface from AARBasedWSDLLocator and
      WarBasedWSDLLocator (keep WSDLLocator for WSDL 1.1)
    - Replace WSDL 2.0 branch in ArchiveReader with clear error message
    - Replace WSDL 2.0 codegen in CodeGenConfiguration with clear error
    
    Impact: Zero for JSON-RPC/MCP users. Zero for SOAP 1.1 users. Only
    affects the theoretical WSDL 2.0 user who does not exist.
    
    Full project builds clean: mvn package site with -Dmaven.compiler.release=17
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
---
 .../axis2/wsdl/codegen/CodeGenConfiguration.java   | 23 +-----
 modules/kernel/pom.xml                             |  1 +
 .../deployment/repository/util/ArchiveReader.java  | 14 +---
 .../deployment/resolver/AARBasedWSDLLocator.java   | 21 +-----
 .../deployment/resolver/WarBasedWSDLLocator.java   | 24 +------
 .../org/apache/axis2/description/AxisService.java  | 81 ++--------------------
 6 files changed, 18 insertions(+), 146 deletions(-)

diff --git 
a/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java 
b/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java
index c432ac276a..1f7ed9b18d 100644
--- 
a/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java
+++ 
b/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java
@@ -680,26 +680,9 @@ public class CodeGenConfiguration implements 
CommandLineOptionConstants {
 
             if (CommandLineOptionConstants.WSDL2JavaConstants.WSDL_VERSION_2.
                     equals(getWSDLVersion())) {
-
-                WSDL20ToAxisServiceBuilder builder;
-
-                // jibx currently does not support multiservice
-                if ((getServiceName() != null) || 
(getDatabindingType().equals("jibx"))) {
-                    builder = new WSDL20ToAxisServiceBuilder(
-                            wsdlUri,
-                            getServiceName(),
-                            getPortName(),
-                            isAllPorts());
-                    builder.setCodegen(true);
-                    addAxisService(builder.populateService());
-                } else {
-                    builder = new WSDL20ToAllAxisServicesBuilder(wsdlUri, 
getPortName());
-                    builder.setCodegen(true);
-                    builder.setAllPorts(isAllPorts());
-                    setAxisServices(
-                            
((WSDL20ToAllAxisServicesBuilder)builder).populateAllServices());
-                }
-
+                // WSDL 2.0 codegen removed in 2.0.1 (AXIS2-6102)
+                throw new CodeGenerationException(
+                        new Exception("WSDL 2.0 code generation is no longer 
supported. Use WSDL 1.1."));
             } else {
                 //It'll be WSDL 1.1
                 Definition wsdl4jDef = readInTheWSDLFile(wsdlUri);
diff --git a/modules/kernel/pom.xml b/modules/kernel/pom.xml
index eaccc74d2b..22cd35bd6d 100644
--- a/modules/kernel/pom.xml
+++ b/modules/kernel/pom.xml
@@ -88,6 +88,7 @@
         <dependency>
             <groupId>org.apache.woden</groupId>
             <artifactId>woden-core</artifactId>
+            <optional>true</optional>
         </dependency>
         <dependency>
             <groupId>commons-logging</groupId>
diff --git 
a/modules/kernel/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
 
b/modules/kernel/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
index 60ede92ae4..71c2de575a 100644
--- 
a/modules/kernel/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
+++ 
b/modules/kernel/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
@@ -452,17 +452,9 @@ public class ArchiveReader implements DeploymentConstants {
                 return 
((WSDL11ToAllAxisServicesBuilder)wsdlToAxisServiceBuilder).populateAllServices();
             } else if (WSDL2Constants.WSDL_NAMESPACE.
                     equals(documentElementNS.getNamespaceURI())){
-                wsdlToAxisServiceBuilder = new WSDL20ToAllAxisServicesBuilder(
-                        new ByteArrayInputStream(out.toByteArray()));
-                
((WSDL20ToAllAxisServicesBuilder)wsdlToAxisServiceBuilder).setCustomWSDLResolver(new
 WarBasedWSDLLocator(wsdlUrl,
-                                                                               
          loader,
-                                                                               
          new ByteArrayInputStream(
-                                                                               
                  out.toByteArray())));
-                wsdlToAxisServiceBuilder.setCustomResolver(
-                        new WarFileBasedURIResolver(loader));
-                return 
((WSDL20ToAllAxisServicesBuilder)wsdlToAxisServiceBuilder).populateAllServices();
-            }
-            else {
+                // WSDL 2.0 support removed in 2.0.1 (AXIS2-6102)
+                throw new DeploymentException("WSDL 2.0 is no longer 
supported. Use WSDL 1.1.");
+            } else {
                 throw new 
DeploymentException(Messages.getMessage("invalidWSDLFound"));
             }
         }
diff --git 
a/modules/kernel/src/org/apache/axis2/deployment/resolver/AARBasedWSDLLocator.java
 
b/modules/kernel/src/org/apache/axis2/deployment/resolver/AARBasedWSDLLocator.java
index 5d74540754..7177075972 100644
--- 
a/modules/kernel/src/org/apache/axis2/deployment/resolver/AARBasedWSDLLocator.java
+++ 
b/modules/kernel/src/org/apache/axis2/deployment/resolver/AARBasedWSDLLocator.java
@@ -21,8 +21,6 @@ package org.apache.axis2.deployment.resolver;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.woden.WSDLException;
-import org.apache.woden.resolver.URIResolver;
 import org.apache.ws.commons.schema.resolver.DefaultURIResolver;
 import org.xml.sax.InputSource;
 
@@ -46,7 +44,7 @@ import java.util.zip.ZipInputStream;
  * The logic here is that we only care about the import location
  * all imports must be relative to the META-INF folder
  */
-public class AARBasedWSDLLocator extends DefaultURIResolver implements 
WSDLLocator, URIResolver {
+public class AARBasedWSDLLocator extends DefaultURIResolver implements 
WSDLLocator {
 
     protected static final Log log = LogFactory
             .getLog(AARBasedWSDLLocator.class);
@@ -136,22 +134,7 @@ public class AARBasedWSDLLocator extends 
DefaultURIResolver implements WSDLLocat
         //TODO: FIXME:    
     }
 
-    public URI resolveURI(URI uri) throws WSDLException, IOException {
-        lastImportLocation = URI.create(baseURI).resolve(uri);
-
-        if (isAbsolute(uri.toString())) {
-            return uri;
-        } else {
-            String absolutePath = aarFile.getAbsolutePath();
-            try {
-                return new URI("jar:file://" + absolutePath + "!/" + 
lastImportLocation);
-            } catch (URISyntaxException e) {
-                log.debug(e);
-            }
-        }
-        log.info("AARBasedWSDLLocator: Unable to resolve " + 
lastImportLocation);
-        return null;
-    }
+    // Woden URIResolver.resolveURI() removed in 2.0.1 (AXIS2-6102)
 
     /**
      * Override logic in DefaultURIResolver class
diff --git 
a/modules/kernel/src/org/apache/axis2/deployment/resolver/WarBasedWSDLLocator.java
 
b/modules/kernel/src/org/apache/axis2/deployment/resolver/WarBasedWSDLLocator.java
index c023e835cd..4b8e5803bf 100644
--- 
a/modules/kernel/src/org/apache/axis2/deployment/resolver/WarBasedWSDLLocator.java
+++ 
b/modules/kernel/src/org/apache/axis2/deployment/resolver/WarBasedWSDLLocator.java
@@ -21,8 +21,6 @@ package org.apache.axis2.deployment.resolver;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.woden.WSDLException;
-import org.apache.woden.resolver.URIResolver;
 import org.apache.ws.commons.schema.resolver.DefaultURIResolver;
 import org.xml.sax.InputSource;
 
@@ -33,7 +31,7 @@ import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
 
-public class WarBasedWSDLLocator extends DefaultURIResolver implements 
WSDLLocator, URIResolver {
+public class WarBasedWSDLLocator extends DefaultURIResolver implements 
WSDLLocator {
     protected static final Log log = LogFactory
             .getLog(WarBasedWSDLLocator.class);
 
@@ -90,23 +88,5 @@ public class WarBasedWSDLLocator extends DefaultURIResolver 
implements WSDLLocat
         //TODO: FIXME:
     }
 
-    public URI resolveURI(URI uri) throws WSDLException, IOException {
-
-        if (isAbsolute(uri.toString())) {
-            return uri;
-        } else {
-            lastImportLocation = URI.create(baseURI).resolve(uri.toString());
-            String searchingStr = lastImportLocation.toString();
-            URL resource = classLoader.getResource(searchingStr);
-            if (resource != null) {
-                try {
-                    return new URI(resource.toString());
-                } catch (URISyntaxException e) {
-                    throw new RuntimeException(e);
-                }
-            }
-            log.info("AARBasedWSDLLocator: Unable to resolve " + 
lastImportLocation);
-            return null;
-        }
-    }
+    // Woden URIResolver.resolveURI() removed in 2.0.1 (AXIS2-6102)
 }
\ No newline at end of file
diff --git a/modules/kernel/src/org/apache/axis2/description/AxisService.java 
b/modules/kernel/src/org/apache/axis2/description/AxisService.java
index d45214eac4..186fac7e63 100644
--- a/modules/kernel/src/org/apache/axis2/description/AxisService.java
+++ b/modules/kernel/src/org/apache/axis2/description/AxisService.java
@@ -68,8 +68,6 @@ import org.apache.axis2.wsdl.WSDLUtil;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.neethi.Policy;
-import org.apache.woden.WSDLSource;
-import org.apache.woden.wsdl20.Description;
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.apache.ws.commons.schema.XmlSchemaExternal;
@@ -1194,21 +1192,10 @@ public class AxisService extends AxisDescription {
     }
     
     public void printUserWSDL2(OutputStream out, String wsdlName, String ip) 
throws AxisFault {
-        Description description = null;
-        // first find the correct wsdl definition
-        Parameter wsdlParameter = 
getParameter(WSDLConstants.WSDL_20_DESCRIPTION);
-        if (wsdlParameter != null) {
-            description = (Description) wsdlParameter.getValue();
-            try {
-                org.apache.woden.WSDLFactory factory = 
org.apache.woden.WSDLFactory.newInstance();
-                org.apache.woden.WSDLWriter writer = factory.newWSDLWriter();
-                writer.writeWSDL(description.toElement(), out);
-            } catch (org.apache.woden.WSDLException e) {
-                throw AxisFault.makeFault(e);
-            }
-        }
-
-}
+        // WSDL 2.0 support removed in 2.0.1 (AXIS2-6102).
+        // WSDL 2.0 was never adopted by the industry; Apache Woden never 
reached a final release.
+        throw new AxisFault("WSDL 2.0 output is no longer supported. Use WSDL 
1.1 (?wsdl).");
+    }
 
     /**
      * find the defintion object for given name
@@ -1839,20 +1826,8 @@ public class AxisService extends AxisDescription {
         }                
         if (supplier != null) {
             Object wsdlContent = supplier.getWSDL(this);
-            if( wsdlContent instanceof Description){
-                try {
-                    Description definition = (Description) wsdlContent;
-                    if (definition != null) {
-                        //TODO  -- Need to implement this method for WSDL 2.0
-                        //changeImportAndIncludeLocations(definition);
-                        printDescriptionObject(definition, out, requestIP);
-                    }
-                } catch (Exception e) {
-                    printWSDLError(out, e);
-                }
-                
-            // wsdlContent can be a OMElement           
-            } else if (wsdlContent instanceof OMElement) {
+            // WSDL 2.0 Description handling removed in 2.0.1 (AXIS2-6102)
+            if (wsdlContent instanceof OMElement) {
                 OMElement wsdlElement = (OMElement) wsdlContent;
                 QName wsdlName = wsdlElement.getQName();
                 if (wsdlName != null
@@ -2407,14 +2382,6 @@ public class AxisService extends AxisDescription {
                 }
                 return createClientSideAxisService(wsdlDefinition, 
wsdlServiceName, portName,
                         options);
-            } else if (Constants.NS_URI_WSDL20.equals(namespaceURI)) {
-                org.apache.woden.WSDLReader reader = 
org.apache.woden.WSDLFactory.newInstance()
-                        .newWSDLReader();
-                WSDLSource source = reader.createWSDLSource();
-                source.setSource(doc);
-                source.setBaseURI(wsdlURL.toURI());
-                Description description = reader.readWSDL(source);
-                return createClientSideAxisService(description, 
wsdlServiceName, portName, options);
             } else {
                 throw new AxisFault("No namespace found : Invalid WSDL");
             }
@@ -2431,12 +2398,6 @@ public class AxisService extends AxisDescription {
         } catch (WSDLException e) {
             log.error(e.getMessage(), e);
             throw AxisFault.makeFault(e);
-        } catch (org.apache.woden.WSDLException e) {
-            log.error(e.getMessage(), e);
-            throw AxisFault.makeFault(e);
-        } catch (URISyntaxException e) {
-            log.error(e.getMessage(), e);
-            throw AxisFault.makeFault(e);
         }
     }
 
@@ -3469,35 +3430,7 @@ public class AxisService extends AxisDescription {
      * @return
      * @throws AxisFault
      */
-    public static AxisService createClientSideAxisService(Description 
description,
-            QName wsdlServiceName, String endPoint, Options options) throws 
AxisFault {
-        WSDL20ToAxisServiceBuilder serviceBuilder = new 
WSDL20ToAxisServiceBuilder(description,
-                wsdlServiceName, endPoint);
-        serviceBuilder.setServerSide(false);
-        AxisService axisService = serviceBuilder.populateService();
-        AxisEndpoint axisEndpoint = (AxisEndpoint) 
axisService.getEndpoint(axisService
-                .getEndpointName());
-        if (axisEndpoint != null) {
-            options.setTo(new 
EndpointReference(axisEndpoint.getEndpointURL()));
-            options.setSoapVersionURI((String) 
axisEndpoint.getBinding().getProperty(
-                    WSDL2Constants.ATTR_WSOAP_VERSION));
-        }
-        return axisService;
-    }    
-    private void printDescriptionObject(Description definition,
-            OutputStream out, String requestIP) {
-        //TODO - complete this method
-        org.apache.woden.WSDLFactory fac;
-        try {
-            fac = org.apache.woden.WSDLFactory.newInstance();
-            org.apache.woden.WSDLWriter writer = fac.newWSDLWriter();
-            writer.writeWSDL(definition.toElement(), out);
-        } catch (org.apache.woden.WSDLException e) {
-            e.printStackTrace();
-        }
-        
-        
-    }
+    // WSDL 2.0 client-side service creation removed in 2.0.1 (AXIS2-6102).
     
     private WSDLSupplier getUserDefinedWSDLSupplier(String wsdlVersion){
         WSDLSupplier wsdlSupplier = null;

Reply via email to