cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject git commit: [CXF-6059] Add a better error message if an invalid wsdl is used.
Date Mon, 27 Oct 2014 17:50:00 GMT
Repository: cxf
Updated Branches:
  refs/heads/master b54fe0dfd -> 41c7bc2e6


[CXF-6059] Add a better error message if an invalid wsdl is used.


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/41c7bc2e
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/41c7bc2e
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/41c7bc2e

Branch: refs/heads/master
Commit: 41c7bc2e670acdd36cc4f4c9bec65ce4e39ac6a6
Parents: b54fe0d
Author: Daniel Kulp <dkulp@apache.org>
Authored: Mon Oct 27 13:46:43 2014 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Mon Oct 27 13:49:25 2014 -0400

----------------------------------------------------------------------
 .../org/apache/cxf/wsdl/binding/AbstractWSDLBindingFactory.java | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/41c7bc2e/rt/wsdl/src/main/java/org/apache/cxf/wsdl/binding/AbstractWSDLBindingFactory.java
----------------------------------------------------------------------
diff --git a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/binding/AbstractWSDLBindingFactory.java
b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/binding/AbstractWSDLBindingFactory.java
index bf93bc5..98927a9 100644
--- a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/binding/AbstractWSDLBindingFactory.java
+++ b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/binding/AbstractWSDLBindingFactory.java
@@ -32,6 +32,7 @@ import javax.xml.namespace.QName;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.binding.AbstractBindingFactory;
+import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.service.model.AbstractPropertiesHolder;
 import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.service.model.BindingOperationInfo;
@@ -102,6 +103,10 @@ public abstract class AbstractWSDLBindingFactory extends AbstractBindingFactory
                     copyExtensors(bop2.getOutput(), bop.getBindingOutput(), bop2);
                 }
                 for (BindingFault f : cast(bop.getBindingFaults().values(), BindingFault.class))
{
+                    if (StringUtils.isEmpty(f.getName())) {
+                        throw new IllegalArgumentException("wsdl:fault and soap:fault elements"
+                                                           + " must have a name attribute.");
+                    }
                     copyExtensors(bop2.getFault(new QName(service.getTargetNamespace(), f.getName())),
                                   bop.getBindingFault(f.getName()), bop2);
                 }


Mime
View raw message