You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2005/04/27 08:53:21 UTC
svn commit: r164952 -
/geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java
Author: djencks
Date: Tue Apr 26 23:53:20 2005
New Revision: 164952
URL: http://svn.apache.org/viewcvs?rev=164952&view=rev
Log:
note large hole in spec. Need to figure out if equivalent hole is present for truck-sized elements of same local name and different namespaces to drive through
Modified:
geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java
Modified: geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java?rev=164952&r1=164951&r2=164952&view=diff
==============================================================================
--- geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java (original)
+++ geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java Tue Apr 26 23:53:20 2005
@@ -152,7 +152,7 @@
typeInfo.setQName(axisKey);
Map paramNameToType = new HashMap();
- if (null == schemaType.getContentModel()) {
+ if (null == schemaType.getContentModel()) {
;
} else if (SchemaParticle.SEQUENCE == schemaType.getContentModel().getParticleType()
|| SchemaParticle.ALL == schemaType.getContentModel().getParticleType()) {
@@ -174,12 +174,15 @@
SchemaLocalAttribute[] attributes = schemaType.getAttributeModel().getAttributes();
for (int i = 0; i < attributes.length; i++) {
SchemaLocalAttribute attribute = attributes[i];
- attNameToType.put(attribute.getName(), attribute);
+ Object old = attNameToType.put(attribute.getName().getLocalPart(), attribute);
+ if (old != null) {
+ throw new DeploymentException("Complain to your expert group member, spec does not support attributes with the same local name and differing namespaces: original: " + old + ", duplicate local name: " + attribute);
+ }
}
}
-
+
VariableMappingType[] variableMappings = javaXmlTypeMapping.getVariableMappingArray();
-
+
FieldDesc[] fields = new FieldDesc[variableMappings.length];
typeInfo.setFields(fields);
@@ -205,16 +208,13 @@
if (javaType == null) {
throw new DeploymentException("field name " + fieldName + " not found in " + properties);
}
- QName xmlName = new QName("", variableMapping.getXmlAttributeName().getStringValue().trim());
+ String attributeLocalName = variableMapping.getXmlAttributeName().getStringValue().trim();
+ QName xmlName = new QName("", attributeLocalName);
attributeDesc.setXmlName(xmlName);
-
- SchemaLocalAttribute attribute = (SchemaLocalAttribute) attNameToType.get(xmlName);
+
+ SchemaLocalAttribute attribute = (SchemaLocalAttribute) attNameToType.get(attributeLocalName);
if (null == attribute) {
- xmlName = new QName(ns, variableMapping.getXmlAttributeName().getStringValue().trim());
- attribute = (SchemaLocalAttribute) attNameToType.get(xmlName);
- if (null == attribute) {
- throw new DeploymentException("attribute " + xmlName + " not found in schema " + schemaType.getName());
- }
+ throw new DeploymentException("attribute " + xmlName + " not found in schema " + schemaType.getName());
}
attributeDesc.setXmlType(attribute.getType().getName());