You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by as...@apache.org on 2014/11/11 17:50:48 UTC
cxf git commit: [CXF-6089] XmlAccessorOrder.ALPHABETICAL,
Exception.getMessage() duplicate WSDL elements generated - applying
patch on behalf of Rebecca Searls - thanks!
Repository: cxf
Updated Branches:
refs/heads/master 6e0451e28 -> 4a292c0cc
[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/4a292c0c
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4a292c0c
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4a292c0c
Branch: refs/heads/master
Commit: 4a292c0cc49c0c4eef5d50efc78a499c7a5e1783
Parents: 6e0451e
Author: Alessio Soldano <as...@redhat.com>
Authored: Tue Nov 11 17:48:18 2014 +0100
Committer: Alessio Soldano <as...@redhat.com>
Committed: Tue Nov 11 17:50:21 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/4a292c0c/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) {