You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by re...@apache.org on 2024/09/18 19:48:34 UTC

(cxf) branch 3.6.x-fixes updated: Use URI factory to parse WSDL location (#1858) (#2072)

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

reta pushed a commit to branch 3.6.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/3.6.x-fixes by this push:
     new 5812309b10 Use URI factory to parse WSDL location (#1858) (#2072)
5812309b10 is described below

commit 5812309b10ff97837b49fe61a18f4551031dd838
Author: Paul Pogonyshev <po...@gmail.com>
AuthorDate: Wed Sep 18 21:48:28 2024 +0200

    Use URI factory to parse WSDL location (#1858) (#2072)
    
    Co-authored-by: Francisco Mateo <ci...@users.noreply.github.com>
---
 .../org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
index 71f4c05ffb..72a414147c 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
@@ -24,6 +24,7 @@ package $service.PackageName;
 #if ($wsdlLocation != "" && not($useGetResource) && not($wsdlLocation.startsWith("classpath:")))
 import java.net.MalformedURLException;
 #end
+import java.net.URI;
 import java.net.URL;
 #if ($markGenerated == "true")
 import javax.annotation.Generated;
@@ -120,7 +121,7 @@ public class ${service.Name} extends ${serviceSuperclass} {
 #else
         URL url = null;
         try {
-            url = new URL("$wsdlLocation");
+            url = URI.create("$wsdlLocation").toURL();
         } catch (MalformedURLException e) {
 #if ($serviceTarget == "cxf")
             LogUtils.getL7dLogger(${service.Name}.class)