cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asold...@apache.org
Subject [1/2] cxf git commit: [CXF-6089] XmlAccessorOrder.ALPHABETICAL, Exception.getMessage() duplicate WSDL elements generated - applying patch on behalf of Rebecca Searls - thanks!
Date Tue, 11 Nov 2014 17:04:22 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 2581237df -> 9053b7a86


[CXF-6089] XmlAccessorOrder.ALPHABETICAL, Exception.getMessage() duplicate WSDL elements generated
- applying patch on behalf of Rebecca Searls - thanks!


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

Branch: refs/heads/3.0.x-fixes
Commit: 3a469d377d87a60439103f294010da6605476e70
Parents: 2581237
Author: Alessio Soldano <asoldano@redhat.com>
Authored: Tue Nov 11 17:48:18 2014 +0100
Committer: Alessio Soldano <asoldano@redhat.com>
Committed: Tue Nov 11 17:57:53 2014 +0100

----------------------------------------------------------------------
 .../apache/cxf/jaxb/JAXBSchemaInitializer.java  | 23 +-------------------
 1 file changed, 1 insertion(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/3a469d37/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
----------------------------------------------------------------------
diff --git a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
index e413963..0e344d2 100644
--- a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
+++ b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
@@ -42,7 +42,6 @@ import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorOrder;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlList;
-import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.adapters.XmlAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
@@ -582,11 +581,7 @@ class JAXBSchemaInitializer extends ServiceModelVisitor {
                 }
             }
         }
-        // Create element in xsd:sequence for Exception.class
-        if (Exception.class.isAssignableFrom(cls)) {
-            addExceptionMessage(cls, schema, seq);
-        }
-        
+
         if (propertyOrder != null) {
             if (propertyOrder.length == seq.getItems().size()) {
                 sortItems(seq, propertyOrder);
@@ -605,22 +600,6 @@ class JAXBSchemaInitializer extends ServiceModelVisitor {
         schemas.addCrossImports();
         part.setProperty(JAXBDataBinding.class.getName() + ".CUSTOM_EXCEPTION", Boolean.TRUE);
     }
-    private void addExceptionMessage(Class<?> cls, XmlSchema schema, XmlSchemaSequence
seq) {
-        try {
-            //a subclass could mark the message method as transient
-            Method m = cls.getMethod("getMessage");
-            if (!m.isAnnotationPresent(XmlTransient.class)) {
-                JAXBBeanInfo beanInfo = getBeanInfo(java.lang.String.class);
-                XmlSchemaElement exEle = new XmlSchemaElement(schema, false);
-                exEle.setName("message");
-                exEle.setSchemaTypeName(getTypeName(beanInfo));
-                exEle.setMinOccurs(0);
-                seq.getItems().add(exEle);
-            }
-        } catch (Exception e) {
-            //ignore, just won't have the message element
-        }
-    }
     
     private boolean generateGenericType(Type type) {
         if (type instanceof ParameterizedType) {


Mime
View raw message