You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2017/12/17 22:34:13 UTC
svn commit: r1818518 [2/30] - in /axis/axis2/java/core/branches/AXIS2-4091:
./ apidocs/ databinding-tests/ etc/ legal/ modules/adb-codegen/
modules/adb-codegen/src/org/apache/axis2/schema/
modules/adb-codegen/src/org/apache/axis2/schema/template/ modul...
Propchange: axis/axis2/java/core/branches/AXIS2-4091/
------------------------------------------------------------------------------
--- svn:auto-props (added)
+++ svn:auto-props Sun Dec 17 22:34:08 2017
@@ -0,0 +1,3 @@
+*.java = svn:eol-style=native
+*.xml = svn:eol-style=native
+*.md = svn:eol-style=native
Propchange: axis/axis2/java/core/branches/AXIS2-4091/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Dec 17 22:34:08 2017
@@ -3,5 +3,6 @@
*.iws
target
.metadata
+.project
.settings
debug
Propchange: axis/axis2/java/core/branches/AXIS2-4091/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 17 22:34:08 2017
@@ -1,4 +1,6 @@
/axis/axis2/java/core/branches/1_6:1295540
/axis/axis2/java/core/branches/AXIOM-420:1334386-1336397
/axis/axis2/java/core/branches/AXIS2-4318:1230452,1295542,1324772,1327468,1329571,1332141,1335355,1335357,1340985
-/axis/axis2/java/core/trunk:1441270-1536050
+/axis/axis2/java/core/branches/AXIS2-5785:1793298-1793391
+/axis/axis2/java/core/branches/google-java-format:1800516-1800554
+/axis/axis2/java/core/trunk:1441270-1818516
Modified: axis/axis2/java/core/branches/AXIS2-4091/etc/doap_Axis2.rdf
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/etc/doap_Axis2.rdf?rev=1818518&r1=1818517&r2=1818518&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/etc/doap_Axis2.rdf (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/etc/doap_Axis2.rdf Sun Dec 17 22:34:08 2017
@@ -62,7 +62,17 @@
<release><Version><name>Apache Axis2</name><created>2011-05-17</created><revision>1.6.0</revision></Version></release>
<release><Version><name>Apache Axis2</name><created>2011-08-30</created><revision>1.6.1</revision></Version></release>
<release><Version><name>Apache Axis2</name><created>2012-04-17</created><revision>1.6.2</revision></Version></release>
-
+ <release><Version><name>Apache Axis2</name><created>2015-06-27</created><revision>1.6.3</revision></Version></release>
+ <release><Version><name>Apache Axis2</name><created>2015-12-28</created><revision>1.6.4</revision></Version></release>
+ <release><Version><name>Apache Axis2</name><created>2016-01-18</created><revision>1.7.0</revision></Version></release>
+ <release><Version><name>Apache Axis2</name><created>2016-02-20</created><revision>1.7.1</revision></Version></release>
+ <release><Version><name>Apache Axis2</name><created>2016-05-02</created><revision>1.7.2</revision></Version></release>
+ <release><Version><name>Apache Axis2</name><created>2016-05-30</created><revision>1.7.3</revision></Version></release>
+ <release><Version><name>Apache Axis2</name><created>2016-10-21</created><revision>1.7.4</revision></Version></release>
+ <release><Version><name>Apache Axis2</name><created>2017-05-06</created><revision>1.7.5</revision></Version></release>
+ <release><Version><name>Apache Axis2</name><created>2017-07-30</created><revision>1.7.6</revision></Version></release>
+ <release><Version><name>Apache Axis2</name><created>2017-11-22</created><revision>1.7.7</revision></Version></release>
+
<repository>
<SVNRepository>
<location rdf:resource="http://svn.apache.org/repos/asf/axis/axis2/java/core/trunk/"/>
Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/pom.xml?rev=1818518&r1=1818517&r2=1818518&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/pom.xml (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/pom.xml Sun Dec 17 22:34:08 2017
@@ -23,9 +23,9 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.axis2</groupId>
- <artifactId>axis2-parent</artifactId>
- <version>1.7.0-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
+ <artifactId>axis2</artifactId>
+ <version>1.8.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>axis2-adb-codegen</artifactId>
<name>Apache Axis2 - ADB Codegen</name>
@@ -64,11 +64,6 @@
<artifactId>xmlunit</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-javamail_1.4_spec</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
<url>http://axis.apache.org/axis2/java/core/</url>
<scm>
@@ -115,29 +110,10 @@
<inherited>true</inherited>
<configuration>
<excludes>
- <exclude>**/*Abstract*.java</exclude>
- <exclude>**/*Util*.java</exclude>
- <exclude>**/*PhaseResolvingTest.java</exclude>
- <exclude>**/*UnionQNameTest.java</exclude>
- <exclude>**/*UnqualifiedTest.java</exclude>
+ <exclude>org/apache/axis2/schema/ExtensionUtilityTest.java</exclude>
</excludes>
- <includes>
- <include>**/*Test.java</include>
- </includes>
</configuration>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <fork>true</fork>
- <meminitial>128m</meminitial>
- <maxmem>256m</maxmem>
- <testExcludes>
- <exclude>helper/org/apache/axis2/schema/testsuite/TestAnyType*Helper.java</exclude>
- </testExcludes>
- </configuration>
- </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
@@ -163,47 +139,6 @@
<goal>run</goal>
</goals>
</execution>
- <execution>
- <id>generate-test-sources</id>
- <phase>generate-test-sources</phase>
- <configuration>
- <tasks unless="maven.test.skip">
- <property name="maven.junit.jvmargs" value="" />
- <path id="maven.dependency.classpath">
- <path refid="maven.compile.classpath" />
- </path>
- <property name="compiled.classes.dir" value="target/classes" />
- <!-- Theres got to be a better way to do this -->
- <property name="schema.source.dir" value="test-resources/xsd" />
- <property name="testsuite.source.dir" value="test-resources/testsuite" />
- <property name="schema.output.base.dir" value="target/schema" />
- <property name="schema.generated.src.dir" value="${schema.output.base.dir}/src" />
- <property name="schema.generated.classes.dir" value="${schema.output.base.dir}/classes" />
- <ant antfile="sub-build.xml" inheritall="true" inheritrefs="true" dir="." target="main" />
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-test-source</id>
- <phase>process-test-resources</phase>
- <goals>
- <goal>add-test-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${basedir}/target/schema/src</source>
- </sources>
- </configuration>
- </execution>
</executions>
</plugin>
</plugins>
Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/BeanWriterMetaInfoHolder.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/BeanWriterMetaInfoHolder.java?rev=1818518&r1=1818517&r2=1818518&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/BeanWriterMetaInfoHolder.java (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/BeanWriterMetaInfoHolder.java Sun Dec 17 22:34:08 2017
@@ -80,13 +80,13 @@ public class BeanWriterMetaInfoHolder {
protected String itemTypeClassName;
protected boolean isUnion;
protected boolean isList;
- protected boolean fixed = false;
protected boolean isParticleClass;
// keep whether this class has a partical class type variable
protected boolean hasParticleType;
protected List<QName> nillableQNameList = new ArrayList<QName>();
+ protected List<QName> fixedQNameList = new ArrayList<QName>();
//the parent metainfo holder, useful in handling extensions and
//restrictions
@@ -316,6 +316,25 @@ public class BeanWriterMetaInfoHolder {
}
/**
+ * Registers a Qname as fixed
+ * The qName better be of an element
+ *
+ * @param eltQName
+ */
+ public void registerFixedQName(QName eltQName) {
+ fixedQNameList.add(eltQName);
+ }
+
+ /**
+ * Returns whether a QName is fixed or not
+ *
+ * @param eltQName
+ */
+ public boolean isFixed(QName eltQName) {
+ return fixedQNameList.contains(eltQName);
+ }
+
+ /**
* Registers a mapping.
*
* @param qName
@@ -944,14 +963,6 @@ public class BeanWriterMetaInfoHolder {
return restrictionBaseType;
}
- public boolean isFixed() {
- return fixed;
- }
-
- public void setFixed(boolean fixed) {
- this.fixed = fixed;
- }
-
@Override
public String toString() {
return "BeanWriterMetaInfoHolder [anonymous=" + anonymous + ", choice=" + choice
@@ -975,7 +986,7 @@ public class BeanWriterMetaInfoHolder {
+ restrictionBaseType + ", restrictionClassName=" + restrictionClassName
+ ", simple=" + simple + ", specialTypeFlagMap=" + specialTypeFlagMap
+ ", totalDigitsFacet=" + totalDigitsFacet + ", xmlNameJavaNameMap="
- + xmlNameJavaNameMap + ", xmlNameJavaNameMap=" + fixed + "]";
+ + xmlNameJavaNameMap + ", fixedQNameList=" + fixedQNameList + "]";
}
}
Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java?rev=1818518&r1=1818517&r2=1818518&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java Sun Dec 17 22:34:08 2017
@@ -29,60 +29,15 @@ import org.apache.axis2.util.SchemaUtil;
import org.apache.axis2.util.URLProcessor;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.ws.commons.schema.XmlSchema;
-import org.apache.ws.commons.schema.XmlSchemaAll;
-import org.apache.ws.commons.schema.XmlSchemaAny;
-import org.apache.ws.commons.schema.XmlSchemaAnyAttribute;
-import org.apache.ws.commons.schema.XmlSchemaAttribute;
-import org.apache.ws.commons.schema.XmlSchemaAttributeGroup;
-import org.apache.ws.commons.schema.XmlSchemaAttributeGroupMember;
-import org.apache.ws.commons.schema.XmlSchemaAttributeGroupRef;
-import org.apache.ws.commons.schema.XmlSchemaAttributeOrGroupRef;
-import org.apache.ws.commons.schema.XmlSchemaChoice;
-import org.apache.ws.commons.schema.XmlSchemaCollection;
-import org.apache.ws.commons.schema.XmlSchemaComplexContent;
-import org.apache.ws.commons.schema.XmlSchemaComplexContentExtension;
-import org.apache.ws.commons.schema.XmlSchemaComplexContentRestriction;
-import org.apache.ws.commons.schema.XmlSchemaComplexType;
-import org.apache.ws.commons.schema.XmlSchemaContent;
-import org.apache.ws.commons.schema.XmlSchemaContentModel;
-import org.apache.ws.commons.schema.XmlSchemaElement;
-import org.apache.ws.commons.schema.XmlSchemaEnumerationFacet;
-import org.apache.ws.commons.schema.XmlSchemaExternal;
-import org.apache.ws.commons.schema.XmlSchemaFacet;
-import org.apache.ws.commons.schema.XmlSchemaGroup;
-import org.apache.ws.commons.schema.XmlSchemaGroupParticle;
-import org.apache.ws.commons.schema.XmlSchemaGroupRef;
-import org.apache.ws.commons.schema.XmlSchemaImport;
-import org.apache.ws.commons.schema.XmlSchemaInclude;
-import org.apache.ws.commons.schema.XmlSchemaLengthFacet;
-import org.apache.ws.commons.schema.XmlSchemaMaxExclusiveFacet;
-import org.apache.ws.commons.schema.XmlSchemaMaxInclusiveFacet;
-import org.apache.ws.commons.schema.XmlSchemaMaxLengthFacet;
-import org.apache.ws.commons.schema.XmlSchemaMinExclusiveFacet;
-import org.apache.ws.commons.schema.XmlSchemaMinInclusiveFacet;
-import org.apache.ws.commons.schema.XmlSchemaMinLengthFacet;
-import org.apache.ws.commons.schema.XmlSchemaObject;
-import org.apache.ws.commons.schema.XmlSchemaParticle;
-import org.apache.ws.commons.schema.XmlSchemaPatternFacet;
-import org.apache.ws.commons.schema.XmlSchemaSequence;
-import org.apache.ws.commons.schema.XmlSchemaSequenceMember;
-import org.apache.ws.commons.schema.XmlSchemaSimpleContent;
-import org.apache.ws.commons.schema.XmlSchemaSimpleContentExtension;
-import org.apache.ws.commons.schema.XmlSchemaSimpleContentRestriction;
-import org.apache.ws.commons.schema.XmlSchemaSimpleType;
-import org.apache.ws.commons.schema.XmlSchemaSimpleTypeContent;
-import org.apache.ws.commons.schema.XmlSchemaSimpleTypeList;
-import org.apache.ws.commons.schema.XmlSchemaSimpleTypeRestriction;
-import org.apache.ws.commons.schema.XmlSchemaSimpleTypeUnion;
-import org.apache.ws.commons.schema.XmlSchemaTotalDigitsFacet;
-import org.apache.ws.commons.schema.XmlSchemaType;
+import org.apache.ws.commons.schema.*;
+import org.apache.ws.commons.schema.utils.XmlSchemaObjectBase;
import org.xml.sax.InputSource;
import javax.xml.namespace.QName;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.IdentityHashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -111,7 +66,9 @@ public class SchemaCompiler {
//the list of processedElements for the outer elements
private HashMap<QName, String> processedElementMap;
- private HashMap<XmlSchemaElement, BeanWriterMetaInfoHolder> processedAnonymousComplexTypesMap;
+ //need to use IdentityHashMap to store processedAnonymousComplexTypes
+ //because the key used with the map, XmlSchemaElement, is not immutable
+ private IdentityHashMap<XmlSchemaElement, BeanWriterMetaInfoHolder> processedAnonymousComplexTypesMap;
//we need this map to keep the referenced elements. these elements need to be kept seperate
//to avoid conflicts
@@ -211,7 +168,7 @@ public class SchemaCompiler {
processedElementMap = new HashMap<QName, String>();
simpleTypesMap = new HashMap<QName, String>();
processedElementList = new ArrayList<QName>();
- processedAnonymousComplexTypesMap = new HashMap<XmlSchemaElement, BeanWriterMetaInfoHolder>();
+ processedAnonymousComplexTypesMap = new IdentityHashMap<XmlSchemaElement, BeanWriterMetaInfoHolder>();
changedTypeMap = new HashMap<QName, QName>();
processedTypeMetaInfoMap = new HashMap<QName, BeanWriterMetaInfoHolder>();
processedElementRefMap = new HashMap<QName, String>();
@@ -227,10 +184,6 @@ public class SchemaCompiler {
//load the base types
baseSchemaTypeMap = SchemaPropertyLoader.getTypeMapperInstance().getTypeMap();
- // adding all the soap encoding schema classes
- processedTypemap.putAll(SchemaPropertyLoader.getTypeMapperInstance().getSoapEncodingTypesMap());
-
-
}
/**
@@ -546,7 +499,7 @@ public class SchemaCompiler {
// register the fixed value if present
if (xsElt.getFixedValue() != null) {
metainf.registerDefaultValue(xsElt.getQName(), xsElt.getFixedValue());
- metainf.setFixed(true);
+ metainf.registerFixedQName(xsElt.getQName());
}
if (isBinary(xsElt)) {
@@ -662,7 +615,7 @@ public class SchemaCompiler {
String className = findClassName(schemaType.getQName(),
isArray(xsElt));
- innerElementMap.put(xsElt.getQName(), className);
+ innerElementMap.put(xsElt.getWireName(), className);
// always store the class name in the element meta Info itself
// this details only needed by the unwrappig to set the complex type
@@ -685,7 +638,7 @@ public class SchemaCompiler {
//the anon map. we've to write it just like we treat a referenced type(giving due
//care that this is meant to be an attribute in some class)
- QName generatedTypeName = generateTypeQName(xsElt.getQName(), parentSchema);
+ QName generatedTypeName = generateTypeQName(xsElt.getWireName(), parentSchema);
if (schemaType instanceof XmlSchemaComplexType) {
//set a name
@@ -707,7 +660,7 @@ public class SchemaCompiler {
processedAnonymousComplexTypesMap.remove(xsElt);
String className = findClassName(schemaType.getQName(), isArray(xsElt));
innerElementMap.put(
- xsElt.getQName(),
+ xsElt.getWireName(),
className);
//store in the schema map to retrive in the unwrapping
@@ -734,7 +687,7 @@ public class SchemaCompiler {
processedAnonymousComplexTypesMap.remove(xsElt);
String className = findClassName(schemaType.getQName(), isArray(xsElt));
innerElementMap.put(
- xsElt.getQName(),
+ xsElt.getWireName(),
className);
//store in the schema map
@@ -875,7 +828,7 @@ public class SchemaCompiler {
if (!isOuter) {
String className = findClassName(schemaTypeName, isArray(xsElt));
//since this is a inner element we should add it to the inner element map
- innerElementMap.put(xsElt.getQName(), className);
+ innerElementMap.put(xsElt.getWireName(), className);
// set the class name to be used in unwrapping
xsElt.addMetaInfo(SchemaConstants.SchemaCompilerInfoHolder.CLASSNAME_KEY,
className);
@@ -886,7 +839,7 @@ public class SchemaCompiler {
//this type is not found at all. we'll just register it with whatever the class name we can comeup with
if (!isOuter) {
String className = findClassName(schemaTypeName, isArray(xsElt));
- innerElementMap.put(xsElt.getQName(), className);
+ innerElementMap.put(xsElt.getWireName(), className);
// set the class name to be used in unwrapping
xsElt.addMetaInfo(SchemaConstants.SchemaCompilerInfoHolder.CLASSNAME_KEY,
className);
@@ -901,7 +854,7 @@ public class SchemaCompiler {
if (isOuter) {
this.nillableElementList.add(xsElt.getQName());
} else {
- localNillableList.add(xsElt.getQName());
+ localNillableList.add(xsElt.getWireName());
}
}
@@ -1880,17 +1833,17 @@ public class SchemaCompiler {
QName schemaTypeName = att.getSchemaTypeName();
if (schemaTypeName != null) {
- if (att.getQName() != null) {
+ if (att.getWireName() != null) {
if (baseSchemaTypeMap.containsKey(schemaTypeName)) {
- metainf.registerMapping(att.getQName(), schemaTypeName,
+ metainf.registerMapping(att.getWireName(), schemaTypeName,
baseSchemaTypeMap.get(schemaTypeName).toString(),
SchemaConstants.ATTRIBUTE_TYPE);
// add optional attribute status if set
String use = att.getUse().toString();
if (USE_NONE.equals(use) || USE_OPTIONAL.equals(use)) {
- metainf.addtStatus(att.getQName(), SchemaConstants.OPTIONAL_TYPE);
+ metainf.addtStatus(att.getWireName(), SchemaConstants.OPTIONAL_TYPE);
}
String className = findClassName(schemaTypeName, false);
@@ -1900,11 +1853,11 @@ public class SchemaCompiler {
className);
// set the default value
if (att.getDefaultValue() != null) {
- metainf.registerDefaultValue(att.getQName(), att.getDefaultValue());
+ metainf.registerDefaultValue(att.getWireName(), att.getDefaultValue());
}
if (att.getFixedValue() != null) {
- metainf.registerDefaultValue(att.getQName(), att.getFixedValue());
- metainf.setFixed(true);
+ metainf.registerDefaultValue(att.getWireName(), att.getFixedValue());
+ metainf.registerFixedQName(att.getWireName());
}
// after
} else {
@@ -1925,14 +1878,14 @@ public class SchemaCompiler {
//process simple type
processSimpleSchemaType(simpleType, null, resolvedSchema, null);
}
- metainf.registerMapping(att.getQName(),
+ metainf.registerMapping(att.getWireName(),
schemaTypeName,
processedTypemap.get(schemaTypeName).toString(),
SchemaConstants.ATTRIBUTE_TYPE);
// add optional attribute status if set
String use = att.getUse().toString();
if (USE_NONE.equals(use) || USE_OPTIONAL.equals(use)) {
- metainf.addtStatus(att.getQName(), SchemaConstants.OPTIONAL_TYPE);
+ metainf.addtStatus(att.getWireName(), SchemaConstants.OPTIONAL_TYPE);
}
}
@@ -1967,7 +1920,7 @@ public class SchemaCompiler {
} else {
// this attribute refers to a custom type, probably one of the extended simple types.
// with the inline schema definition
- QName attributeQName = att.getQName();
+ QName attributeQName = att.getWireName();
if (attributeQName != null) {
XmlSchemaSimpleType attributeSimpleType = att.getSchemaType();
XmlSchema resolvedSchema = parentSchema;
@@ -2007,14 +1960,14 @@ public class SchemaCompiler {
processSimpleSchemaType(attributeSimpleType, null, resolvedSchema,
schemaTypeQName);
}
- metainf.registerMapping(att.getQName(),
+ metainf.registerMapping(att.getWireName(),
schemaTypeQName,
processedTypemap.get(schemaTypeQName).toString(),
SchemaConstants.ATTRIBUTE_TYPE);
// add optional attribute status if set
String use = att.getUse().toString();
if (USE_NONE.equals(use) || USE_OPTIONAL.equals(use)) {
- metainf.addtStatus(att.getQName(), SchemaConstants.OPTIONAL_TYPE);
+ metainf.addtStatus(att.getWireName(), SchemaConstants.OPTIONAL_TYPE);
}
} else {
// TODO: handle the case when no attribute type specifed
@@ -2080,11 +2033,11 @@ public class SchemaCompiler {
}
} else if (particle instanceof XmlSchemaAll) {
- List<XmlSchemaElement> items = ((XmlSchemaAll) particle).getItems();
+ List<XmlSchemaAllMember> items = ((XmlSchemaAll) particle).getItems();
processSchemaAllItems(parentElementQName, items, metainfHolder, false, parentSchema);
} else if (particle instanceof XmlSchemaChoice) {
XmlSchemaChoice xmlSchemaChoice = (XmlSchemaChoice) particle;
- List<XmlSchemaObject> items = ((XmlSchemaChoice) particle).getItems();
+ List<XmlSchemaChoiceMember> items = ((XmlSchemaChoice) particle).getItems();
if ((xmlSchemaChoice.getMaxOccurs() > 1)) {
// we have to process many sequence types
@@ -2173,18 +2126,18 @@ public class SchemaCompiler {
boolean order,
XmlSchema parentSchema) throws SchemaCompilationException {
- Map<XmlSchemaObject, Boolean> processedElementArrayStatusMap =
- new LinkedHashMap<XmlSchemaObject, Boolean>();
+ Map<XmlSchemaObjectBase, Boolean> processedElementArrayStatusMap =
+ new LinkedHashMap<XmlSchemaObjectBase, Boolean>();
Map processedElementTypeMap = new LinkedHashMap(); // TODO: not sure what is the correct generic type here
List<QName> localNillableList = new ArrayList<QName>();
- Map<XmlSchemaObject, QName> particleQNameMap = new HashMap<XmlSchemaObject, QName>();
+ Map<XmlSchemaObjectBase, QName> particleQNameMap = new HashMap<XmlSchemaObjectBase, QName>();
// this list is used to keep the details of the
// elements within a choice withing sequence
List<QName> innerChoiceElementList = new ArrayList<QName>();
- Map<XmlSchemaObject, Integer> elementOrderMap = new HashMap<XmlSchemaObject, Integer>();
+ Map<XmlSchemaObjectBase, Integer> elementOrderMap = new HashMap<XmlSchemaObjectBase, Integer>();
int sequenceCounter = 0;
for (XmlSchemaSequenceMember member : items) {
@@ -2202,26 +2155,26 @@ public class SchemaCompiler {
}
private void processChoiceItems(QName parentElementQName,
- List<XmlSchemaObject> items,
+ List<XmlSchemaChoiceMember> items,
BeanWriterMetaInfoHolder metainfHolder,
boolean order,
XmlSchema parentSchema) throws SchemaCompilationException {
- Map<XmlSchemaObject, Boolean> processedElementArrayStatusMap =
- new LinkedHashMap<XmlSchemaObject, Boolean>();
+ Map<XmlSchemaObjectBase, Boolean> processedElementArrayStatusMap =
+ new LinkedHashMap<XmlSchemaObjectBase, Boolean>();
Map processedElementTypeMap = new LinkedHashMap(); // TODO: not sure what is the correct generic type here
List<QName> localNillableList = new ArrayList<QName>();
- Map<XmlSchemaObject, QName> particleQNameMap = new HashMap<XmlSchemaObject, QName>();
+ Map<XmlSchemaObjectBase, QName> particleQNameMap = new HashMap<XmlSchemaObjectBase, QName>();
// this list is used to keep the details of the
// elements within a choice withing sequence
List<QName> innerChoiceElementList = new ArrayList<QName>();
- Map<XmlSchemaObject, Integer> elementOrderMap = new HashMap<XmlSchemaObject, Integer>();
+ Map<XmlSchemaObjectBase, Integer> elementOrderMap = new HashMap<XmlSchemaObjectBase, Integer>();
int sequenceCounter = 0;
- for (XmlSchemaObject item : items) {
+ for (XmlSchemaChoiceMember item : items) {
//recursively process the element
processElements(parentElementQName, item, processedElementArrayStatusMap,
processedElementTypeMap, elementOrderMap, localNillableList,
@@ -2236,26 +2189,26 @@ public class SchemaCompiler {
private void processSchemaAllItems(QName parentElementQName,
- List<XmlSchemaElement> items,
+ List<XmlSchemaAllMember> items,
BeanWriterMetaInfoHolder metainfHolder,
boolean order,
XmlSchema parentSchema) throws SchemaCompilationException {
- Map<XmlSchemaObject, Boolean> processedElementArrayStatusMap =
- new LinkedHashMap<XmlSchemaObject, Boolean>();
+ Map<XmlSchemaObjectBase, Boolean> processedElementArrayStatusMap =
+ new LinkedHashMap<XmlSchemaObjectBase, Boolean>();
Map processedElementTypeMap = new LinkedHashMap(); // TODO: not sure what is the correct generic type here
List<QName> localNillableList = new ArrayList<QName>();
- Map<XmlSchemaObject, QName> particleQNameMap = new HashMap<XmlSchemaObject, QName>();
+ Map<XmlSchemaObjectBase, QName> particleQNameMap = new HashMap<XmlSchemaObjectBase, QName>();
// this list is used to keep the details of the
// elements within a choice withing sequence
List<QName> innerChoiceElementList = new ArrayList<QName>();
- Map<XmlSchemaObject, Integer> elementOrderMap = new HashMap<XmlSchemaObject, Integer>();
+ Map<XmlSchemaObjectBase, Integer> elementOrderMap = new HashMap<XmlSchemaObjectBase, Integer>();
int sequenceCounter = 0;
- for (XmlSchemaObject item : items) {
+ for (XmlSchemaAllMember item : items) {
//recursively process the element
processElements(parentElementQName, item, processedElementArrayStatusMap,
processedElementTypeMap, elementOrderMap, localNillableList,
@@ -2270,31 +2223,31 @@ public class SchemaCompiler {
private void addProcessedItemsToMetaInfoHolder(
- Map<XmlSchemaObject, Boolean> processedElementArrayStatusMap,
+ Map<XmlSchemaObjectBase, Boolean> processedElementArrayStatusMap,
Map processedElementTypeMap,
List<QName> innerChoiceElementList,
- Map<XmlSchemaObject, Integer> elementOrderMap,
+ Map<XmlSchemaObjectBase, Integer> elementOrderMap,
List<QName> localNillableList,
- Map<XmlSchemaObject, QName> particleQNameMap,
+ Map<XmlSchemaObjectBase, QName> particleQNameMap,
BeanWriterMetaInfoHolder metainfHolder,
boolean order,
XmlSchema parentSchema) throws SchemaCompilationException {
// loop through the processed items and add them to the matainf object
int startingItemNumberOrder = metainfHolder.getOrderStartPoint();
- for (XmlSchemaObject child : processedElementArrayStatusMap.keySet()) {
+ for (XmlSchemaObjectBase child : processedElementArrayStatusMap.keySet()) {
// process the XmlSchemaElement
if (child instanceof XmlSchemaElement) {
XmlSchemaElement elt = (XmlSchemaElement) child;
QName referencedQName = null;
- if (elt.getQName() != null) {
- referencedQName = elt.getQName();
+ if (elt.getWireName() != null) {
+ referencedQName = elt.getWireName();
QName schemaTypeQName = elt.getSchemaType() != null ?
elt.getSchemaType().getQName() : elt.getSchemaTypeName();
if (schemaTypeQName != null) {
- String clazzName = (String) processedElementTypeMap.get(elt.getQName());
+ String clazzName = (String) processedElementTypeMap.get(elt.getWireName());
metainfHolder.registerMapping(referencedQName,
schemaTypeQName,
clazzName,
@@ -2312,7 +2265,7 @@ public class SchemaCompiler {
// register the default value as well
if (elt.getFixedValue() != null) {
metainfHolder.registerDefaultValue(referencedQName, elt.getFixedValue());
- metainfHolder.setFixed(true);
+ metainfHolder.registerFixedQName(referencedQName);
}
}
}
@@ -2380,13 +2333,13 @@ public class SchemaCompiler {
}
//get the nillable state and register that on the metainf holder
- if (localNillableList.contains(elt.getQName())) {
- metainfHolder.registerNillableQName(elt.getQName());
+ if (localNillableList.contains(elt.getWireName())) {
+ metainfHolder.registerNillableQName(elt.getWireName());
}
//get the binary state and add that to the status map
if (isBinary(elt)) {
- metainfHolder.addtStatus(elt.getQName(),
+ metainfHolder.addtStatus(elt.getWireName(),
SchemaConstants.BINARY_TYPE);
}
// process the XMLSchemaAny
@@ -2500,12 +2453,12 @@ public class SchemaCompiler {
}
- private void processElements(QName parentElementQName, XmlSchemaObject item,
- Map<XmlSchemaObject, Boolean> processedElementArrayStatusMap,
+ private void processElements(QName parentElementQName, XmlSchemaObjectBase item,
+ Map<XmlSchemaObjectBase, Boolean> processedElementArrayStatusMap,
Map processedElementTypeMap,
- Map<XmlSchemaObject, Integer> elementOrderMap,
+ Map<XmlSchemaObjectBase, Integer> elementOrderMap,
List<QName> localNillableList,
- Map<XmlSchemaObject, QName> particleQNameMap,
+ Map<XmlSchemaObjectBase, QName> particleQNameMap,
boolean order, int sequenceCounter,
XmlSchema parentSchema) throws SchemaCompilationException {
Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl?rev=1818518&r1=1818517&r2=1818518&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl Sun Dec 17 22:34:08 2017
@@ -1811,16 +1811,17 @@
</xsl:choose>
// handle unexpected enumeration values properly
- <xsl:if test="$ignoreunexpected">
- log.warn("Unexpected value " + value + " for enumeration <xsl:value-of select="$name"/>");
- return enumeration;
- </xsl:if>
- <xsl:if test="not($ignoreunexpected)">
- if (enumeration == null <xsl:if test="$propertyType='string'">&& !((value == null) || (value.equals("")))</xsl:if>) {
- throw new java.lang.IllegalArgumentException();
- }
- return enumeration;
- </xsl:if>
+ if (enumeration == null <xsl:if test="$propertyType='string'">&& !((value == null) || (value.equals("")))</xsl:if>) {
+ <xsl:choose>
+ <xsl:when test="$ignoreunexpected">
+ log.warn("Unexpected value " + value + " for enumeration <xsl:value-of select="$name"/>");
+ </xsl:when>
+ <xsl:otherwise>
+ throw new java.lang.IllegalArgumentException();
+ </xsl:otherwise>
+ </xsl:choose>
+ }
+ return enumeration;
}
public static <xsl:value-of select="$name"/> fromString(java.lang.String value,java.lang.String namespaceURI)
throws java.lang.IllegalArgumentException {
@@ -2155,14 +2156,12 @@
<xsl:variable name="loopBoolName">loopDone<xsl:value-of select="position()"/></xsl:variable>
<xsl:variable name="startQname">startQname<xsl:value-of select="position()"/></xsl:variable>
<xsl:variable name="stateMachineName">stateMachine<xsl:value-of select="position()"/></xsl:variable>
- <xsl:variable name="builderName">builder<xsl:value-of select="position()"/></xsl:variable>
<xsl:variable name="basePropertyType"><xsl:value-of select="@arrayBaseType"/></xsl:variable>
<xsl:variable name="namespace"><xsl:value-of select="@nsuri"/></xsl:variable>
<xsl:variable name="min"><xsl:value-of select="@minOccurs"/></xsl:variable>
<xsl:variable name="particleClassType" select="@particleClassType"></xsl:variable>
<xsl:variable name="propQName">new javax.xml.namespace.QName("<xsl:value-of select="$namespace"/>","<xsl:value-of select="$propertyName"/>")</xsl:variable>
- <xsl:variable name="propQName2">new javax.xml.namespace.QName("","<xsl:value-of select="$propertyName"/>")</xsl:variable>
<xsl:choose>
<xsl:when test="$unordered and not($choice and $hasParticleType)"> <!-- One property per iteration if unordered -->
@@ -2187,7 +2186,7 @@
we have to sollow an excpetions : todo find a better solsution-->
try{
</xsl:if>
- if (reader.isStartElement() <xsl:if test="$simple"> || reader.hasText()</xsl:if> <xsl:if test="not($simple) and not($particleClassType)">&& <xsl:value-of select="$propQName"/>.equals(reader.getName()) || <xsl:value-of select="$propQName2"/>.equals(reader.getName()) </xsl:if>){
+ if (reader.isStartElement() <xsl:if test="$simple"> || reader.hasText()</xsl:if> <xsl:if test="not($simple) and not($particleClassType)">&& <xsl:value-of select="$propQName"/>.equals(reader.getName())</xsl:if>){
</xsl:otherwise>
</xsl:choose>
@@ -2310,14 +2309,7 @@
while (!<xsl:value-of select="$loopBoolName"/>){
event = reader.getEventType();
if (javax.xml.stream.XMLStreamConstants.START_ELEMENT == event){
-
- // We need to wrap the reader so that it produces a fake START_DOCUEMENT event
- org.apache.axis2.databinding.utils.NamedStaxOMBuilder <xsl:value-of select="$builderName"/>
- = new org.apache.axis2.databinding.utils.NamedStaxOMBuilder(
- new org.apache.axis2.util.StreamWrapper(reader), reader.getName());
-
- <xsl:value-of select="$listName"/>.add(<xsl:value-of select="$builderName"/>.getOMElement());
- reader.next();
+ <xsl:value-of select="$listName"/>.add(org.apache.axis2.databinding.utils.FactoryUtil.extractElement(reader, true));
if (reader.isEndElement()) {
// we have two countinuos end elements
<xsl:value-of select="$loopBoolName"/> = true;
@@ -2474,12 +2466,7 @@
}else{
</xsl:if>
- // We need to wrap the reader so that it produces a fake START_DOCUEMENT event
- org.apache.axis2.databinding.utils.NamedStaxOMBuilder <xsl:value-of select="$builderName"/>
- = new org.apache.axis2.databinding.utils.NamedStaxOMBuilder(
- new org.apache.axis2.util.StreamWrapper(reader), <xsl:value-of select="$startQname"/>);
-
- <xsl:value-of select="$listName"/>.add(<xsl:value-of select="$builderName"/>.getOMElement().getFirstElement());
+ <xsl:value-of select="$listName"/>.add(org.apache.axis2.databinding.utils.FactoryUtil.extractElement(reader, false).getFirstElement());
<xsl:if test="@nillable">}</xsl:if>
} else if (javax.xml.stream.XMLStreamConstants.START_ELEMENT == event &&
!<xsl:value-of select="$startQname"/>.equals(reader.getName())){
@@ -2643,16 +2630,8 @@
<xsl:when test="@any">
<!--No concerns of being nillable here. if it's ours and if the nillable attribute was present
we would have outputted a null already-->
- <!--This can be any element and we may not know the name. so we pick the name of the element from the parser-->
- //use the QName from the parser as the name for the builder
- javax.xml.namespace.QName <xsl:value-of select="$startQname"/> = reader.getName();
-
- // We need to wrap the reader so that it produces a fake START_DOCUMENT event
- // this is needed by the builder classes
- org.apache.axis2.databinding.utils.NamedStaxOMBuilder <xsl:value-of select="$builderName"/> =
- new org.apache.axis2.databinding.utils.NamedStaxOMBuilder(
- new org.apache.axis2.util.StreamWrapper(reader),<xsl:value-of select="$startQname"/>);
- object.set<xsl:value-of select="$javaName"/>(<xsl:value-of select="$builderName"/>.getOMElement());
+
+ object.set<xsl:value-of select="$javaName"/>(org.apache.axis2.databinding.utils.FactoryUtil.extractElement(reader, false));
<xsl:if test="$isType or $anon"> <!-- This is a subelement property to be consumed -->
reader.next();
</xsl:if>
Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-helpermode.xsl
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-helpermode.xsl?rev=1818518&r1=1818517&r2=1818518&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-helpermode.xsl (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-helpermode.xsl Sun Dec 17 22:34:08 2017
@@ -1269,7 +1269,6 @@ public <xsl:if test="not(@unwrapped) or
<xsl:variable name="loopBoolName">loopDone<xsl:value-of select="position()"/></xsl:variable>
<xsl:variable name="startQname">startQname<xsl:value-of select="position()"/></xsl:variable>
<xsl:variable name="stateMachineName">stateMachine<xsl:value-of select="position()"/></xsl:variable>
- <xsl:variable name="builderName">builder<xsl:value-of select="position()"/></xsl:variable>
<xsl:variable name="basePropertyType"><xsl:value-of select="@arrayBaseType"/></xsl:variable>
<xsl:variable name="namespace"><xsl:value-of select="@nsuri"/></xsl:variable>
<xsl:variable name="min"><xsl:value-of select="@minOccurs"/></xsl:variable>
@@ -1370,13 +1369,7 @@ public <xsl:if test="not(@unwrapped) or
event = reader.getEventType();
if (javax.xml.stream.XMLStreamConstants.START_ELEMENT == event){
- // We need to wrap the reader so that it produces a fake START_DOCUEMENT event
- org.apache.axis2.databinding.utils.NamedStaxOMBuilder <xsl:value-of select="$builderName"/>
- = new org.apache.axis2.databinding.utils.NamedStaxOMBuilder(
- new org.apache.axis2.util.StreamWrapper(reader), reader.getName());
-
- <xsl:value-of select="$listName"/>.add(<xsl:value-of select="$builderName"/>.getOMElement());
- reader.next();
+ <xsl:value-of select="$listName"/>.add(org.apache.axis2.databinding.utils.FactoryUtil.extractElement(reader, true));
if (reader.isEndElement()) {
// we have two countinuos end elements
<xsl:value-of select="$loopBoolName"/> = true;
@@ -1424,13 +1417,7 @@ public <xsl:if test="not(@unwrapped) or
reader.next();
}else{
</xsl:if>
- // we parse it as an omElement
- // We need to wrap the reader so that it produces a fake START_DOCUEMENT event
- // this is needed by the builder classes
- org.apache.axis2.databinding.utils.NamedStaxOMBuilder <xsl:value-of select="$builderName"/> =
- new org.apache.axis2.databinding.utils.NamedStaxOMBuilder(
- new org.apache.axis2.util.StreamWrapper(reader),<xsl:value-of select="$startQname"/>);
- <xsl:value-of select="$listName"/>.add(<xsl:value-of select="$builderName"/>.getOMElement().getFirstElement());
+ <xsl:value-of select="$listName"/>.add(org.apache.axis2.databinding.utils.FactoryUtil.extractElement(reader, false).getFirstElement());
<xsl:if test="@nillable">}</xsl:if>
} else if (javax.xml.stream.XMLStreamConstants.START_ELEMENT == event &&
!<xsl:value-of select="$startQname"/>.equals(reader.getName())){
@@ -1540,12 +1527,7 @@ public <xsl:if test="not(@unwrapped) or
}else{
</xsl:if>
- // We need to wrap the reader so that it produces a fake START_DOCUEMENT event
- org.apache.axis2.databinding.utils.NamedStaxOMBuilder <xsl:value-of select="$builderName"/>
- = new org.apache.axis2.databinding.utils.NamedStaxOMBuilder(
- new org.apache.axis2.util.StreamWrapper(reader), <xsl:value-of select="$startQname"/>);
-
- <xsl:value-of select="$listName"/>.add(<xsl:value-of select="$builderName"/>.getOMElement().getFirstElement());
+ <xsl:value-of select="$listName"/>.add(org.apache.axis2.databinding.utils.FactoryUtil.extractElement(reader, false).getFirstElement());
<xsl:if test="@nillable">}</xsl:if>
} else if (javax.xml.stream.XMLStreamConstants.START_ELEMENT == event &&
!<xsl:value-of select="$startQname"/>.equals(reader.getName())){
@@ -1654,16 +1636,8 @@ public <xsl:if test="not(@unwrapped) or
<xsl:when test="@any">
<!--No concerns of being nillable here. if it's ours and if the nillable attribute was present
we would have outputted a null already-->
- <!--This can be any element and we may not know the name. so we pick the name of the element from the parser-->
- //use the QName from the parser as the name for the builder
- javax.xml.namespace.QName <xsl:value-of select="$startQname"/> = reader.getName();
-
- // We need to wrap the reader so that it produces a fake START_DOCUMENT event
- // this is needed by the builder classes
- org.apache.axis2.databinding.utils.NamedStaxOMBuilder <xsl:value-of select="$builderName"/> =
- new org.apache.axis2.databinding.utils.NamedStaxOMBuilder(
- new org.apache.axis2.util.StreamWrapper(reader),<xsl:value-of select="$startQname"/>);
- object.set<xsl:value-of select="$javaName"/>(<xsl:value-of select="$builderName"/>.getOMElement());
+
+ object.set<xsl:value-of select="$javaName"/>(org.apache.axis2.databinding.utils.FactoryUtil.extractElement(reader, false));
<xsl:if test="$isType or $anon"> <!-- This is a subelement property to be consumed -->
reader.next();
</xsl:if>
@@ -1684,13 +1658,7 @@ public <xsl:if test="not(@unwrapped) or
}
}
- <!-- todo put the code here for nillable -->
- // We need to wrap the reader so that it produces a fake START_DOCUEMENT event
- // this is needed by the builder classes
- org.apache.axis2.databinding.utils.NamedStaxOMBuilder <xsl:value-of select="$builderName"/> =
- new org.apache.axis2.databinding.utils.NamedStaxOMBuilder(
- new org.apache.axis2.util.StreamWrapper(reader),<xsl:value-of select="$startQname"/>);
- object.set<xsl:value-of select="$javaName"/>(<xsl:value-of select="$builderName"/>.getOMElement().getFirstElement());
+ object.set<xsl:value-of select="$javaName"/>(org.apache.axis2.databinding.utils.FactoryUtil.extractElement(reader, false).getFirstElement());
<xsl:if test="$isType or $anon"> <!-- This is a subelement property to be consumed -->
reader.next();
</xsl:if>
Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl?rev=1818518&r1=1818517&r2=1818518&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl Sun Dec 17 22:34:08 2017
@@ -405,14 +405,18 @@
<xsl:if test="not(@type=preceding-sibling::param/@type)">
if (<xsl:value-of select="@type"/>.class.equals(type)){
<xsl:choose>
- <xsl:when test="$helpermode">
- return <xsl:value-of select="@type"/>Helper.INSTANCE.parse(param.getXMLStreamReaderWithoutCaching());
- </xsl:when>
<xsl:when test="@type = 'org.apache.axiom.om.OMElement'">
return param;
</xsl:when>
<xsl:otherwise>
- return <xsl:value-of select="@type"/>.Factory.parse(param.getXMLStreamReaderWithoutCaching());
+ javax.xml.stream.XMLStreamReader reader = param.getXMLStreamReaderWithoutCaching();
+ java.lang.Object result =
+ <xsl:choose>
+ <xsl:when test="$helpermode"><xsl:value-of select="@type"/>Helper.INSTANCE.parse(reader);</xsl:when>
+ <xsl:otherwise><xsl:value-of select="@type"/>.Factory.parse(reader);</xsl:otherwise>
+ </xsl:choose>
+ reader.close();
+ return result;
</xsl:otherwise>
</xsl:choose>
Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/typemap/CTypeMap.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/typemap/CTypeMap.java?rev=1818518&r1=1818517&r2=1818518&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/typemap/CTypeMap.java (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/typemap/CTypeMap.java Sun Dec 17 22:34:08 2017
@@ -171,105 +171,4 @@ public class CTypeMap implements TypeMap
private static void addTypemapping(QName name, String str) {
CTypeMap.typeMap.put(name, str);
}
-
- // Type map for the soap encoding types
- public Map getSoapEncodingTypesMap() {
- return soapEncodingTypeMap;
- }
-
- private static Map soapEncodingTypeMap = new HashMap();
-
- static {
- // populate the soapEncodingTypeMap
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_ARRAY,
- "axutil_array_list_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_STRUCT,
- "axiom_node_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_BASE64,
- "axutil_base64_binary_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_DURATION,
- "axutil_duration_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_DATETIME,
- "axutil_date_time_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_NOTATION,
- "axiom_node_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_TIME,
- "axutil_date_time_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_DATE,
- "axutil_date_time_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_GYEARMONTH,
- "axutil_date_time_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_GYEAR,
- "int");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_GMONTHDAY,
- "axutil_date_time_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_GDAY,
- "int");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_GMONTH,
- "int");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_BOOLEAN,
- "axis2_bool_t");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_BASE64BINARY,
- "axutil_base64_binary_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_HEXBINARY,
- "axiom_node_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_FLOAT,
- "float");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_DOUBLE,
- "double");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_ANYURI,
- "axutil_uri_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_QNAME,
- "axutil_qname_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_STRING,
- "axis2_char_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_NORMALIZEDSTRING,
- "axis2_char_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_TOKEN,
- "axis2_char_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_LANGUAGE,
- "axis2_char_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_NAME,
- "axis2_char_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_NMTOKEN,
- "axis2_char_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_NCNAME,
- "axis2_char_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_ID,
- "axis2_char_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_IDREF,
- "axis2_char_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_ENTITY,
- "axis2_char_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_IDREFS,
- "axis2_char_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_ENTITIES,
- "axis2_char_t*");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_DECIMAL,
- "double");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_INTEGER,
- "int");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_NONPOSITIVEINTEGER,
- "int");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_NEGATIVEINTEGER,
- "int");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_LONG,
- "int64_t");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_INT,
- "int");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_SHORT,
- "short");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_BYTE,
- "axis2_byte_t");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_NONNEGATIVEINTEGER,
- "unsigned int");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_UNSIGNEDLONG,
- "uint64_t");
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_UNSIGNEDINT,
- "unsigned int");
- }
-
- private static void addSoapEncodingTypeMapping(QName name, String className) {
- soapEncodingTypeMap.put(name, className);
- }
}
Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/typemap/JavaTypeMap.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/typemap/JavaTypeMap.java?rev=1818518&r1=1818517&r2=1818518&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/typemap/JavaTypeMap.java (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/typemap/JavaTypeMap.java Sun Dec 17 22:34:08 2017
@@ -215,114 +215,4 @@ public class JavaTypeMap implements Type
private static void addTypemapping(QName name, String str) {
typeMap.put(name, str);
}
-
- public Map getSoapEncodingTypesMap() {
- return soapEncodingTypeMap;
- }
-
- private static Map soapEncodingTypeMap = new HashMap();
-
- static {
- // populate the soapEncodingTypeMap
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_ARRAY,
- org.apache.axis2.databinding.types.soapencoding.Array.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_STRUCT,
- org.apache.axis2.databinding.types.soapencoding.Struct.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_BASE64,
- org.apache.axis2.databinding.types.soapencoding.Base64.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_DURATION,
- org.apache.axis2.databinding.types.soapencoding.Duration.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_DATETIME,
- org.apache.axis2.databinding.types.soapencoding.DateTime.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_NOTATION,
- org.apache.axis2.databinding.types.soapencoding.NOTATION.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_TIME,
- org.apache.axis2.databinding.types.soapencoding.Time.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_DATE,
- org.apache.axis2.databinding.types.soapencoding.Date.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_GYEARMONTH,
- org.apache.axis2.databinding.types.soapencoding.GYearMonth.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_GYEAR,
- org.apache.axis2.databinding.types.soapencoding.GYear.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_GMONTHDAY,
- org.apache.axis2.databinding.types.soapencoding.GMonthDay.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_GDAY,
- org.apache.axis2.databinding.types.soapencoding.GDay.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_GMONTH,
- org.apache.axis2.databinding.types.soapencoding.GMonth.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_BOOLEAN,
- org.apache.axis2.databinding.types.soapencoding._boolean.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_BASE64BINARY,
- org.apache.axis2.databinding.types.soapencoding.Base64Binary.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_HEXBINARY,
- org.apache.axis2.databinding.types.soapencoding.HexBinary.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_FLOAT,
- org.apache.axis2.databinding.types.soapencoding._float.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_DOUBLE,
- org.apache.axis2.databinding.types.soapencoding._double.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_ANYURI,
- org.apache.axis2.databinding.types.soapencoding.AnyURI.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_QNAME,
- org.apache.axis2.databinding.types.soapencoding.QName.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_STRING,
- org.apache.axis2.databinding.types.soapencoding.String.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_NORMALIZEDSTRING,
- org.apache.axis2.databinding.types.soapencoding.NormalizedString.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_TOKEN,
- org.apache.axis2.databinding.types.soapencoding.Token.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_LANGUAGE,
- org.apache.axis2.databinding.types.soapencoding.Language.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_NAME,
- org.apache.axis2.databinding.types.soapencoding.Name.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_NMTOKEN,
- org.apache.axis2.databinding.types.soapencoding.NMTOKEN.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_NCNAME,
- org.apache.axis2.databinding.types.soapencoding.NCName.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_NMTOKENS,
- org.apache.axis2.databinding.types.soapencoding.NMTOKENS.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_ID,
- org.apache.axis2.databinding.types.soapencoding.ID.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_IDREF,
- org.apache.axis2.databinding.types.soapencoding.IDREF.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_ENTITY,
- org.apache.axis2.databinding.types.soapencoding.ENTITY.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_IDREFS,
- org.apache.axis2.databinding.types.soapencoding.IDREFS.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_ENTITIES,
- org.apache.axis2.databinding.types.soapencoding.ENTITIES.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_DECIMAL,
- org.apache.axis2.databinding.types.soapencoding.Decimal.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_INTEGER,
- org.apache.axis2.databinding.types.soapencoding.Integer.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_NONPOSITIVEINTEGER,
- org.apache.axis2.databinding.types.soapencoding.NonPositiveInteger.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_NEGATIVEINTEGER,
- org.apache.axis2.databinding.types.soapencoding.NegativeInteger.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_LONG,
- org.apache.axis2.databinding.types.soapencoding._long.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_INT,
- org.apache.axis2.databinding.types.soapencoding._int.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_SHORT,
- org.apache.axis2.databinding.types.soapencoding._short.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_BYTE,
- org.apache.axis2.databinding.types.soapencoding._byte.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_NONNEGATIVEINTEGER,
- org.apache.axis2.databinding.types.soapencoding.NonNegativeInteger.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_UNSIGNEDLONG,
- org.apache.axis2.databinding.types.soapencoding.UnsignedLong.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_UNSIGNEDINT,
- org.apache.axis2.databinding.types.soapencoding.UnsignedInt.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_UNSIGNEDSHORT,
- org.apache.axis2.databinding.types.soapencoding.UnsignedShort.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_UNSIGNEDBYTE,
- org.apache.axis2.databinding.types.soapencoding.UnsignedByte.class.getName());
- addSoapEncodingTypeMapping(SchemaConstants.SOAP_ENCODING_POSITIVEINTEGER,
- org.apache.axis2.databinding.types.soapencoding.PositiveInteger.class.getName());
- }
-
- private static void addSoapEncodingTypeMapping(QName name, String className) {
- soapEncodingTypeMap.put(name, className);
- }
-
-
}
Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/typemap/TypeMap.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/typemap/TypeMap.java?rev=1818518&r1=1818517&r2=1818518&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/typemap/TypeMap.java (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/typemap/TypeMap.java Sun Dec 17 22:34:08 2017
@@ -27,7 +27,5 @@ import java.util.Map;
public interface TypeMap {
public Map getTypeMap();
-
- public Map getSoapEncodingTypesMap();
}
Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java?rev=1818518&r1=1818517&r2=1818518&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java Sun Dec 17 22:34:08 2017
@@ -882,12 +882,6 @@ public class JavaBeanWriter implements B
XSLTUtils.addAttribute(model, "innerchoice", "yes", property);
}
- if (metainf.isFixed()){
- XSLTUtils.addAttribute(model, "fixed", "yes", property);
- }
-
-
-
if ((parentMetaInf != null) && metainf.isRestriction() && missingQNames.contains(name)) {
// this element details should be there with the parent meta Inf
addAttributesToProperty(
@@ -937,6 +931,10 @@ public class JavaBeanWriter implements B
XSLTUtils.addAttribute(model, "nillable", "yes", property);
}
+ if (metainf.isFixed(name)){
+ XSLTUtils.addAttribute(model, "fixed", "yes", property);
+ }
+
if (metainf.getOptionalAttributeStatusForQName(name)) {
XSLTUtils.addAttribute(model, "optional", "yes", property);
}
Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/test-resources/testsuite/base64binary.xsd
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/test-resources/testsuite/base64binary.xsd?rev=1818518&r1=1818517&r2=1818518&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/test-resources/testsuite/base64binary.xsd (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/test-resources/testsuite/base64binary.xsd Sun Dec 17 22:34:08 2017
@@ -36,7 +36,7 @@
</xs:complexType>
</xs:element>
- <xs:element name="TestBase64BinaryOnbounded">
+ <xs:element name="TestBase64BinaryUnbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="param" type="xs:base64Binary" maxOccurs="unbounded"/>
Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/test/org/apache/axis2/schema/ExtensionUtilityTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/test/org/apache/axis2/schema/ExtensionUtilityTest.java?rev=1818518&r1=1818517&r2=1818518&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/test/org/apache/axis2/schema/ExtensionUtilityTest.java (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/test/org/apache/axis2/schema/ExtensionUtilityTest.java Sun Dec 17 22:34:08 2017
@@ -23,12 +23,10 @@ package org.apache.axis2.schema;
import java.io.ByteArrayOutputStream;
import java.util.ArrayList;
-import java.util.HashMap;
import javax.xml.namespace.QName;
import org.apache.axis2.description.AxisService;
-import org.apache.axis2.util.CommandLineOption;
import org.apache.axis2.wsdl.codegen.CodeGenConfiguration;
import org.apache.axis2.wsdl.databinding.TypeMapper;
import org.apache.ws.commons.schema.XmlSchema;
@@ -44,7 +42,7 @@ public class ExtensionUtilityTest extend
loadSampleSchemaFile(schemas);
AxisService service=new AxisService();
service.addSchema(schemas);
- CodeGenConfiguration configuration=new CodeGenConfiguration(new HashMap<String, CommandLineOption>());
+ CodeGenConfiguration configuration=new CodeGenConfiguration();
configuration.addAxisService(service);
ExtensionUtility.invoke(configuration);
TypeMapper mapper=configuration.getTypeMapper();
Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/test/org/apache/axis2/schema/compile/AbstractSchemaCompilerTester.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/test/org/apache/axis2/schema/compile/AbstractSchemaCompilerTester.java?rev=1818518&r1=1818517&r2=1818518&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/test/org/apache/axis2/schema/compile/AbstractSchemaCompilerTester.java (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/test/org/apache/axis2/schema/compile/AbstractSchemaCompilerTester.java Sun Dec 17 22:34:08 2017
@@ -41,7 +41,7 @@ public abstract class AbstractSchemaComp
protected XmlSchema currentSchema;
protected File outputFolder = null;
- private static String TEMP_OUT_FOLDER="temp_compile";
+ private static String TEMP_OUT_FOLDER="target/temp_compile";
protected void setUp() throws Exception {
//load the current Schema through a file
Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/adb/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb/pom.xml?rev=1818518&r1=1818517&r2=1818518&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/adb/pom.xml (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/adb/pom.xml Sun Dec 17 22:34:08 2017
@@ -23,9 +23,9 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.axis2</groupId>
- <artifactId>axis2-parent</artifactId>
- <version>1.7.0-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
+ <artifactId>axis2</artifactId>
+ <version>1.8.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>axis2-adb</artifactId>
@@ -49,10 +49,6 @@
<scope>runtime</scope>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-activation_1.1_spec</artifactId>
- </dependency>
- <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
@@ -61,10 +57,15 @@
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
<scope>test</scope>
- </dependency>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ws.commons.axiom</groupId>
+ <artifactId>xml-truth</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-javamail_1.4_spec</artifactId>
+ <groupId>com.sun.mail</groupId>
+ <artifactId>javax.mail</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java?rev=1818518&r1=1818517&r2=1818518&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java Sun Dec 17 22:34:08 2017
@@ -20,10 +20,10 @@
package org.apache.axis2.databinding.typemapping;
import org.apache.axiom.attachments.ByteArrayDataSource;
-import org.apache.axiom.attachments.utils.DataHandlerUtils;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMNode;
import org.apache.axiom.om.OMText;
+import org.apache.axiom.util.base64.Base64Utils;
import org.apache.axis2.databinding.types.HexBinary;
import org.apache.axis2.databinding.utils.ConverterUtil;
import org.apache.axis2.context.MessageContext;
@@ -33,6 +33,7 @@ import org.w3c.dom.Document;
import javax.activation.DataHandler;
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
+
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;
@@ -172,7 +173,7 @@ public class SimpleTypeMapper {
}
public static ArrayList getArrayList(OMElement element, String localName) {
- Iterator childitr = element.getChildrenWithName(new QName(localName));
+ Iterator<OMElement> childitr = element.getChildrenWithName(new QName(localName));
ArrayList list = new ArrayList();
while (childitr.hasNext()) {
Object o = childitr.next();
@@ -182,10 +183,10 @@ public class SimpleTypeMapper {
}
public static HashSet getHashSet(OMElement element, String localName) {
- Iterator childitr = element.getChildrenWithName(new QName(localName));
+ Iterator<OMElement> childitr = element.getChildrenWithName(new QName(localName));
final HashSet list = new HashSet();
while (childitr.hasNext()) {
- OMElement o = (OMElement) childitr.next();
+ OMElement o = childitr.next();
list.add(o.getText());
}
return list;
@@ -200,7 +201,7 @@ public class SimpleTypeMapper {
if (txt.isOptimized()) {
return (DataHandler)txt.getDataHandler();
} else {
- return (DataHandler)DataHandlerUtils.getDataHandlerFromText(txt.getText(), null);
+ return new DataHandler(new ByteArrayDataSource(Base64Utils.decode(txt.getText())));
}
}
return null;