You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by aj...@apache.org on 2005/11/30 05:32:47 UTC
svn commit: r349876 - in /webservices/axis2/trunk/java/modules/codegen: ./
src/org/apache/axis2/databinding/schema/
src/org/apache/axis2/databinding/schema/typemap/
src/org/apache/axis2/databinding/schema/util/ test-resources/xsd/derived/
test-resource...
Author: ajith
Date: Tue Nov 29 20:32:06 2005
New Revision: 349876
URL: http://svn.apache.org/viewcvs?rev=349876&view=rev
Log:
1. Added the test cases to generate and populate the ADB Beans based on simple types
2. Updated the ConverterUtil.java and the JavaTypeMap.java to include some missing types
Added:
webservices/axis2/trunk/java/modules/codegen/test-resources/xsd/derived/
webservices/axis2/trunk/java/modules/codegen/test-resources/xsd/derived/derivedType-All.xsd
webservices/axis2/trunk/java/modules/codegen/test-resources/xsd/simple/simpleType-All.xsd
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/compile/simple/SimpleTypeAllCompileTest.java
- copied, changed from r349705, webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/compile/simple/SimpleTypegMonthTest.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/AbstractDerivedPopulater.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeBytePopulateTest.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeIntPopulateTest.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeIntegerPopulateTest.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeLongPopulateTest.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeShortPopulateTest.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeAnyURIPopulateTest.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeBase64BinPopulateTest.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeBooleanPopulateTest.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDatePopulateTest.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDateTimePopulateTest.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDayPopulateTest.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDoublePopulateTest.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDurationPopulateTest.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeFloatPopulateTest.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeHexBinaryPopulateTest.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeMonthDayPopulateTest.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeQNamePopulateTest.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeTimePopulateTest.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypegYearMonthPopulateTest.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/package.html
Removed:
webservices/axis2/trunk/java/modules/codegen/test-resources/xsd/simple/simpleType-Month.xsd
webservices/axis2/trunk/java/modules/codegen/test-resources/xsd/simple/simpleType-Year.xsd
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/compile/simple/SimpleTypegMonthTest.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/compile/simple/SimpleTypegYearTest.java
Modified:
webservices/axis2/trunk/java/modules/codegen/maven.xml
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/schema/SchemaCompiler.java
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/schema/typemap/JavaTypeMap.java
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/schema/util/ConverterUtil.java
webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/AbstractSimplePopulater.java
Modified: webservices/axis2/trunk/java/modules/codegen/maven.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/maven.xml?rev=349876&r1=349875&r2=349876&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/maven.xml (original)
+++ webservices/axis2/trunk/java/modules/codegen/maven.xml Tue Nov 29 20:32:06 2005
@@ -30,9 +30,10 @@
<!-- run the schema compiler -->
<postGoal name="test:compile">
- <j:if test="${context.getVariable('maven.test.skip') != 'true'}">
+ <!--<j:if test="context.getVariable('maven.test.skip') != 'true'}">-->
- <j:set var="compiled.classes.dir" value="target/classes"/> <!-- Theres got to be a better way to do this -->
+ <j:set var="compiled.classes.dir" value="target/classes"/>
+ <!-- Theres got to be a better way to do this -->
<j:set var="schema.source.dir" value="test-resources/xsd"/>
<j:set var="schema.output.base.dir" value="target/schema"/>
<j:set var="schema.generated.src.dir" value="${schema.output.base.dir}/src"/>
@@ -65,19 +66,19 @@
</java>
<!-- ################################################################### -->
- <!-- simple gMonth xsd -->
+ <!-- All simple primitive types xsd -->
<java classname="org.apache.axis2.databinding.schema.XSD2Java" fork="true">
<classpath refid="maven.dependency.classpath"/>
<classpath location="${compiled.classes.dir}"/>
- <arg file="${schema.source.dir}/simple/simpleType-Month.xsd"/>
+ <arg file="${schema.source.dir}/simple/simpleType-All.xsd"/>
<arg file="${schema.generated.src.dir}"/>
</java>
- <!-- simple gYear xsd -->
+ <!-- All simple derived types xsd -->
<java classname="org.apache.axis2.databinding.schema.XSD2Java" fork="true">
<classpath refid="maven.dependency.classpath"/>
<classpath location="${compiled.classes.dir}"/>
- <arg file="${schema.source.dir}/simple/simpleType-Year.xsd"/>
+ <arg file="${schema.source.dir}/derived/derivedType-All.xsd"/>
<arg file="${schema.generated.src.dir}"/>
</java>
<!-- ################################################################### -->
@@ -89,7 +90,7 @@
<ant:path id="schema.generated.classes.dir" location="${schema.generated.classes.dir}"/>
<maven:addPath id="maven.dependency.classpath" refid="schema.generated.classes.dir"/>
- </j:if>
+ <!--</j:if>-->
</postGoal>
</project>
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/schema/SchemaCompiler.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/schema/SchemaCompiler.java?rev=349876&r1=349875&r2=349876&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/schema/SchemaCompiler.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/schema/SchemaCompiler.java Tue Nov 29 20:32:06 2005
@@ -508,7 +508,7 @@
*/
private void processSimpleSchemaType(XmlSchemaSimpleType simpleType){
//nothing to here yet.
- //todo need to populate the processed type map here
+ //todo perhaps we need to populate the processed type map here
}
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/schema/typemap/JavaTypeMap.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/schema/typemap/JavaTypeMap.java?rev=349876&r1=349875&r2=349876&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/schema/typemap/JavaTypeMap.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/schema/typemap/JavaTypeMap.java Tue Nov 29 20:32:06 2005
@@ -7,6 +7,7 @@
import javax.xml.namespace.QName;
import java.util.Map;
import java.util.HashMap;
+import java.math.BigDecimal;
/*
* Copyright 2004,2005 The Apache Software Foundation.
*
@@ -44,10 +45,12 @@
addTypemapping(SchemaConstants.XSD_DOUBLE, double.class.getName());
addTypemapping(SchemaConstants.XSD_FLOAT, float.class.getName());
addTypemapping(SchemaConstants.XSD_INT, int.class.getName());
+ addTypemapping(SchemaConstants.XSD_INTEGER, java.math.BigInteger.class.getName());
addTypemapping(SchemaConstants.XSD_LONG, long.class.getName());
addTypemapping(SchemaConstants.XSD_SHORT, short.class.getName());
addTypemapping(SchemaConstants.XSD_BYTE, byte.class.getName());
addTypemapping(SchemaConstants.XSD_ANY, OMElement.class.getName());
+ addTypemapping(SchemaConstants.XSD_DECIMAL, BigDecimal.class.getName());
//anytype is mapped to the OMElement instead of the java.lang.Object
addTypemapping(SchemaConstants.XSD_ANYTYPE, OMElement.class.getName());
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/schema/util/ConverterUtil.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/schema/util/ConverterUtil.java?rev=349876&r1=349875&r2=349876&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/schema/util/ConverterUtil.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/schema/util/ConverterUtil.java Tue Nov 29 20:32:06 2005
@@ -3,9 +3,15 @@
import org.apache.axis2.databinding.schema.SchemaConstants;
import org.apache.axis2.databinding.schema.types.*;
-import java.util.List;
-import java.util.Calendar;
+import java.util.*;
import java.lang.reflect.Array;
+import java.text.SimpleDateFormat;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+
+import sun.misc.BASE64Decoder;
+
+import javax.xml.namespace.QName;
/*
* Copyright 2004,2005 The Apache Software Foundation.
*
@@ -32,44 +38,42 @@
public class ConverterUtil {
/* String conversion methods */
- public static String convertToString(int i){
- return i+"";
+ public static String convertToString(int i) {
+ return i + "";
}
- public static String convertToString(float i){
- return i+"";
+ public static String convertToString(float i) {
+ return i + "";
}
- public static String convertToString(long i){
- return i+"";
+ public static String convertToString(long i) {
+ return i + "";
}
- public static String convertToString(double i){
- return i+"";
+ public static String convertToString(double i) {
+ return i + "";
}
- public static String convertToString(byte i){
+ public static String convertToString(byte i) {
return new String(new byte[]{i});
}
- public static String convertToString(char i){
+ public static String convertToString(char i) {
return new String(new char[]{i});
}
- public static String convertToString(short i){
- return i+"";
+ public static String convertToString(short i) {
+ return i + "";
}
- public static String convertToString(boolean i){
- return i+"";
+ public static String convertToString(boolean i) {
+ return i + "";
}
- public static String convertToString(Object o){
+ public static String convertToString(Object o) {
return o.toString();
}
-
-
/* String to java type conversions
These methods have a special signature structure
<code>convertTo</code> followed by the schema type name
@@ -80,200 +84,412 @@
*/
- public static int convertToint(String s){
+ public static int convertToint(String s) {
return Integer.parseInt(s);
}
- public static float convertTofloat(String s){
+ public static double convertTodouble(String s) {
+ return Double.parseDouble(s);
+ }
+
+ public static BigDecimal convertTodecimal(String s) {
+ return new BigDecimal(s);
+ }
+
+ public static float convertTofloat(String s) {
return Float.parseFloat(s);
}
- public static String convertTostring(String s){
+ public static String convertTostring(String s) {
return s;
}
- public static long convertTolong(String s){
+ public static long convertTolong(String s) {
return Long.parseLong(s);
}
- public static short convertToshort(String s){
+ public static short convertToshort(String s) {
return Short.parseShort(s);
}
- public static boolean convertToboolean(String s){
+ public static boolean convertToboolean(String s) {
return Boolean.getBoolean(s);
}
- public static boolean convertToanyType(String s){
- return Boolean.getBoolean(s);
+ public static Object convertToanyType(String s) {
+ return s; //todo -> What to do here?
}
- public static YearMonth convertTogYearMonth(String s){
+ public static YearMonth convertTogYearMonth(String s) {
return new YearMonth(s);
}
- public static MonthDay convertTogMonthDay(String s){
+ public static MonthDay convertTogMonthDay(String s) {
return new MonthDay(s);
}
- public static Year convertTogYear(String s){
+ public static Year convertTogYear(String s) {
return new Year(s);
}
- public static Month convertTogMonth(String s){
+ public static Month convertTogMonth(String s) {
return new Month(s);
}
- public static Day convertTogDay(String s){
+ public static Day convertTogDay(String s) {
return new Day(s);
}
- public static Duration convertToduration(String s){
+ public static Duration convertToduration(String s) {
return new Duration(s);
}
+ public static HexBinary convertTohexBinary(String s) {
+ return new HexBinary(s);
+ }
+
+ public static byte[] convertTobase64Binary(String s) throws Exception{
+ //using the Sun's base64 decoder that should come with the JRE
+ return new BASE64Decoder().decodeBuffer(s);
+ }
+
+ /**
+ * Convert a given string into a date
+ * Code from Axis1 DateDeserializer
+ *
+ * @param s
+ * @return
+ */
+ public static Date convertTodate(String source) {
+
+ Calendar calendar = Calendar.getInstance();
+ SimpleDateFormat zulu = new SimpleDateFormat("yyyy-MM-dd");
+ // 0123456789 0 123456789
+ Date result;
+ boolean bc = false;
+
+ // validate fixed portion of format
+ if (source != null) {
+ if (source.charAt(0) == '+')
+ source = source.substring(1);
+
+ if (source.charAt(0) == '-') {
+ source = source.substring(1);
+ bc = true;
+ }
+
+ if (source.length() < 10)
+ throw new NumberFormatException("bad date format");
+
+
+ if (source.charAt(4) != '-' || source.charAt(7) != '-')
+ throw new NumberFormatException("bad Date format");
+
+ }
+
+ synchronized (calendar) {
+ // convert what we have validated so far
+ try {
+ result = zulu.parse(source == null ? null :
+ (source.substring(0, 10)));
+ } catch (Exception e) {
+ throw new NumberFormatException(e.toString());
+ }
+
+ // support dates before the Christian era
+ if (bc) {
+ calendar.setTime(result);
+ calendar.set(Calendar.ERA, GregorianCalendar.BC);
+ result = calendar.getTime();
+ }
+ }
+ return result;
+ }
+
+ public static Time convertTotime(String s) {
+ return new Time(s);
+ }
- public static Token convertTotoken(String s){
+ public static Token convertTotoken(String s) {
return new Token(s);
}
- public static NormalizedString convertTonormalizedString(String s){
+
+ public static NormalizedString convertTonormalizedString(String s) {
return new NormalizedString(s);
}
- public static UnsignedLong convertTounsignedLong(String s){
+
+ public static UnsignedLong convertTounsignedLong(String s) {
return new UnsignedLong(s);
}
- public static UnsignedInt convertTounsignedInt(String s){
+
+ public static UnsignedInt convertTounsignedInt(String s) {
return new UnsignedInt(s);
}
- public static UnsignedShort convertTounsignedShort(String s){
+
+ public static UnsignedShort convertTounsignedShort(String s) {
return new UnsignedShort(s);
}
- public static UnsignedByte convertTounsignedByte(String s){
+
+ public static UnsignedByte convertTounsignedByte(String s) {
return new UnsignedByte(s);
}
- public static NonNegativeInteger convertTononNegativeInteger(String s){
+
+ public static NonNegativeInteger convertTononNegativeInteger(String s) {
return new NonNegativeInteger(s);
}
- public static NegativeInteger convertTonegativeInteger(String s){
+
+ public static NegativeInteger convertTonegativeInteger(String s) {
return new NegativeInteger(s);
}
- public static PositiveInteger convertTopositiveInteger(String s){
+
+ public static PositiveInteger convertTopositiveInteger(String s) {
return new PositiveInteger(s);
}
- public static NonPositiveInteger convertTononPositiveInteger(String s){
+
+ public static NonPositiveInteger convertTononPositiveInteger(String s) {
return new NonPositiveInteger(s);
}
- public static Name convertToName(String s){
+ public static Name convertToName(String s) {
return new Name(s);
}
- public static NCName convertToNCName(String s){
+
+ public static NCName convertToNCName(String s) {
return new NCName(s);
}
- public static Id convertToID(String s){
+
+ public static Id convertToID(String s) {
return new Id(s);
}
- public static Language convertTolanguage(String s){
+
+ public static Language convertTolanguage(String s) {
return new Language(s);
}
- public static NMToken convertToNMTOKEN(String s){
+
+ public static NMToken convertToNMTOKEN(String s) {
return new NMToken(s);
}
- public static NMTokens convertToNMTOKENS(String s){
+ public static NMTokens convertToNMTOKENS(String s) {
return new NMTokens(s);
}
- public static Notation convertToNOTATION(String s){
+ public static Notation convertToNOTATION(String s) {
return null; //todo Need to fix this
// return new Notation(s);
}
- public static Entity convertToENTITY(String s){
+ public static Entity convertToENTITY(String s) {
return new Entity(s);
}
- public static Entities convertToENTITIES(String s){
+ public static Entities convertToENTITIES(String s) {
return new Entities(s);
}
- public static IDRef convertToIDREF(String s){
+ public static IDRef convertToIDREF(String s) {
return new IDRef(s);
}
- public static IDRefs convertToIDREFS(String s){
+
+ public static IDRefs convertToIDREFS(String s) {
return new IDRefs(s);
}
- public static URI convertToanyURI(String s) throws Exception{
+ public static URI convertToanyURI(String s) throws Exception {
return new URI(s);
}
- public static int convertTointeger(String s) throws Exception{
- return Integer.parseInt(s);
+ public static BigInteger convertTointeger(String s) throws Exception {
+ return new BigInteger(s);
+ }
+
+ public static byte convertTobyte(String s) throws Exception {
+ return Byte.parseByte(s);
+ }
+
+ /**
+ * Code from Axis1 code base
+ * Note - We only follow the convention in the latest schema spec
+ * @param s
+ * @return
+ * @throws Exception
+ */
+ public static Calendar convertTodateTime(String source) throws Exception {
+ Calendar calendar = Calendar.getInstance();
+ SimpleDateFormat zulu =
+ new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+ Date date;
+ boolean bc = false;
+
+ // validate fixed portion of format
+ if (source == null || source.length() == 0) {
+ throw new NumberFormatException();
+// Messages.getMessage("badDateTime00"));
+ }
+ if (source.charAt(0) == '+') {
+ source = source.substring(1);
+ }
+ if (source.charAt(0) == '-') {
+ source = source.substring(1);
+ bc = true;
+ }
+ if (source.length() < 19) {
+ throw new NumberFormatException();
+// Messages.getMessage("badDateTime00"));
+ }
+ if (source.charAt(4) != '-' || source.charAt(7) != '-' ||
+ source.charAt(10) != 'T') {
+ throw new NumberFormatException();//Messages.getMessage("badDate00"));
+ }
+ if (source.charAt(13) != ':' || source.charAt(16) != ':') {
+ throw new NumberFormatException();//Messages.getMessage("badTime00"));
+ }
+ // convert what we have validated so far
+ try {
+ synchronized (zulu) {
+ date = zulu.parse(source.substring(0, 19) + ".000Z");
+ }
+ } catch (Exception e) {
+ throw new NumberFormatException(e.toString());
+ }
+ int pos = 19;
+
+ // parse optional milliseconds
+ if (pos < source.length() && source.charAt(pos) == '.') {
+ int milliseconds = 0;
+ int start = ++pos;
+ while (pos < source.length() &&
+ Character.isDigit(source.charAt(pos))) {
+ pos++;
+ }
+ String decimal = source.substring(start, pos);
+ if (decimal.length() == 3) {
+ milliseconds = Integer.parseInt(decimal);
+ } else if (decimal.length() < 3) {
+ milliseconds = Integer.parseInt((decimal + "000")
+ .substring(0, 3));
+ } else {
+ milliseconds = Integer.parseInt(decimal.substring(0, 3));
+ if (decimal.charAt(3) >= '5') {
+ ++milliseconds;
+ }
+ }
+
+ // add milliseconds to the current date
+ date.setTime(date.getTime() + milliseconds);
+ }
+
+ // parse optional timezone
+ if (pos + 5 < source.length() &&
+ (source.charAt(pos) == '+' || (source.charAt(pos) == '-'))) {
+ if (!Character.isDigit(source.charAt(pos + 1)) ||
+ !Character.isDigit(source.charAt(pos + 2)) ||
+ source.charAt(pos + 3) != ':' ||
+ !Character.isDigit(source.charAt(pos + 4)) ||
+ !Character.isDigit(source.charAt(pos + 5))) {
+ throw new NumberFormatException();
+ // Messages.getMessage("badTimezone00"));
+ }
+ int hours = (source.charAt(pos + 1) - '0') * 10
+ + source.charAt(pos + 2) - '0';
+ int mins = (source.charAt(pos + 4) - '0') * 10
+ + source.charAt(pos + 5) - '0';
+ int milliseconds = (hours * 60 + mins) * 60 * 1000;
+
+ // subtract milliseconds from current date to obtain GMT
+ if (source.charAt(pos) == '+') {
+ milliseconds = -milliseconds;
+ }
+ date.setTime(date.getTime() + milliseconds);
+ pos += 6;
+ }
+ if (pos < source.length() && source.charAt(pos) == 'Z') {
+ pos++;
+ calendar.setTimeZone(TimeZone.getTimeZone("GMT"));
+ }
+ if (pos < source.length()) {
+ throw new NumberFormatException();//Messages.getMessage("badChars00"));
+ }
+ calendar.setTime(date);
+
+ // support dates before the Christian era
+ if (bc) {
+ calendar.set(Calendar.ERA, GregorianCalendar.BC);
+ }
+ return calendar;
+
}
- public static Calendar convertTodateTime(String s) throws Exception{ //need to fix this
- return null;
+ /**
+ * Code from Axis1 code base
+ * @param source
+ * @return
+ */
+ public static QName convertToQName(String source) {
+ source = source.trim();
+ int colon = source.lastIndexOf(":");
+ String namespace = colon < 0 ? "" : "" ;// todo Fix this. Need to take a namespace with this
+ //context.getNamespaceURI(source.substring(0, colon));
+ String localPart = colon < 0 ? source : source.substring(colon + 1);
+ return new QName(namespace, localPart);
}
/* ################################################################# */
/* java Primitive types to Object conversion methods */
- public static Object convertToObject(String i){
+ public static Object convertToObject(String i) {
return i;
}
- public static Object convertToObject(boolean i){
+ public static Object convertToObject(boolean i) {
return Boolean.valueOf(i);
}
- public static Object convertToObject(double i){
+ public static Object convertToObject(double i) {
return new Double(i);
}
- public static Object convertToObject(byte i){
+ public static Object convertToObject(byte i) {
return new Byte(i);
}
- public static Object convertToObject(char i){
+ public static Object convertToObject(char i) {
return new Character(i);
}
- public static Object convertToObject(short i){
+ public static Object convertToObject(short i) {
return new Short(i);
}
-
/* list to array conversion methods */
/**
- *
* @param baseArrayClass
- * @param objectList -> for primitive type array conversion we assume the content to be
- * strings!
+ * @param objectList -> for primitive type array conversion we assume the content to be
+ * strings!
* @return
*/
- public static Object convertToArray(Class baseArrayClass, List objectList){
+ public static Object convertToArray(Class baseArrayClass, List objectList) {
int listSize = objectList.size();
- Object returnArray = Array.newInstance(baseArrayClass,listSize);
+ Object returnArray = Array.newInstance(baseArrayClass, listSize);
for (int i = 0; i < listSize; i++) {
- if (int.class.equals(baseArrayClass)){
- Array.setInt(returnArray,i,Integer.parseInt(objectList.get(i).toString()));
- }else if (float.class.equals(baseArrayClass)){
- Array.setFloat(returnArray,i,Float.parseFloat(objectList.get(i).toString()));
- }else if (short.class.equals(baseArrayClass)){
- Array.setShort(returnArray,i,Short.parseShort(objectList.get(i).toString()));
- }else if (long.class.equals(baseArrayClass)){
- Array.setLong(returnArray,i,Long.parseLong(objectList.get(i).toString()));
- }else if (boolean.class.equals(baseArrayClass)){
- Array.setBoolean(returnArray,i,Boolean.getBoolean(objectList.get(i).toString()));
- }else if (char.class.equals(baseArrayClass)){
- Array.setChar(returnArray,i,objectList.get(i).toString().toCharArray()[0]);
- }else if (double.class.equals(baseArrayClass)){
- Array.setDouble(returnArray,i,Double.parseDouble(objectList.get(i).toString()));
- }else{
- Array.set(returnArray,i,objectList.get(i));
+ if (int.class.equals(baseArrayClass)) {
+ Array.setInt(returnArray, i, Integer.parseInt(objectList.get(i).toString()));
+ } else if (float.class.equals(baseArrayClass)) {
+ Array.setFloat(returnArray, i, Float.parseFloat(objectList.get(i).toString()));
+ } else if (short.class.equals(baseArrayClass)) {
+ Array.setShort(returnArray, i, Short.parseShort(objectList.get(i).toString()));
+ } else if (long.class.equals(baseArrayClass)) {
+ Array.setLong(returnArray, i, Long.parseLong(objectList.get(i).toString()));
+ } else if (boolean.class.equals(baseArrayClass)) {
+ Array.setBoolean(returnArray, i, Boolean.getBoolean(objectList.get(i).toString()));
+ } else if (char.class.equals(baseArrayClass)) {
+ Array.setChar(returnArray, i, objectList.get(i).toString().toCharArray()[0]);
+ } else if (double.class.equals(baseArrayClass)) {
+ Array.setDouble(returnArray, i, Double.parseDouble(objectList.get(i).toString()));
+ } else {
+ Array.set(returnArray, i, objectList.get(i));
}
}
return returnArray;
Added: webservices/axis2/trunk/java/modules/codegen/test-resources/xsd/derived/derivedType-All.xsd
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test-resources/xsd/derived/derivedType-All.xsd?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test-resources/xsd/derived/derivedType-All.xsd (added)
+++ webservices/axis2/trunk/java/modules/codegen/test-resources/xsd/derived/derivedType-All.xsd Tue Nov 29 20:32:06 2005
@@ -0,0 +1,33 @@
+<schema targetNamespace="http://soapinterop.org/xsd"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsd1="http://soapinterop.org/xsd"
+ elementFormDefault="qualified">
+
+ <xs:element name="DerivedPositiveInteger" type="xs:positiveInteger"/>
+ <xs:element name="DerivedNegativeInteger" type="xs:negativeInteger"/>
+ <xs:element name="DerivedNonNegativeInteger" type="xs:nonNegativeInteger"/>
+ <xs:element name="DerivedNonpositiveInteger" type="xs:nonPositiveInteger"/>
+ <xs:element name="DerivedUnsignedShort" type="xs:unsignedShort"/>
+ <xs:element name="DerivedUnsignedLong" type="xs:unsignedLong"/>
+ <xs:element name="DerivedUnsignedInt" type="xs:unsignedInt"/>
+ <xs:element name="DerivedUnsignedByte" type="xs:unsignedByte"/>
+ <xs:element name="DerivedLong" type="xs:long"/>
+ <xs:element name="DerivedShort" type="xs:short"/>
+ <xs:element name="DerivedInt" type="xs:int"/>
+ <xs:element name="DerivedByte" type="xs:byte"/>
+ <xs:element name="DerivedToken" type="xs:token"/>
+ <xs:element name="DerivedLanguage" type="xs:language"/>
+ <xs:element name="DerivedNMTOKEN" type="xs:NMTOKEN"/>
+ <xs:element name="DerivedNMTOKENS" type="xs:NMTOKENS"/>
+ <xs:element name="DerivedID" type="xs:ID"/>
+ <xs:element name="DerivedIDRef" type="xs:IDREF"/>
+ <xs:element name="DerivedEntity" type="xs:ENTITY"/>
+ <xs:element name="DerivedEntities" type="xs:ENTITIES"/>
+ <xs:element name="DerivedName" type="xs:Name"/>
+ <xs:element name="DerivedNameToken" type="xs:NMTOKEN"/>
+ <xs:element name="DerivedNCName" type="xs:NCName"/>
+ <xs:element name="DerivedNormalizedString" type="xs:normalizedString"/>
+ <xs:element name="DerivedInteger" type="xs:integer"/>
+
+</schema>
\ No newline at end of file
Added: webservices/axis2/trunk/java/modules/codegen/test-resources/xsd/simple/simpleType-All.xsd
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test-resources/xsd/simple/simpleType-All.xsd?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test-resources/xsd/simple/simpleType-All.xsd (added)
+++ webservices/axis2/trunk/java/modules/codegen/test-resources/xsd/simple/simpleType-All.xsd Tue Nov 29 20:32:06 2005
@@ -0,0 +1,24 @@
+<schema targetNamespace="http://soapinterop.org/xsd"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsd1="http://soapinterop.org/xsd"
+ elementFormDefault="qualified">
+ <element name="dateParam" type="xsd:date"/>
+ <element name="dateTimeParam" type="xsd:dateTime"/>
+ <element name="dayParam" type="xsd:gDay"/>
+ <element name="durationParam" type="xsd:duration"/>
+ <element name="monthParam" type="xsd:gMonth"/>
+ <element name="monthDayParam" type="xsd:gMonthDay"/>
+ <element name="timeParam" type="xsd:time"/>
+ <element name="yearParam" type="xsd:gYear"/>
+ <element name="yearMonthParam" type="xsd:gYearMonth"/>
+ <element name="doubleParam" type="xsd:double"/>
+ <element name="stringParam" type="xsd:string"/>
+ <element name="booleanParam" type="xsd:boolean"/>
+ <element name="decimalParam" type="xsd:decimal"/>
+ <element name="floatParam" type="xsd:float"/>
+ <element name="hexBinParam" type="xsd:hexBinary"/>
+ <element name="base64BinParam" type="xsd:base64Binary"/>
+ <element name="anyURIParam" type="xsd:anyURI"/>
+ <element name="qNameParam" type="xsd:QName"/>
+</schema>
\ No newline at end of file
Copied: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/compile/simple/SimpleTypeAllCompileTest.java (from r349705, webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/compile/simple/SimpleTypegMonthTest.java)
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/compile/simple/SimpleTypeAllCompileTest.java?p2=webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/compile/simple/SimpleTypeAllCompileTest.java&p1=webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/compile/simple/SimpleTypegMonthTest.java&r1=349705&r2=349876&rev=349876&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/compile/simple/SimpleTypegMonthTest.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/compile/simple/SimpleTypeAllCompileTest.java Tue Nov 29 20:32:06 2005
@@ -17,10 +17,10 @@
* limitations under the License.
*/
-public class SimpleTypegMonthTest extends AbstractSchemaCompilerTester {
+public class SimpleTypeAllCompileTest extends AbstractSchemaCompilerTester {
protected void setUp() throws Exception {
- this.fileName = "test-resources/xsd/simple/simpleType-Month.xsd";
+ this.fileName = "test-resources/xsd/simple/simpleType-All.xsd";
super.setUp();
}
}
Added: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/AbstractDerivedPopulater.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/AbstractDerivedPopulater.java?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/AbstractDerivedPopulater.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/AbstractDerivedPopulater.java Tue Nov 29 20:32:06 2005
@@ -0,0 +1,42 @@
+package org.apache.axis2.databinding.schema.populate.derived;
+
+import junit.framework.TestCase;
+
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLInputFactory;
+import java.io.ByteArrayInputStream;
+import java.lang.reflect.Method;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public abstract class AbstractDerivedPopulater extends TestCase {
+
+ // force others to implement this method
+ public abstract void testPopulate() throws Exception;
+
+ // Simple reusable method to make object instances via reflection
+ protected Object process(String testString,String className) throws Exception{
+ XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(new ByteArrayInputStream(testString.getBytes()));
+ Class clazz = Class.forName(className);
+ Method parseMethod = clazz.getMethod("parse",new Class[]{XMLStreamReader.class});
+ Object obj = parseMethod.invoke(null,new Object[]{reader});
+ assertNotNull(obj);
+
+ return obj;
+
+
+ }
+}
Added: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeBytePopulateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeBytePopulateTest.java?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeBytePopulateTest.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeBytePopulateTest.java Tue Nov 29 20:32:06 2005
@@ -0,0 +1,31 @@
+package org.apache.axis2.databinding.schema.populate.derived;
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class DerivedTypeBytePopulateTest extends AbstractDerivedPopulater{
+ private String xmlString[] = {
+ "<DerivedByte>1</DerivedByte>",
+ "<DerivedByte>0</DerivedByte>",
+ "<DerivedByte>2</DerivedByte>"
+ };
+ // force others to implement this method
+ public void testPopulate() throws Exception {
+ process(xmlString[0],"org.soapinterop.DerivedByte");
+ process(xmlString[1],"org.soapinterop.DerivedByte");
+ process(xmlString[2],"org.soapinterop.DerivedByte");
+ }
+}
Added: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeIntPopulateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeIntPopulateTest.java?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeIntPopulateTest.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeIntPopulateTest.java Tue Nov 29 20:32:06 2005
@@ -0,0 +1,31 @@
+package org.apache.axis2.databinding.schema.populate.derived;
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class DerivedTypeIntPopulateTest extends AbstractDerivedPopulater{
+ private String xmlString[] = {
+ "<DerivedInt>122222</DerivedInt>",
+ "<DerivedInt>0</DerivedInt>",
+ "<DerivedInt>-2344556</DerivedInt>"
+ };
+ // force others to implement this method
+ public void testPopulate() throws Exception {
+ process(xmlString[0],"org.soapinterop.DerivedInt");
+ process(xmlString[1],"org.soapinterop.DerivedInt");
+ process(xmlString[2],"org.soapinterop.DerivedInt");
+ }
+}
Added: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeIntegerPopulateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeIntegerPopulateTest.java?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeIntegerPopulateTest.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeIntegerPopulateTest.java Tue Nov 29 20:32:06 2005
@@ -0,0 +1,31 @@
+package org.apache.axis2.databinding.schema.populate.derived;
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class DerivedTypeIntegerPopulateTest extends AbstractDerivedPopulater{
+ private String xmlString[] = {
+ "<DerivedInteger>122222</DerivedInteger>",
+ "<DerivedInteger>0</DerivedInteger>",
+ "<DerivedInteger>-2344556</DerivedInteger>"
+ };
+ // force others to implement this method
+ public void testPopulate() throws Exception {
+ process(xmlString[0],"org.soapinterop.DerivedInteger");
+ process(xmlString[1],"org.soapinterop.DerivedInteger");
+ process(xmlString[2],"org.soapinterop.DerivedInteger");
+ }
+}
Added: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeLongPopulateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeLongPopulateTest.java?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeLongPopulateTest.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeLongPopulateTest.java Tue Nov 29 20:32:06 2005
@@ -0,0 +1,31 @@
+package org.apache.axis2.databinding.schema.populate.derived;
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class DerivedTypeLongPopulateTest extends AbstractDerivedPopulater{
+ private String xmlString[] = {
+ "<DerivedLong>17578283282</DerivedLong>",
+ "<DerivedLong>-1228284443</DerivedLong>",
+ "<DerivedLong>2</DerivedLong>"
+ };
+ // force others to implement this method
+ public void testPopulate() throws Exception {
+ process(xmlString[0],"org.soapinterop.DerivedLong");
+ process(xmlString[1],"org.soapinterop.DerivedLong");
+ process(xmlString[2],"org.soapinterop.DerivedLong");
+ }
+}
Added: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeShortPopulateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeShortPopulateTest.java?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeShortPopulateTest.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/derived/DerivedTypeShortPopulateTest.java Tue Nov 29 20:32:06 2005
@@ -0,0 +1,31 @@
+package org.apache.axis2.databinding.schema.populate.derived;
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class DerivedTypeShortPopulateTest extends AbstractDerivedPopulater{
+ private String xmlString[] = {
+ "<DerivedShort>17578</DerivedShort>",
+ "<DerivedShort>-12282</DerivedShort>",
+ "<DerivedShort>2</DerivedShort>"
+ };
+ // force others to implement this method
+ public void testPopulate() throws Exception {
+ process(xmlString[0],"org.soapinterop.DerivedShort");
+ process(xmlString[1],"org.soapinterop.DerivedShort");
+ process(xmlString[2],"org.soapinterop.DerivedShort");
+ }
+}
Modified: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/AbstractSimplePopulater.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/AbstractSimplePopulater.java?rev=349876&r1=349875&r2=349876&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/AbstractSimplePopulater.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/AbstractSimplePopulater.java Tue Nov 29 20:32:06 2005
@@ -37,6 +37,5 @@
return obj;
-
}
}
Added: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeAnyURIPopulateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeAnyURIPopulateTest.java?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeAnyURIPopulateTest.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeAnyURIPopulateTest.java Tue Nov 29 20:32:06 2005
@@ -0,0 +1,30 @@
+package org.apache.axis2.databinding.schema.populate.simple;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class SimpleTypeAnyURIPopulateTest extends AbstractSimplePopulater{
+ private String xmlString[] = {
+ "<anyURIParam>http://www.wisc.edu/grad/education/mas/229.html</anyURIParam>",
+ "<anyURIParam>ftp://grad/education/mas/229.html</anyURIParam>",
+ "<anyURIParam>http://mail.google.com/mail/?auth=DQAAAHEAAAC041</anyURIParam>"
+ };
+ // force others to implement this method
+ public void testPopulate() throws Exception {
+ process(xmlString[0],"org.soapinterop.anyURIParam");
+ process(xmlString[1],"org.soapinterop.anyURIParam");
+ process(xmlString[2],"org.soapinterop.anyURIParam");
+ }
+}
Added: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeBase64BinPopulateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeBase64BinPopulateTest.java?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeBase64BinPopulateTest.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeBase64BinPopulateTest.java Tue Nov 29 20:32:06 2005
@@ -0,0 +1,28 @@
+package org.apache.axis2.databinding.schema.populate.simple;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class SimpleTypeBase64BinPopulateTest extends AbstractSimplePopulater{
+ private String xmlString[] = {
+ "<base64BinParam>abcdABCD</base64BinParam>",
+ "<base64BinParam>abcdABCD09rT</base64BinParam>",
+ };
+ // force others to implement this method
+ public void testPopulate() throws Exception {
+ process(xmlString[0],"org.soapinterop.base64BinParam");
+ process(xmlString[1],"org.soapinterop.base64BinParam");
+ }
+}
Added: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeBooleanPopulateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeBooleanPopulateTest.java?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeBooleanPopulateTest.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeBooleanPopulateTest.java Tue Nov 29 20:32:06 2005
@@ -0,0 +1,28 @@
+package org.apache.axis2.databinding.schema.populate.simple;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class SimpleTypeBooleanPopulateTest extends AbstractSimplePopulater{
+ private String xmlString[] = {
+ "<booleanParam>true</booleanParam>",
+ "<booleanParam>false</booleanParam>",
+ };
+ // force others to implement this method
+ public void testPopulate() throws Exception {
+ process(xmlString[0],"org.soapinterop.booleanParam");
+ process(xmlString[1],"org.soapinterop.booleanParam");
+ }
+}
Added: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDatePopulateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDatePopulateTest.java?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDatePopulateTest.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDatePopulateTest.java Tue Nov 29 20:32:06 2005
@@ -0,0 +1,30 @@
+package org.apache.axis2.databinding.schema.populate.simple;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class SimpleTypeDatePopulateTest extends AbstractSimplePopulater{
+ private String xmlString[] = {
+ "<dateParam>2002-10-10T12:00:00+05:00</dateParam>",
+ "<dateParam>2000-12-31T11:59:59-05:00</dateParam>",
+ "<dateParam>2002-10-10T07:00:00Z</dateParam>"
+ };
+ // force others to implement this method
+ public void testPopulate() throws Exception {
+ process(xmlString[0],"org.soapinterop.dateParam");
+ process(xmlString[1],"org.soapinterop.dateParam");
+ process(xmlString[2],"org.soapinterop.dateParam");
+ }
+}
Added: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDateTimePopulateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDateTimePopulateTest.java?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDateTimePopulateTest.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDateTimePopulateTest.java Tue Nov 29 20:32:06 2005
@@ -0,0 +1,30 @@
+package org.apache.axis2.databinding.schema.populate.simple;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class SimpleTypeDateTimePopulateTest extends AbstractSimplePopulater{
+ private String xmlString[] = {
+ "<dateTimeParam>2002-10-10T12:00:00+05:00</dateTimeParam>",
+ "<dateTimeParam>2000-12-31T11:59:59-05:00</dateTimeParam>",
+ "<dateTimeParam>2002-10-10T07:00:00Z</dateTimeParam>"
+ };
+ // force others to implement this method
+ public void testPopulate() throws Exception {
+ process(xmlString[0],"org.soapinterop.dateTimeParam");
+ process(xmlString[1],"org.soapinterop.dateTimeParam");
+ process(xmlString[2],"org.soapinterop.dateTimeParam");
+ }
+}
Added: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDayPopulateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDayPopulateTest.java?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDayPopulateTest.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDayPopulateTest.java Tue Nov 29 20:32:06 2005
@@ -0,0 +1,30 @@
+package org.apache.axis2.databinding.schema.populate.simple;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class SimpleTypeDayPopulateTest extends AbstractSimplePopulater{
+ private String xmlString[] = {
+ "<dayParam>---05</dayParam>",
+ "<dayParam>---06</dayParam>",
+ "<dayParam>---12+05:00</dayParam>"
+ };
+ // force others to implement this method
+ public void testPopulate() throws Exception {
+ process(xmlString[0],"org.soapinterop.dayParam");
+ process(xmlString[1],"org.soapinterop.dayParam");
+ process(xmlString[2],"org.soapinterop.dayParam");
+ }
+}
Added: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDoublePopulateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDoublePopulateTest.java?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDoublePopulateTest.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDoublePopulateTest.java Tue Nov 29 20:32:06 2005
@@ -0,0 +1,30 @@
+package org.apache.axis2.databinding.schema.populate.simple;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class SimpleTypeDoublePopulateTest extends AbstractSimplePopulater{
+ private String xmlString[] = {
+ "<floatParam>20300.0055</floatParam>",
+ "<floatParam>3045534234</floatParam>",
+ "<floatParam>66733.88</floatParam>"
+ };
+ // force others to implement this method
+ public void testPopulate() throws Exception {
+ process(xmlString[0],"org.soapinterop.floatParam");
+ process(xmlString[1],"org.soapinterop.floatParam");
+ process(xmlString[2],"org.soapinterop.floatParam");
+ }
+}
Added: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDurationPopulateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDurationPopulateTest.java?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDurationPopulateTest.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeDurationPopulateTest.java Tue Nov 29 20:32:06 2005
@@ -0,0 +1,30 @@
+package org.apache.axis2.databinding.schema.populate.simple;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class SimpleTypeDurationPopulateTest extends AbstractSimplePopulater{
+ private String xmlString[] = {
+ "<durationParam>P1Y2MT2H</durationParam>",
+ "<durationParam>P1347M</durationParam>",
+ "<durationParam>P0Y1347M0D</durationParam>"
+ };
+ // force others to implement this method
+ public void testPopulate() throws Exception {
+ process(xmlString[0],"org.soapinterop.durationParam");
+ process(xmlString[1],"org.soapinterop.durationParam");
+ process(xmlString[2],"org.soapinterop.durationParam");
+ }
+}
Added: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeFloatPopulateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeFloatPopulateTest.java?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeFloatPopulateTest.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeFloatPopulateTest.java Tue Nov 29 20:32:06 2005
@@ -0,0 +1,30 @@
+package org.apache.axis2.databinding.schema.populate.simple;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class SimpleTypeFloatPopulateTest extends AbstractSimplePopulater{
+ private String xmlString[] = {
+ "<doubleParam>20300.00554433422</doubleParam>",
+ "<doubleParam>203045534234</doubleParam>",
+ "<doubleParam>66733.0060604343</doubleParam>"
+ };
+ // force others to implement this method
+ public void testPopulate() throws Exception {
+ process(xmlString[0],"org.soapinterop.doubleParam");
+ process(xmlString[1],"org.soapinterop.doubleParam");
+ process(xmlString[2],"org.soapinterop.doubleParam");
+ }
+}
Added: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeHexBinaryPopulateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeHexBinaryPopulateTest.java?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeHexBinaryPopulateTest.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeHexBinaryPopulateTest.java Tue Nov 29 20:32:06 2005
@@ -0,0 +1,28 @@
+package org.apache.axis2.databinding.schema.populate.simple;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class SimpleTypeHexBinaryPopulateTest extends AbstractSimplePopulater{
+ private String xmlString[] = {
+ "<hexBinParam>0FB7</hexBinParam>",
+ "<hexBinParam>FFFFFFFF</hexBinParam>",
+ };
+ // force others to implement this method
+ public void testPopulate() throws Exception {
+ process(xmlString[0],"org.soapinterop.hexBinParam");
+ process(xmlString[1],"org.soapinterop.hexBinParam");
+ }
+}
Added: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeMonthDayPopulateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeMonthDayPopulateTest.java?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeMonthDayPopulateTest.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeMonthDayPopulateTest.java Tue Nov 29 20:32:06 2005
@@ -0,0 +1,30 @@
+package org.apache.axis2.databinding.schema.populate.simple;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class SimpleTypeMonthDayPopulateTest extends AbstractSimplePopulater{
+ private String xmlString[] = {
+ "<monthDayParam>--05-12</monthDayParam>",
+ "<monthDayParam>--06-30</monthDayParam>",
+ "<monthDayParam>--12-31+05:00</monthDayParam>"
+ };
+ // force others to implement this method
+ public void testPopulate() throws Exception {
+ process(xmlString[0],"org.soapinterop.monthDayParam");
+ process(xmlString[1],"org.soapinterop.monthDayParam");
+ process(xmlString[2],"org.soapinterop.monthDayParam");
+ }
+}
Added: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeQNamePopulateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeQNamePopulateTest.java?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeQNamePopulateTest.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeQNamePopulateTest.java Tue Nov 29 20:32:06 2005
@@ -0,0 +1,30 @@
+package org.apache.axis2.databinding.schema.populate.simple;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class SimpleTypeQNamePopulateTest extends AbstractSimplePopulater{
+ private String xmlString[] = {
+ "<qNameParam>university</qNameParam>",
+ "<qNameParam xmlns:ns1=\"http://ws.apache.org/axis\">ns1:axis</qNameParam>"
+ //"<qNameParam>http://mail.google.com/mail/?auth=DQAAAHEAAAC041</qNameParam>"
+ };
+ // force others to implement this method
+ public void testPopulate() throws Exception {
+ process(xmlString[0],"org.soapinterop.qNameParam");
+ process(xmlString[1],"org.soapinterop.qNameParam");
+ // process(xmlString[2],"org.soapinterop.qNameParam");
+ }
+}
Added: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeTimePopulateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeTimePopulateTest.java?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeTimePopulateTest.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypeTimePopulateTest.java Tue Nov 29 20:32:06 2005
@@ -0,0 +1,30 @@
+package org.apache.axis2.databinding.schema.populate.simple;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class SimpleTypeTimePopulateTest extends AbstractSimplePopulater{
+ private String xmlString[] = {
+ "<timeParam>13:20:00-05:00</timeParam>",
+ "<timeParam>13:20:00</timeParam>",
+ "<timeParam>23:59:59-05:00</timeParam>"
+ };
+ // force others to implement this method
+ public void testPopulate() throws Exception {
+ process(xmlString[0],"org.soapinterop.timeParam");
+ process(xmlString[1],"org.soapinterop.timeParam");
+ process(xmlString[2],"org.soapinterop.timeParam");
+ }
+}
Added: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypegYearMonthPopulateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypegYearMonthPopulateTest.java?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypegYearMonthPopulateTest.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/SimpleTypegYearMonthPopulateTest.java Tue Nov 29 20:32:06 2005
@@ -0,0 +1,41 @@
+package org.apache.axis2.databinding.schema.populate.simple;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class SimpleTypegYearMonthPopulateTest extends AbstractSimplePopulater{
+ private String xmlString[] = {
+ "<yearMonthParam>0001-05</yearMonthParam>",
+ "<yearMonthParam>-0234-09</yearMonthParam>",
+ "<yearMonthParam>1978-01</yearMonthParam>",
+ "<yearMonthParam>1978-01-GMT</yearMonthParam>"
+
+ //todo Need to add the invalid combinations here
+
+ };
+ // force others to implement this method
+ public void testPopulate() throws Exception {
+ process(xmlString[0],"org.soapinterop.yearMonthParam");
+ process(xmlString[1],"org.soapinterop.yearMonthParam");
+ process(xmlString[2],"org.soapinterop.yearMonthParam");
+
+ try {
+ process(xmlString[3],"org.soapinterop.yearMonthParam");
+ fail();
+ } catch (Exception e) {
+
+ }
+ }
+}
Added: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/package.html
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/package.html?rev=349876&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/package.html (added)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/databinding/schema/populate/simple/package.html Tue Nov 29 20:32:06 2005
@@ -0,0 +1,26 @@
+<html>
+<body>
+ This package contains the following tests
+
+ 3.2.1 string
+ 3.2.2 boolean
+ 3.2.3 decimal
+ 3.2.4 float
+ 3.2.5 double
+ 3.2.6 duration
+ 3.2.7 dateTime
+ 3.2.8 time
+ 3.2.9 date
+ 3.2.10 gYearMonth
+ 3.2.11 gYear
+ 3.2.12 gMonthDay
+ 3.2.13 gDay
+ 3.2.14 gMonth
+ 3.2.15 hexBinary
+ 3.2.16 base64Binary
+ 3.2.17 anyURI
+ 3.2.18 QName
+ 3.2.19 NOTATION <= Not completely tested
+
+</body>
+</html>
\ No newline at end of file