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

ffang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/main by this push:
     new 3fda9e5c56 [CXF-8948]wsdlto tool should throw exception when 
bindingFiles is invalid
3fda9e5c56 is described below

commit 3fda9e5c5695fa6a715660e99e8973250f64404b
Author: Freeman Fang <[email protected]>
AuthorDate: Mon Oct 23 14:35:13 2023 -0400

    [CXF-8948]wsdlto tool should throw exception when bindingFiles is invalid
---
 .../tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java | 3 +++
 .../cxf/tools/wsdlto/frontend/jaxws/customization/Messages.properties  | 1 +
 2 files changed, 4 insertions(+)

diff --git 
a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
 
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
index 940085d888..9fe8a3620f 100644
--- 
a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
+++ 
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
@@ -535,6 +535,9 @@ public final class CustomizationParser {
             } else {
                 jaxbBindings.add(new InputSource(bindingFile));
             }
+        } else {
+            Message msg = new Message("INVALID_BINDING_FILE", LOG);
+            throw new ToolException(msg);
         }
     }
 
diff --git 
a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/Messages.properties
 
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/Messages.properties
index 5f78ab391b..d9889f15f8 100644
--- 
a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/Messages.properties
+++ 
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/Messages.properties
@@ -34,3 +34,4 @@ FAILED_RESOLVE_CATALOG = Failed to resolve catalog {0}
 MISSING_WSDL = Unable to read {0}.
 OLD_JAXWS_NAMESPACE = Old JAXWS binding file namespace 
\"https://java.sun.com/xml/ns/jaxws\"; is used.This binding file will be 
ignored. Please use \"https://jakarta.ee/xml/ns/jaxws\"; instead
 OLD_JAXB_NAMESPACE = Old JAXB binding file namespace 
\"https://java.sun.com/xml/ns/jaxb\"; is used.This binding file will be ignored. 
Please use \"https://jakarta.ee/xml/ns/jaxb\"; instead
+INVALID_BINDING_FILE = Not a valid jaxb or jaxws binding file, please check 
the namespace

Reply via email to