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 2012/08/21 18:13:44 UTC

svn commit: r1375643 - /cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java

Author: dkulp
Date: Tue Aug 21 16:13:43 2012
New Revision: 1375643

URL: http://svn.apache.org/viewvc?rev=1375643&view=rev
Log:
Merged revisions 1374058 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1374058 | dkulp | 2012-08-16 17:05:25 -0400 (Thu, 16 Aug 2012) | 2 lines

  Bus can be optional for this

........

Modified:
    cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java

Modified: cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java?rev=1375643&r1=1375642&r2=1375643&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java (original)
+++ cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java Tue Aug 21 16:13:43 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 "";