You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2011/10/13 17:52:32 UTC

svn commit: r1182925 - /cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java

Author: dkulp
Date: Thu Oct 13 15:52:32 2011
New Revision: 1182925

URL: http://svn.apache.org/viewvc?rev=1182925&view=rev
Log:
Fix another issue with Felix not being able to create the proxies for
the various wsdl extensor things.

Modified:
    cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java

Modified: cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java?rev=1182925&r1=1182924&r2=1182925&view=diff
==============================================================================
--- cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java (original)
+++ cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java Thu Oct 13 15:52:32 2011
@@ -88,14 +88,17 @@ public final class SOAPBindingUtil {
         try {
             proxy = Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
                                               new Class[] {cls}, ih);
-        } catch (IllegalArgumentException ex) {
+        } catch (Throwable ex) {
             // Using cls classloader as a fallback to make it work within OSGi  
             ClassLoader contextLoader = Thread.currentThread().getContextClassLoader();
             if (contextLoader != cls.getClassLoader()) {
                 proxy = Proxy.newProxyInstance(cls.getClassLoader(),
                                               new Class[] {cls}, ih);
             } else {
-                throw ex;
+                if (ex instanceof RuntimeException) {
+                    throw (RuntimeException)ex;
+                }
+                throw new RuntimeException(ex);
             }
         }
         return cls.cast(proxy);