Repository: cxf Updated Branches: refs/heads/master c63ff456c -> 7044013ed
Fix null pointer exception when importing a WSDL. This closes #78. PartialWSDLProcessor.isPortTypeExisted() checks against definition.getAllPortTypes() (line 64), while the loop in WSDLServiceFactory iterates only over definition.getPortTypes() (line 136). This causes a null pointer exception in cases when addition WSDLs containing port type definitions are imported, but none are defined in the parent WSDL. Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/7044013e Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/7044013e Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/7044013e Branch: refs/heads/master Commit: 7044013ed393497f00fce3ab7bc45525a9949d1d Parents: c63ff45 Author: Tobias Goeschel <[email protected]> Authored: Tue Jun 23 14:05:33 2015 +0200 Committer: Colm O hEigeartaigh <[email protected]> Committed: Wed Feb 24 10:07:31 2016 +0000 ---------------------------------------------------------------------- .../src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/7044013e/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java ---------------------------------------------------------------------- diff --git a/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java b/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java index be0d02e..152bf8f 100644 --- a/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java +++ b/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java @@ -133,7 +133,7 @@ public class WSDLServiceFactory extends AbstractServiceFactoryBean { && (!PartialWSDLProcessor.isBindingExisted(definition, serviceName)) && (PartialWSDLProcessor.isPortTypeExisted(definition, serviceName))) { try { - Map<QName, PortType> portTypes = CastUtils.cast(definition.getPortTypes()); + Map<QName, PortType> portTypes = CastUtils.cast(definition.getAllPortTypes()); String existPortName = null; PortType portType = null; for (Map.Entry<QName, PortType> entry : portTypes.entrySet()) {
