diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-09-14 13:16:39 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-09-14 13:16:39 +0000 |
commit | 9d7c57a0e1c12472126c0888ef238c00d93e9001 (patch) | |
tree | be6c90453a62a63174113e3615981e1346a2bc55 /sca-java-2.x/trunk/modules/implementation-java-runtime/src/main | |
parent | f0581d45620443a18a263018a49432f26c9027e2 (diff) |
TUSCANY-3937 - Further fixes on top of Michael's patch to get the properties itest working. Mainly, builder changes to ignore null types (generated for non-JAXB pojos), update Node2JAXB to report validation errors so things don't go wrong silently, ensure default XMLType doesn't get updated, correct properties test to match OASIS, put properties test in the build.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1170598 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/implementation-java-runtime/src/main')
-rw-r--r-- | sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/databinding/PropertyDataTypeProcessor.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/databinding/PropertyDataTypeProcessor.java b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/databinding/PropertyDataTypeProcessor.java index 16de5bbefb..675ab2498b 100644 --- a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/databinding/PropertyDataTypeProcessor.java +++ b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/databinding/PropertyDataTypeProcessor.java @@ -19,6 +19,8 @@ package org.apache.tuscany.sca.implementation.java.databinding; +import javax.xml.namespace.QName; + import org.apache.tuscany.sca.assembly.Property; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.UtilityExtensionPoint; @@ -65,13 +67,16 @@ public class PropertyDataTypeProcessor extends BaseJavaClassVisitor { JavaElementImpl element = type.getPropertyMembers().get(name); introspect(property, element); DataType dt = property.getDataType(); - if (dt.getLogical() instanceof XMLType) { - XMLType xmlType = (XMLType)dt.getLogical(); + Object logical = dt.getLogical(); + if (logical instanceof XMLType && + logical != XMLType.UNKNOWN) { + XMLType xmlType = (XMLType)logical; property.setXSDType(xmlType.getTypeName()); property.setXSDElement(xmlType.getElementName()); } else { Class<?> baseType = JavaIntrospectionHelper.getBaseType(element.getType(), element.getGenericType()); - property.setXSDType(JavaXMLMapper.getXMLType(baseType)); + QName typeName = JavaXMLMapper.getXMLType(baseType); + property.setXSDType(typeName); } } super.visitEnd(clazz, type); |