Author: dkulp Date: Tue Aug 28 20:26:48 2012 New Revision: 1378308 URL: http://svn.apache.org/viewvc?rev=1378308&view=rev Log: Merged revisions 1375643 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes
........ r1375643 | dkulp | 2012-08-21 12:13:43 -0400 (Tue, 21 Aug 2012) | 10 lines 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.5.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java Modified: cxf/branches/2.5.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java?rev=1378308&r1=1378307&r2=1378308&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java (original) +++ cxf/branches/2.5.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java Tue Aug 28 20:26:48 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 "";
