Author: veithen
Date: Wed Mar 30 18:14:17 2016
New Revision: 1737139
URL: http://svn.apache.org/viewvc?rev=1737139&view=rev
Log:
AXIS2-5750: Merge r1737030 to the 1.7 branch.
Added:
axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5750/
- copied from r1737030,
axis/axis2/java/core/trunk/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5750/
axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/wsdl/AXIS2-5750.wsdl
- copied unchanged from r1737030,
axis/axis2/java/core/trunk/modules/adb-tests/src/test/wsdl/AXIS2-5750.wsdl
Modified:
axis/axis2/java/core/branches/1_7/ (props changed)
axis/axis2/java/core/branches/1_7/modules/adb-codegen/src/org/apache/axis2/schema/BeanWriterMetaInfoHolder.java
axis/axis2/java/core/branches/1_7/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
axis/axis2/java/core/branches/1_7/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java
axis/axis2/java/core/branches/1_7/modules/adb-tests/pom.xml
Propchange: axis/axis2/java/core/branches/1_7/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Mar 30 18:14:17 2016
@@ -1,4 +1,4 @@
/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:1726494,1726509,1726513,1727171,1727174,1727177,1727180,1729891,1730095,1730139,1730180,1730186,1730195,1730197,1730222,1730300,1730308,1730310,1730317,1730322,1730335,1730369,1730427,1730618,1731425,1731441,1731446,1731448,1732354,1733137,1733663,1733713,1733766,1733770,1733773,1733850,1734176,1735331,1736512,1736543
+/axis/axis2/java/core/trunk:1726494,1726509,1726513,1727171,1727174,1727177,1727180,1729891,1730095,1730139,1730180,1730186,1730195,1730197,1730222,1730300,1730308,1730310,1730317,1730322,1730335,1730369,1730427,1730618,1731425,1731441,1731446,1731448,1732354,1733137,1733663,1733713,1733766,1733770,1733773,1733850,1734176,1735331,1736512,1736543,1737030
Modified:
axis/axis2/java/core/branches/1_7/modules/adb-codegen/src/org/apache/axis2/schema/BeanWriterMetaInfoHolder.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/adb-codegen/src/org/apache/axis2/schema/BeanWriterMetaInfoHolder.java?rev=1737139&r1=1737138&r2=1737139&view=diff
==============================================================================
---
axis/axis2/java/core/branches/1_7/modules/adb-codegen/src/org/apache/axis2/schema/BeanWriterMetaInfoHolder.java
(original)
+++
axis/axis2/java/core/branches/1_7/modules/adb-codegen/src/org/apache/axis2/schema/BeanWriterMetaInfoHolder.java
Wed Mar 30 18:14:17 2016
@@ -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/1_7/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java?rev=1737139&r1=1737138&r2=1737139&view=diff
==============================================================================
---
axis/axis2/java/core/branches/1_7/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
(original)
+++
axis/axis2/java/core/branches/1_7/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
Wed Mar 30 18:14:17 2016
@@ -503,7 +503,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)) {
@@ -1861,7 +1861,7 @@ public class SchemaCompiler {
}
if (att.getFixedValue() != null) {
metainf.registerDefaultValue(att.getQName(),
att.getFixedValue());
- metainf.setFixed(true);
+ metainf.registerFixedQName(att.getQName());
}
// after
} else {
@@ -2269,7 +2269,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);
}
}
}
Modified:
axis/axis2/java/core/branches/1_7/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java?rev=1737139&r1=1737138&r2=1737139&view=diff
==============================================================================
---
axis/axis2/java/core/branches/1_7/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java
(original)
+++
axis/axis2/java/core/branches/1_7/modules/adb-codegen/src/org/apache/axis2/schema/writer/JavaBeanWriter.java
Wed Mar 30 18:14:17 2016
@@ -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/1_7/modules/adb-tests/pom.xml
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/adb-tests/pom.xml?rev=1737139&r1=1737138&r2=1737139&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_7/modules/adb-tests/pom.xml (original)
+++ axis/axis2/java/core/branches/1_7/modules/adb-tests/pom.xml Wed Mar 30
18:14:17 2016
@@ -118,6 +118,26 @@
<outputDirectory>${project.build.directory}/wsdl2code/AXIS2-5749</outputDirectory>
</configuration>
</execution>
+ <execution>
+ <id>wsdl2code-axis2-5750</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>wsdl2code</goal>
+ </goals>
+ <configuration>
+ <wsdlFile>src/test/wsdl/AXIS2-5750.wsdl</wsdlFile>
+ <syncMode>sync</syncMode>
+ <unpackClasses>true</unpackClasses>
+ <namespaceURIs>
+ <namespaceURI>
+
<uri>http://ise-online.com/FixedValueService/</uri>
+
<packageName>org.apache.axis2.databinding.axis2_5750.client</packageName>
+ </namespaceURI>
+ </namespaceURIs>
+
<packageName>org.apache.axis2.databinding.axis2_5750.client</packageName>
+
<outputDirectory>${project.build.directory}/wsdl2code/AXIS2-5750</outputDirectory>
+ </configuration>
+ </execution>
</executions>
<configuration>
<databindingName>adb</databindingName>
@@ -197,6 +217,18 @@
<packageName>org.apache.axis2.databinding.axis2_5749.client</packageName>
</configuration>
</execution>
+ <execution>
+ <id>wsimport-axis2-5750</id>
+ <goals>
+ <goal>wsimport-test</goal>
+ </goals>
+ <configuration>
+ <wsdlFiles>
+
<wsdlFile>${basedir}/src/test/wsdl/AXIS2-5750.wsdl</wsdlFile>
+ </wsdlFiles>
+
<packageName>org.apache.axis2.databinding.axis2_5750.service</packageName>
+ </configuration>
+ </execution>
</executions>
<dependencies>
<dependency>
@@ -220,6 +252,7 @@
<source>${project.build.directory}/wsdl2code/mtom/src</source>
<source>${project.build.directory}/wsdl2code/AXIS2-5741/src</source>
<source>${project.build.directory}/wsdl2code/AXIS2-5749/src</source>
+
<source>${project.build.directory}/wsdl2code/AXIS2-5750/src</source>
</sources>
</configuration>
</execution>