cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1374058 - /cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
Date Thu, 16 Aug 2012 21:05:25 GMT
Author: dkulp
Date: Thu Aug 16 21:05:25 2012
New Revision: 1374058

URL: http://svn.apache.org/viewvc?rev=1374058&view=rev
Log:
Bus can be optional for this

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java?rev=1374058&r1=1374057&r2=1374058&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java Thu Aug 16
21:05:25 2012
@@ -485,13 +485,15 @@ public final class EndpointReferenceUtil
         if (StringUtils.isEmpty(wsdlLocation)) {
             return "";
         }
-        WSDLManager manager = bus.getExtension(WSDLManager.class);
-        if (manager != null) {
-            try {
-                Definition def = manager.getDefinition(wsdlLocation);
-                return def.getTargetNamespace();
-            } catch (WSDLException e) {
-                //ignore
+        if (bus != null) {
+            WSDLManager manager = bus.getExtension(WSDLManager.class);
+            if (manager != null) {
+                try {
+                    Definition def = manager.getDefinition(wsdlLocation);
+                    return def.getTargetNamespace();
+                } catch (WSDLException e) {
+                    //ignore
+                }
             }
         }
         return "";



Mime
View raw message