You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2020/05/05 12:11:57 UTC

[cxf] branch 3.3.x-fixes updated (61087a7 -> b8afa88)

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

coheigea pushed a change to branch 3.3.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git.


    from 61087a7  CXF-8271: The async JAX-RS client never completes the response in case of an exception during the interceptor chain processing. (#665)
     new cc1f624  CXF-5216 - WSDL definition cache issue for web service client when WSDL in service war changed
     new f9b3c53  Recording .gitmergeinfo Changes
     new e1ed51a  Fixing up WSDLManager backmerge
     new d7365ee  Updating Jackson to 2.10.4
     new b8afa88  Recording .gitmergeinfo Changes

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitmergeinfo                                      |   5 ++
 parent/pom.xml                                     |   4 +-
 .../org/apache/cxf/wsdl11/WSDLManagerImpl.java     |  18 ++++
 .../org/apache/cxf/wsdl11/WSDLManagerImplTest.java | 100 ++++++++++++++++++++-
 4 files changed, 122 insertions(+), 5 deletions(-)


[cxf] 02/05: Recording .gitmergeinfo Changes

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f9b3c531b89242cf3a0aa2e66e3d2c492cd73be7
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Tue May 5 11:34:15 2020 +0100

    Recording .gitmergeinfo Changes
---
 .gitmergeinfo | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/.gitmergeinfo b/.gitmergeinfo
index 9db5c08..0006636 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -147,6 +147,7 @@ B 97e891d42136dea99739c573599d37a597f72e46
 B 97efd8a63848811f38a9a6d2f01a7910f39a584a
 B 997eed0a4bc68445fe46dcf093548e04b17e1566
 B 9be0ff566caa784807bd89e7c6996a4405ac59d7
+B 9c146e1e154ce179aa5cb1b60fe4e1dc6670f73d
 B 9c48667915c34d2e8960d9f11be5b6b7d824ff24
 B 9d97e0d5b7f4e0ed3ebf531b389b38f6f3c111ed
 B 9fd3ec99d73449779915279cd8bdabe484c29fda
@@ -205,6 +206,7 @@ B e6ca654a67a3f4449fa9eed492766bdbce485e85
 B e6d432be93022b5b4ac1998a546d0652861fdff3
 B e73daaaa4a04c3d29c9280934a4ca7a81abb7729
 B e75756033fcb6f393fc725d13a5241c462add1d9
+B eec13f495ec1207da93d8373531cdb3c0605781a
 B ef7f9b1d16ec71ea1186701e20818607ce7d2bba
 B eff15d982722111d5da87591bd115cefefe944df
 B f0a556673f0a999dcdf5d9882a86a48120240594
@@ -270,8 +272,10 @@ M 727c2b8e70f6f8282ad2431703e88063f27d69c4
 M 79466c55a2a1191df9c28a02568b82a8c3d08fbd
 M 7971b506283502c26aafb97c0f6e50633f126cdd
 M 7a655b49fd6d432127a55b38f15c1212f7064196
+M 7aa6e0a402b8ce7dfff8a931a507b884d7152cea
 M 7b50181ebc445bb84d3463b284643432399bc0f8
 M 7ef814556d727c147d6f625cbb1170edfd24a752
+M 8b11d6b26369650e5f4c6f3730dbb97d60927d9b
 M 92a00fc05e2437d2d0cf98099060ba4e1f6dac99
 M 95c3c37092751b1d00b6f2c26642f18ebcbba878
 M 972a2755ca85ba86f473b0ce46f23bf6193ced62


[cxf] 03/05: Fixing up WSDLManager backmerge

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e1ed51a7cb96835bcd3d0a9bacf214bfca8fbb89
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Tue May 5 11:35:43 2020 +0100

    Fixing up WSDLManager backmerge
---
 rt/wsdl/src/main/java/org/apache/cxf/wsdl/WSDLManager.java          | 6 ------
 rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java    | 1 -
 .../src/test/java/org/apache/cxf/wsdl11/WSDLManagerImplTest.java    | 2 +-
 3 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/WSDLManager.java b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/WSDLManager.java
index e731a75..38326fc 100644
--- a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/WSDLManager.java
+++ b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/WSDLManager.java
@@ -104,10 +104,4 @@ public interface WSDLManager {
      */
     void removeDefinition(Definition wsdl);
 
-    /**
-     * If the definition is cached, remove it from the cache
-     * @param url
-     */
-    void removeDefinition(String url);
-
 }
diff --git a/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java b/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
index 1a911fc..1b94c48 100644
--- a/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
+++ b/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
@@ -354,7 +354,6 @@ public class WSDLManagerImpl implements WSDLManager {
         }
     }
 
-    @Override
     public void removeDefinition(String url) {
         synchronized (definitionsMap) {
             Definition wsdl = definitionsMap.get(url);
diff --git a/rt/wsdl/src/test/java/org/apache/cxf/wsdl11/WSDLManagerImplTest.java b/rt/wsdl/src/test/java/org/apache/cxf/wsdl11/WSDLManagerImplTest.java
index 66bb335..72340aa 100644
--- a/rt/wsdl/src/test/java/org/apache/cxf/wsdl11/WSDLManagerImplTest.java
+++ b/rt/wsdl/src/test/java/org/apache/cxf/wsdl11/WSDLManagerImplTest.java
@@ -216,7 +216,7 @@ public class WSDLManagerImplTest {
         assertNotNull(service);
 
         // Now remove it
-        builder.removeDefinition(path2.toString());
+        ((WSDLManagerImpl)builder).removeDefinition(path2.toString());
 
         // This time loading should fail as the original resource is removed
         try {


[cxf] 04/05: Updating Jackson to 2.10.4

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d7365eea1bcef3404a8d5b3624a2ebcacfd2a18e
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Tue May 5 11:30:23 2020 +0100

    Updating Jackson to 2.10.4
    
    (cherry picked from commit d5ad40bf29cf57f13aaeeca31e0aac61487095b4)
---
 parent/pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/parent/pom.xml b/parent/pom.xml
index f8a7507..cdab011 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -128,8 +128,8 @@
         <cxf.httpcomponents.client.version>4.5.12</cxf.httpcomponents.client.version>
         <cxf.httpcomponents.core.version.range>[4.3,4.5.0)</cxf.httpcomponents.core.version.range>
         <cxf.httpcomponents.core.version>4.4.13</cxf.httpcomponents.core.version>
-        <cxf.jackson.version>2.10.3</cxf.jackson.version>
-        <cxf.jackson.databind.version>2.10.3</cxf.jackson.databind.version>
+        <cxf.jackson.version>2.10.4</cxf.jackson.version>
+        <cxf.jackson.databind.version>2.10.4</cxf.jackson.databind.version>
         <cxf.jacorb.version>3.9</cxf.jacorb.version>
         <cxf.jaeger.version>0.35.5</cxf.jaeger.version>
         <cxf.james.mim4j.version>0.7.2</cxf.james.mim4j.version>


[cxf] 05/05: Recording .gitmergeinfo Changes

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit b8afa8815f8c88ee209d756781f1fb579cfdd0bb
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Tue May 5 11:36:08 2020 +0100

    Recording .gitmergeinfo Changes
---
 .gitmergeinfo | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitmergeinfo b/.gitmergeinfo
index 0006636..973f8cc 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -300,6 +300,7 @@ M cbc0fde7f85d01e379e40a7f27fe5cea20169ddf
 M ccb743e48e9ed99e240ae05f373b6ff799085049
 M ce504146b81a2ffb2e8cda36d8bdf8486730e485
 M d17a51cbff36aa314374d4621434968422fb9c9f
+M d5ad40bf29cf57f13aaeeca31e0aac61487095b4
 M d5b612c220bab496c3dab1731e56b3fea36c1b07
 M d8619b13cd9ff375590946c1349f6fe374959f30
 M d875ceee917237f5c344df989947aff025d45d4f


[cxf] 01/05: CXF-5216 - WSDL definition cache issue for web service client when WSDL in service war changed

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit cc1f624a675808ba5ba12663a0fcdbee39afc706
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Tue May 5 10:07:12 2020 +0100

    CXF-5216 - WSDL definition cache issue for web service client when WSDL in service war changed
    
    (cherry picked from commit 37a8716b49c7a0b9f0f759a152740ecebf8c44f8)
---
 .../main/java/org/apache/cxf/wsdl/WSDLManager.java |   6 ++
 .../org/apache/cxf/wsdl11/WSDLManagerImpl.java     |  19 ++++
 .../org/apache/cxf/wsdl11/WSDLManagerImplTest.java | 100 ++++++++++++++++++++-
 3 files changed, 122 insertions(+), 3 deletions(-)

diff --git a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/WSDLManager.java b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/WSDLManager.java
index 38326fc..e731a75 100644
--- a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/WSDLManager.java
+++ b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/WSDLManager.java
@@ -104,4 +104,10 @@ public interface WSDLManager {
      */
     void removeDefinition(Definition wsdl);
 
+    /**
+     * If the definition is cached, remove it from the cache
+     * @param url
+     */
+    void removeDefinition(String url);
+
 }
diff --git a/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java b/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
index c111756..1a911fc 100644
--- a/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
+++ b/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
@@ -338,6 +338,7 @@ public class WSDLManagerImpl implements WSDLManager {
         this.disableSchemaCache = disableSchemaCache;
     }
 
+    @Override
     public void removeDefinition(Definition wsdl) {
         synchronized (definitionsMap) {
             List<Object> keys = new ArrayList<>();
@@ -353,5 +354,23 @@ public class WSDLManagerImpl implements WSDLManager {
         }
     }
 
+    @Override
+    public void removeDefinition(String url) {
+        synchronized (definitionsMap) {
+            Definition wsdl = definitionsMap.get(url);
+            if (wsdl != null) {
+                List<Object> keys = new ArrayList<>();
+                for (Map.Entry<Object, Definition> e : definitionsMap.entrySet()) {
+                    if (e.getValue() == wsdl) {
+                        keys.add(e.getKey());
+                    }
+                }
+                for (Object o : keys) {
+                    definitionsMap.remove(o);
+                    schemaCacheMap.remove(o);
+                }
+            }
+        }
+    }
 
 }
diff --git a/rt/wsdl/src/test/java/org/apache/cxf/wsdl11/WSDLManagerImplTest.java b/rt/wsdl/src/test/java/org/apache/cxf/wsdl11/WSDLManagerImplTest.java
index d9a5746..66bb335 100644
--- a/rt/wsdl/src/test/java/org/apache/cxf/wsdl11/WSDLManagerImplTest.java
+++ b/rt/wsdl/src/test/java/org/apache/cxf/wsdl11/WSDLManagerImplTest.java
@@ -19,6 +19,10 @@
 
 package org.apache.cxf.wsdl11;
 
+import java.io.File;
+import java.nio.file.FileSystems;
+import java.nio.file.Files;
+import java.nio.file.Path;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -34,12 +38,14 @@ import javax.xml.stream.XMLStreamReader;
 
 import org.apache.cxf.staxutils.PropertiesExpandingStreamReader;
 import org.apache.cxf.staxutils.XMLStreamReaderWrapper;
+import org.apache.cxf.wsdl.WSDLManager;
 
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 public class WSDLManagerImplTest {
 
@@ -48,7 +54,7 @@ public class WSDLManagerImplTest {
         String qname = "http://apache.org/hello_world_soap_http";
         String wsdlUrl = getClass().getResource("hello_world.wsdl").toString();
 
-        WSDLManagerImpl builder = new WSDLManagerImpl();
+        WSDLManager builder = new WSDLManagerImpl();
         Definition def = builder.getDefinition(wsdlUrl);
         assertNotNull(def);
 
@@ -69,7 +75,7 @@ public class WSDLManagerImplTest {
     public void testBuildImportedWSDL() throws Exception {
         String wsdlUrl = getClass().getResource("hello_world_services.wsdl").toString();
 
-        WSDLManagerImpl builder = new WSDLManagerImpl();
+        WSDLManager builder = new WSDLManagerImpl();
         Definition def = builder.getDefinition(wsdlUrl);
 
         assertNotNull(def);
@@ -109,7 +115,7 @@ public class WSDLManagerImplTest {
     public void testLocalNamespacedWSDL() throws Exception {
         String wsdlUrl = getClass().getResource("hello_world_local_nsdecl.wsdl").toString();
 
-        WSDLManagerImpl builder = new WSDLManagerImpl();
+        WSDLManager builder = new WSDLManagerImpl();
         Definition def = builder.getDefinition(wsdlUrl);
         java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream();
         builder.getWSDLFactory().newWSDLWriter().writeWSDL(def, bos);
@@ -132,4 +138,92 @@ public class WSDLManagerImplTest {
         builder.getWSDLFactory().newWSDLWriter().writeWSDL(def, bos);
         assertTrue(bos.toString().contains("http://localhost:99999/SoapContext/SoapPort"));
     }
+
+    @Test
+    public void testRemoveDefinition() throws Exception {
+        String basedir = System.getProperty("basedir");
+        if (basedir == null) {
+            basedir = new File(".").getCanonicalPath();
+        }
+
+        // Copy hello_world.wsdl so that we can delete it
+        Path path1 = FileSystems.getDefault().getPath(basedir,
+                "/src/test/resources/org/apache/cxf/wsdl11/hello_world.wsdl");
+        Path path2 = FileSystems.getDefault().getPath(basedir, "/target/test-classes/hello_world2.wsdl");
+        Files.copy(path1, path2);
+
+        // Load the resource
+        WSDLManager builder = new WSDLManagerImpl();
+        Definition def = builder.getDefinition(path2.toString());
+        assertNotNull(def);
+
+        // Delete the resource
+        Files.delete(path2);
+
+        // Now load it again to test caching
+        def = builder.getDefinition(path2.toString());
+        assertNotNull(def);
+
+        Map<?, ?> services = def.getServices();
+        assertNotNull(services);
+        assertEquals(1, services.size());
+        String qname = "http://apache.org/hello_world_soap_http";
+        Service service = (Service) services.get(new QName(qname, "SOAPService"));
+        assertNotNull(service);
+
+        // Now remove it
+        builder.removeDefinition(def);
+
+        // This time loading should fail as the original resource is removed
+        try {
+            builder.getDefinition(path2.toString());
+            fail("Failure expected");
+        } catch (NullPointerException ex) {
+            // expected
+        }
+    }
+
+    @Test
+    public void testRemoveDefinitionByURL() throws Exception {
+        String basedir = System.getProperty("basedir");
+        if (basedir == null) {
+            basedir = new File(".").getCanonicalPath();
+        }
+
+        // Copy hello_world.wsdl so that we can delete it
+        Path path1 = FileSystems.getDefault().getPath(basedir,
+                "/src/test/resources/org/apache/cxf/wsdl11/hello_world.wsdl");
+        Path path2 = FileSystems.getDefault().getPath(basedir, "/target/test-classes/hello_world2.wsdl");
+        Files.copy(path1, path2);
+
+        // Load the resource
+        WSDLManager builder = new WSDLManagerImpl();
+        Definition def = builder.getDefinition(path2.toString());
+        assertNotNull(def);
+
+        // Delete the resource
+        Files.delete(path2);
+
+        // Now load it again to test caching
+        def = builder.getDefinition(path2.toString());
+        assertNotNull(def);
+
+        Map<?, ?> services = def.getServices();
+        assertNotNull(services);
+        assertEquals(1, services.size());
+        String qname = "http://apache.org/hello_world_soap_http";
+        Service service = (Service) services.get(new QName(qname, "SOAPService"));
+        assertNotNull(service);
+
+        // Now remove it
+        builder.removeDefinition(path2.toString());
+
+        // This time loading should fail as the original resource is removed
+        try {
+            builder.getDefinition(path2.toString());
+            fail("Failure expected");
+        } catch (NullPointerException ex) {
+            // expected
+        }
+    }
 }
\ No newline at end of file