Return-Path: Delivered-To: apmail-xml-axis-dev-archive@xml.apache.org Received: (qmail 16156 invoked by uid 500); 15 Sep 2002 19:16:19 -0000 Mailing-List: contact axis-dev-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@xml.apache.org Received: (qmail 16147 invoked by uid 500); 15 Sep 2002 19:16:19 -0000 Delivered-To: apmail-xml-axis-cvs@apache.org Date: 15 Sep 2002 19:16:18 -0000 Message-ID: <20020915191618.78295.qmail@icarus.apache.org> From: haddadc@apache.org To: xml-axis-cvs@apache.org Subject: cvs commit: xml-axis/java/test/wsdl/types ComprehensiveTypes.wsdl DynamicProxyTestCase.java VerifyTestCase.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N haddadc 2002/09/15 12:16:18 Modified: java/samples/echo InteropTest.wsdl InteropTestSoapBindingImpl.java TestClient.java java/src/org/apache/axis/encoding DefaultTypeMappingImpl.java java/src/org/apache/axis/types NonNegativeInteger.java java/src/org/apache/axis/utils axisNLS.properties java/src/org/apache/axis/wsdl/toJava Utils.java java/test/encoding TestDeser2001.java java/test/types PackageTests.java TestNonNegativeInteger.java java/test/wsdl/types ComprehensiveTypes.wsdl DynamicProxyTestCase.java VerifyTestCase.java Added: java/src/org/apache/axis/holders NegativeIntegerHolder.java NonPositiveIntegerHolder.java PositiveIntegerHolder.java java/src/org/apache/axis/types NegativeInteger.java NonPositiveInteger.java PositiveInteger.java java/test/types TestNegativeInteger.java TestNonPositiveInteger.java TestPositiveInteger.java Log: Added support for PositiveInteger, NegativeInteger, NonPositiveInteger - added serializers - added holders - registered the types - added tests (including wsdl tests) PR:9717 Revision Changes Path 1.5 +60 -0 xml-axis/java/samples/echo/InteropTest.wsdl Index: InteropTest.wsdl =================================================================== RCS file: /home/cvs/xml-axis/java/samples/echo/InteropTest.wsdl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- InteropTest.wsdl 4 Sep 2002 13:09:22 -0000 1.4 +++ InteropTest.wsdl 15 Sep 2002 19:16:16 -0000 1.5 @@ -259,6 +259,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -380,6 +401,18 @@ + + + + + + + + + + + + @@ -634,6 +667,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.5 +26 -1 xml-axis/java/samples/echo/InteropTestSoapBindingImpl.java Index: InteropTestSoapBindingImpl.java =================================================================== RCS file: /home/cvs/xml-axis/java/samples/echo/InteropTestSoapBindingImpl.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- InteropTestSoapBindingImpl.java 4 Sep 2002 13:09:22 -0000 1.4 +++ InteropTestSoapBindingImpl.java 15 Sep 2002 19:16:16 -0000 1.5 @@ -154,11 +154,36 @@ } /** - * This method accepts a UnsignedInt (xsd:unsignedInt) and echoes + * This method accepts a NonNegativeInteger (xsd:nonNegativeInteger) and echoes * it back to the client. */ public org.apache.axis.types.NonNegativeInteger echoNonNegativeInteger(org.apache.axis.types.NonNegativeInteger input) throws java.rmi.RemoteException { return input; } + + /** + * This method accepts a PositiveInteger (xsd:positiveInteger) and echoes + * it back to the client. + */ + public org.apache.axis.types.PositiveInteger echoPositiveInteger(org.apache.axis.types.PositiveInteger input) throws java.rmi.RemoteException { + return input; + } + + /** + * This method accepts a NonPositiveInteger (xsd:nonPositiveInteger) and echoes + * it back to the client. + */ + public org.apache.axis.types.NonPositiveInteger echoNonPositiveInteger(org.apache.axis.types.NonPositiveInteger input) throws java.rmi.RemoteException { + return input; + } + + /** + * This method accepts a NegativeInteger (xsd:negativeInteger) and echoes + * it back to the client. + */ + public org.apache.axis.types.NegativeInteger echoNegativeInteger(org.apache.axis.types.NegativeInteger input) throws java.rmi.RemoteException { + return input; + } + } 1.68 +42 -0 xml-axis/java/samples/echo/TestClient.java Index: TestClient.java =================================================================== RCS file: /home/cvs/xml-axis/java/samples/echo/TestClient.java,v retrieving revision 1.67 retrieving revision 1.68 diff -u -r1.67 -r1.68 --- TestClient.java 4 Sep 2002 13:09:22 -0000 1.67 +++ TestClient.java 15 Sep 2002 19:16:16 -0000 1.68 @@ -58,8 +58,11 @@ import org.apache.axis.AxisFault; import org.apache.axis.types.HexBinary; +import org.apache.axis.types.NegativeInteger; import org.apache.axis.types.NonNegativeInteger; +import org.apache.axis.types.NonPositiveInteger; import org.apache.axis.types.NormalizedString; +import org.apache.axis.types.PositiveInteger; import org.apache.axis.types.Token; import org.apache.axis.types.UnsignedLong; import org.apache.axis.types.UnsignedInt; @@ -297,6 +300,45 @@ } catch (Exception e) { if (!testMode) { verify("echoNonNegativeInteger", nniInput, e); + } else { + throw e; + } + } + + // Test xsd:positiveInteger + PositiveInteger piInput = new PositiveInteger("12345678901234567890"); + try { + output = binding.echoPositiveInteger(piInput); + verify("echoPositiveInteger", piInput, output); + } catch (Exception e) { + if (!testMode) { + verify("echoPositiveInteger", piInput, e); + } else { + throw e; + } + } + + // Test xsd:nonPositiveInteger + NonPositiveInteger npiInput = new NonPositiveInteger("-12345678901234567890"); + try { + output = binding.echoNonPositiveInteger(npiInput); + verify("echoNonPositiveInteger", npiInput, output); + } catch (Exception e) { + if (!testMode) { + verify("echoNonPositiveInteger", npiInput, e); + } else { + throw e; + } + } + + // Test xsd:negativeInteger + NegativeInteger niInput = new NegativeInteger("-12345678901234567890"); + try { + output = binding.echoNegativeInteger(niInput); + verify("echoNegativeInteger", niInput, output); + } catch (Exception e) { + if (!testMode) { + verify("echoNegativeInteger", niInput, e); } else { throw e; } 1.53 +24 -0 xml-axis/java/src/org/apache/axis/encoding/DefaultTypeMappingImpl.java Index: DefaultTypeMappingImpl.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/DefaultTypeMappingImpl.java,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- DefaultTypeMappingImpl.java 9 Sep 2002 17:03:25 -0000 1.52 +++ DefaultTypeMappingImpl.java 15 Sep 2002 19:16:16 -0000 1.53 @@ -464,6 +464,30 @@ Constants.XSD_NONNEGATIVEINTEGER), true); + // a xsd:negativeInteger + myRegister(Constants.XSD_NEGATIVEINTEGER, org.apache.axis.types.NegativeInteger.class, + new SimplePrimitiveSerializerFactory(org.apache.axis.types.NegativeInteger.class, + Constants.XSD_NEGATIVEINTEGER), + new SimpleDeserializerFactory(org.apache.axis.types.NegativeInteger.class, + Constants.XSD_NEGATIVEINTEGER), + true); + + // a xsd:positiveInteger + myRegister(Constants.XSD_POSITIVEINTEGER, org.apache.axis.types.PositiveInteger.class, + new SimplePrimitiveSerializerFactory(org.apache.axis.types.PositiveInteger.class, + Constants.XSD_POSITIVEINTEGER), + new SimpleDeserializerFactory(org.apache.axis.types.PositiveInteger.class, + Constants.XSD_POSITIVEINTEGER), + true); + + // a xsd:nonPositiveInteger + myRegister(Constants.XSD_NONPOSITIVEINTEGER, org.apache.axis.types.NonPositiveInteger.class, + new SimplePrimitiveSerializerFactory(org.apache.axis.types.NonPositiveInteger.class, + Constants.XSD_NONPOSITIVEINTEGER), + new SimpleDeserializerFactory(org.apache.axis.types.NonPositiveInteger.class, + Constants.XSD_NONPOSITIVEINTEGER), + true); + // a xsd:Name myRegister(Constants.XSD_NAME, org.apache.axis.types.Name.class, new SimplePrimitiveSerializerFactory(org.apache.axis.types.Name.class, 1.1 xml-axis/java/src/org/apache/axis/holders/NegativeIntegerHolder.java Index: NegativeIntegerHolder.java =================================================================== /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Axis" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.axis.holders; import org.apache.axis.types.NegativeInteger; import javax.xml.rpc.holders.Holder; /** * Class NegativeIntegerHolder * */ public final class NegativeIntegerHolder implements Holder { /** Field _value */ public NegativeInteger value; /** * Constructor NegativeIntegerHolder */ public NegativeIntegerHolder() { } /** * Constructor NegativeIntegerHolder * * @param value */ public NegativeIntegerHolder(NegativeInteger value) { this.value = value; } } 1.1 xml-axis/java/src/org/apache/axis/holders/NonPositiveIntegerHolder.java Index: NonPositiveIntegerHolder.java =================================================================== /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Axis" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.axis.holders; import org.apache.axis.types.NonPositiveInteger; import javax.xml.rpc.holders.Holder; /** * Class NonPositiveIntegerHolder * */ public final class NonPositiveIntegerHolder implements Holder { /** Field _value */ public NonPositiveInteger value; /** * Constructor NonPositiveIntegerHolder */ public NonPositiveIntegerHolder() { } /** * Constructor NonPositiveIntegerHolder * * @param value */ public NonPositiveIntegerHolder(NonPositiveInteger value) { this.value = value; } } 1.1 xml-axis/java/src/org/apache/axis/holders/PositiveIntegerHolder.java Index: PositiveIntegerHolder.java =================================================================== /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Axis" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.axis.holders; import org.apache.axis.types.PositiveInteger; import javax.xml.rpc.holders.Holder; /** * Class PositiveIntegerHolder * */ public final class PositiveIntegerHolder implements Holder { /** Field _value */ public PositiveInteger value; /** * Constructor PositiveIntegerHolder */ public PositiveIntegerHolder() { } /** * Constructor PositiveIntegerHolder * * @param value */ public PositiveIntegerHolder(PositiveInteger value) { this.value = value; } } 1.4 +1 -1 xml-axis/java/src/org/apache/axis/types/NonNegativeInteger.java Index: NonNegativeInteger.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/types/NonNegativeInteger.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- NonNegativeInteger.java 9 Sep 2002 17:03:27 -0000 1.3 +++ NonNegativeInteger.java 15 Sep 2002 19:16:17 -0000 1.4 @@ -65,7 +65,7 @@ * Custom class for supporting primitive XSD data type nonNegativeInteger * * @author Russell Butek - * @see XML Schema 3.3.22 + * @see XML Schema 3.3.20 */ public class NonNegativeInteger extends BigInteger { 1.1 xml-axis/java/src/org/apache/axis/types/NegativeInteger.java Index: NegativeInteger.java =================================================================== /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Axis" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.axis.types; import java.math.BigInteger; import java.util.Random; import org.apache.axis.types.NonPositiveInteger; import org.apache.axis.utils.JavaUtils; import org.apache.axis.utils.Messages; /** * Custom class for supporting primitive XSD data type negativeinteger * * negativeInteger is derived from nonPositiveInteger by setting the * value of maxInclusive to be -1. This results in the standard * mathematical concept of the negative integers. The value space of * negativeInteger is the infinite set {...,-2,-1}. * The base type of negativeInteger is nonPositiveInteger. * * @author Chris Haddad * @see XML Schema 3.3.15 */ public class NegativeInteger extends NonPositiveInteger { public NegativeInteger(byte[] val) { super(val); checkValidity(); } // ctor public NegativeInteger(int signum, byte[] magnitude) { super(signum, magnitude); checkValidity(); } // ctor public NegativeInteger(int bitLength, int certainty, Random rnd) { super(bitLength, certainty, rnd); checkValidity(); } // ctor public NegativeInteger(int numBits, Random rnd) { super(numBits, rnd); checkValidity(); } // ctor public NegativeInteger(String val) { super(val); checkValidity(); } public NegativeInteger(String val, int radix) { super(val, radix); checkValidity(); } // ctor /** * validate the value against the xsd definition */ private BigInteger zero = new BigInteger("0"); private void checkValidity() { if (compareTo(zero) >= 0) { throw new NumberFormatException( Messages.getMessage("badnegInt00") + ": " + this); } } // checkValidity } // class NonNegativeInteger 1.1 xml-axis/java/src/org/apache/axis/types/NonPositiveInteger.java Index: NonPositiveInteger.java =================================================================== /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Axis" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.axis.types; import java.math.BigInteger; import java.util.Random; import org.apache.axis.utils.JavaUtils; import org.apache.axis.utils.Messages; /** * Custom class for supporting primitive XSD data type nonPositiveInteger * * nonPositiveInteger is derived from integer by setting the value of * maxInclusive to be 0. This results in the standard mathematical * concept of the non-positive integers. The value space of * nonPositiveInteger is the infinite set {...,-2,-1,0}. * * @author Chris Haddad XML Schema 3.3.14 */ public class NonPositiveInteger extends BigInteger { public NonPositiveInteger(byte[] val) { super(val); checkValidity(); } // ctor public NonPositiveInteger(int signum, byte[] magnitude) { super(signum, magnitude); checkValidity(); } // ctor public NonPositiveInteger(int bitLength, int certainty, Random rnd) { super(bitLength, certainty, rnd); checkValidity(); } // ctor public NonPositiveInteger(int numBits, Random rnd) { super(numBits, rnd); checkValidity(); } // ctor public NonPositiveInteger(String val) { super(val); checkValidity(); } public NonPositiveInteger(String val, int radix) { super(val, radix); checkValidity(); } // ctor /** * validate the value against the xsd definition */ private BigInteger zero = new BigInteger("0"); private void checkValidity() { if (compareTo(zero) > 0) { throw new NumberFormatException( Messages.getMessage("badNonPosInt00") + ": " + this); } } // checkValidity } // class NonPositiveInteger 1.1 xml-axis/java/src/org/apache/axis/types/PositiveInteger.java Index: PositiveInteger.java =================================================================== /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Axis" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package org.apache.axis.types; import java.math.BigInteger; import java.util.Random; import org.apache.axis.types.NonNegativeInteger; import org.apache.axis.utils.JavaUtils; import org.apache.axis.utils.Messages; /** * Custom class for supporting primitive XSD data type positiveInteger * * positiveInteger is derived from nonNegativeInteger by setting the value of minInclusive to be 1. * This results in the standard mathematical concept of the positive integer numbers. The value space * of positiveInteger is the infinite set {1,2,...}. * * @author Chris Haddad * @see XML Schema 3.3.25 */ public class PositiveInteger extends NonNegativeInteger { public PositiveInteger(byte[] val) { super(val); checkValidity(); } // ctor public PositiveInteger(int signum, byte[] magnitude) { super(signum, magnitude); checkValidity(); } // ctor public PositiveInteger(int bitLength, int certainty, Random rnd) { super(bitLength, certainty, rnd); checkValidity(); } // ctor public PositiveInteger(int numBits, Random rnd) { super(numBits, rnd); checkValidity(); } // ctor public PositiveInteger(String val) { super(val); checkValidity(); } public PositiveInteger(String val, int radix) { super(val, radix); checkValidity(); } // ctor /** * validate the value against the xsd definition */ private BigInteger iMinInclusive = new BigInteger("1"); private void checkValidity() { if (compareTo(iMinInclusive) < 0) { throw new NumberFormatException( Messages.getMessage("badposInt00") + ": " + this); } } // checkValidity } // class NonNegativeInteger 1.61 +4 -0 xml-axis/java/src/org/apache/axis/utils/axisNLS.properties Index: axisNLS.properties =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/axisNLS.properties,v retrieving revision 1.60 retrieving revision 1.61 diff -u -r1.60 -r1.61 --- axisNLS.properties 13 Sep 2002 15:18:10 -0000 1.60 +++ axisNLS.properties 15 Sep 2002 19:16:17 -0000 1.61 @@ -57,7 +57,10 @@ badNamespace00=Bad envelope namespace: {0} badNameType00=Invalid Name badNCNameType00=Invalid NCName +badnegInt00=Invalid negativeInteger badNmtoken00=Invalid Nmtoken +badNonNegInt00=Invalid nonNegativeInteger +badNonPosInt00=Invalid nonPositiveInteger badOffset00=Malformed offset attribute ''{0}''. badpackage00=Error: --NStoPKG and --package switch can't be used together # NOTE: in badParmMode00, do not translate "Parameter". @@ -65,6 +68,7 @@ badPosition00=Malformed position attribute ''{0}''. badProxy00=Proxy port number, "{0}", incorrectly formatted badPort00=portName should not be null +badposInt00=Invalid positiveInteger # NOTE: in badRequest00, do not translate "GET", "POST" badRequest00=Cannot handle non-GET, non-POST request 1.56 +3 -0 xml-axis/java/src/org/apache/axis/wsdl/toJava/Utils.java Index: Utils.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/Utils.java,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- Utils.java 4 Sep 2002 13:09:23 -0000 1.55 +++ Utils.java 15 Sep 2002 19:16:17 -0000 1.56 @@ -764,6 +764,9 @@ constructorThrowMap.put("org.apache.axis.types.UnsignedShort", "new org.apache.axis.types.UnsignedShort(0)"); constructorThrowMap.put("org.apache.axis.types.UnsignedByte", "new org.apache.axis.types.UnsignedByte(0)"); constructorThrowMap.put("org.apache.axis.types.NonNegativeInteger", "new org.apache.axis.types.NonNegativeInteger(\"0\")"); + constructorThrowMap.put("org.apache.axis.types.PositiveInteger", "new org.apache.axis.types.PositiveInteger(\"1\")"); + constructorThrowMap.put("org.apache.axis.types.NonPositiveInteger", "new org.apache.axis.types.NonPositiveInteger(\"0\")"); + constructorThrowMap.put("org.apache.axis.types.NegativeInteger", "new org.apache.axis.types.NegativeInteger(\"-1\")"); constructorThrowMap.put("org.apache.axis.types.URI", "new org.apache.axis.types.URI(\"urn:testing\")"); constructorThrowMap.put("org.apache.axis.types.Year", "new org.apache.axis.types.Year(2000)"); constructorThrowMap.put("org.apache.axis.types.Month", "new org.apache.axis.types.Month(1)"); 1.24 +18 -0 xml-axis/java/test/encoding/TestDeser2001.java Index: TestDeser2001.java =================================================================== RCS file: /home/cvs/xml-axis/java/test/encoding/TestDeser2001.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- TestDeser2001.java 4 Sep 2002 13:09:23 -0000 1.23 +++ TestDeser2001.java 15 Sep 2002 19:16:17 -0000 1.24 @@ -3,8 +3,11 @@ import org.apache.axis.Constants; import org.apache.axis.types.HexBinary; +import org.apache.axis.types.NegativeInteger; import org.apache.axis.types.NonNegativeInteger; +import org.apache.axis.types.NonPositiveInteger; import org.apache.axis.types.NormalizedString; +import org.apache.axis.types.PositiveInteger; import org.apache.axis.types.Token; import org.apache.axis.types.UnsignedLong; import org.apache.axis.types.UnsignedInt; @@ -201,6 +204,21 @@ public void testNonNegativeInteger() throws Exception { deserialize("12345678901234567890", new NonNegativeInteger("12345678901234567890"), true); + } + + public void testNonPositiveInteger() throws Exception { + deserialize("-12345678901234567890", + new NonPositiveInteger("-12345678901234567890"), true); + } + + public void testNegativeInteger() throws Exception { + deserialize("-12345678901234567890", + new NegativeInteger("-12345678901234567890"), true); + } + + public void testPositiveInteger() throws Exception { + deserialize("12345678901234567890", + new PositiveInteger("12345678901234567890"), true); } public void testName() throws Exception { 1.3 +3 -0 xml-axis/java/test/types/PackageTests.java Index: PackageTests.java =================================================================== RCS file: /home/cvs/xml-axis/java/test/types/PackageTests.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- PackageTests.java 4 Sep 2002 13:09:23 -0000 1.2 +++ PackageTests.java 15 Sep 2002 19:16:17 -0000 1.3 @@ -74,6 +74,9 @@ TestSuite suite = new TestSuite(); suite.addTestSuite(TestNonNegativeInteger.class); + suite.addTestSuite(TestPositiveInteger.class); + suite.addTestSuite(TestNonPositiveInteger.class); + suite.addTestSuite(TestNegativeInteger.class); suite.addTestSuite(TestNormalizedString.class); suite.addTestSuite(TestToken.class); suite.addTestSuite(TestUnsignedLong.class); 1.2 +7 -0 xml-axis/java/test/types/TestNonNegativeInteger.java Index: TestNonNegativeInteger.java =================================================================== RCS file: /home/cvs/xml-axis/java/test/types/TestNonNegativeInteger.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- TestNonNegativeInteger.java 4 Sep 2002 13:09:23 -0000 1.1 +++ TestNonNegativeInteger.java 15 Sep 2002 19:16:17 -0000 1.2 @@ -119,4 +119,11 @@ runPassTest("0"); } + /** + * Test that a number below MinInclusive fails + */ + public void testBelowMinExclusive() throws Exception { + runFailTest("-1"); + } + } 1.1 xml-axis/java/test/types/TestNegativeInteger.java Index: TestNegativeInteger.java =================================================================== /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Axis" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package test.types; import junit.framework.TestCase; import org.apache.axis.types.NegativeInteger; /** * Test validation of types.NonNegativeInteger */ public class TestNegativeInteger extends TestCase { public TestNegativeInteger(String name) { super(name); } /** * Run a failure test. value should be invalid. */ private void runFailTest(String value) throws Exception { NegativeInteger oNegativeInteger = null; try { oNegativeInteger = new NegativeInteger(value); } catch (Exception e) { // catch the validation exception } // object is not iNstantiated on bad data value assertNull("validation restriction failed [" + value + "]. did not restrict bad value.", oNegativeInteger); } /** * Run a successful test. value should be valid. */ private void runPassTest(String value) throws Exception { NegativeInteger oNegativeInteger = null; try { oNegativeInteger = new NegativeInteger(value); } catch (Exception e) { // catch the validation exception } assertEquals("unsigned int not equal" + value, oNegativeInteger.toString(), value); } /** * Test that a Negative value succeeeds */ public void testNegativeValue() throws Exception { runPassTest("-12345678901234567890"); } /** * Test that a positive number fails */ public void testPositiveValue() throws Exception { runFailTest("123"); } /** * Test that a number at MaxInclusive succeeds */ public void testMaxInclusive() throws Exception { runPassTest("-1"); } /** * Test that a number above MaxInclusive fails */ public void testAboveMaxInclusive() throws Exception { runFailTest("0"); } } 1.1 xml-axis/java/test/types/TestNonPositiveInteger.java Index: TestNonPositiveInteger.java =================================================================== /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Axis" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package test.types; import junit.framework.TestCase; import org.apache.axis.types.NonPositiveInteger; /** * Test validation of types.NonNegativeInteger */ public class TestNonPositiveInteger extends TestCase { public TestNonPositiveInteger(String name) { super(name); } /** * Run a failure test. value should be invalid. */ private void runFailTest(String value) throws Exception { NonPositiveInteger oNonPositiveInteger = null; try { oNonPositiveInteger = new NonPositiveInteger(value); } catch (Exception e) { // catch the validation exception } // object is not iNstantiated on bad data value assertNull("validation restriction failed [" + value + "]. did not restrict bad value.", oNonPositiveInteger); } /** * Run a successful test. value should be valid. */ private void runPassTest(String value) throws Exception { NonPositiveInteger oNonPositiveInteger = null; try { oNonPositiveInteger = new NonPositiveInteger(value); } catch (Exception e) { // catch the validation exception } assertEquals("unsigned int not equal" + value, oNonPositiveInteger.toString(), value); } /** * Test that a Negative value succeeeds */ public void testnonPositiveValue() throws Exception { runPassTest("-12345678901234567890"); } /** * Test that a positive number fails */ public void testPositiveValue() throws Exception { runFailTest("123"); } /** * Test that a number at MaxInclusive succeeds */ public void testMaxInclusive() throws Exception { runPassTest("0"); } /** * Test that a number above MaxInclusive fails */ public void testAboveMaxInclusive() throws Exception { runFailTest("1"); } } 1.1 xml-axis/java/test/types/TestPositiveInteger.java Index: TestPositiveInteger.java =================================================================== /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Axis" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package test.types; import junit.framework.TestCase; import org.apache.axis.types.PositiveInteger; /** * Test validation of types.positiveInteger */ public class TestPositiveInteger extends TestCase { public TestPositiveInteger(String name) { super(name); } /** * Run a failure test. value should be invalid. */ private void runFailTest(String value) throws Exception { PositiveInteger oPositiveInteger = null; try { oPositiveInteger = new PositiveInteger(value); } catch (Exception e) { // catch the validation exception } // object is not iNstantiated on bad data value assertNull("validation restriction failed [" + value + "]. did not restrict bad value.", oPositiveInteger); } /** * Run a successful test. value should be valid. */ private void runPassTest(String value) throws Exception { PositiveInteger oPositiveInteger = null; try { oPositiveInteger = new PositiveInteger(value); } catch (Exception e) { // catch the validation exception } assertEquals("positive integer not equal" + value, oPositiveInteger.toString(), value); } /** * Test that a positive value succeeeds */ public void TestPositiveValue() throws Exception { runPassTest("12345678901234567890"); } /** * Test that a negative number fails */ public void testNegativeValue() throws Exception { runFailTest("-123"); } /** * Test that a number at MinInclusive succeeds */ public void testMinExclusive() throws Exception { runPassTest("1"); } /** * Test that a number less than MinInclusive fails */ public void testBelowMinExclusive() throws Exception { runFailTest("0"); } } 1.43 +92 -1 xml-axis/java/test/wsdl/types/ComprehensiveTypes.wsdl Index: ComprehensiveTypes.wsdl =================================================================== RCS file: /home/cvs/xml-axis/java/test/wsdl/types/ComprehensiveTypes.wsdl,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- ComprehensiveTypes.wsdl 4 Sep 2002 13:09:23 -0000 1.42 +++ ComprehensiveTypes.wsdl 15 Sep 2002 19:16:17 -0000 1.43 @@ -379,7 +379,7 @@ - + @@ -423,6 +423,9 @@ + + + @@ -630,6 +633,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1133,6 +1166,18 @@ + + + + + + + + + + + + @@ -2285,6 +2330,52 @@ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.12 +15 -0 xml-axis/java/test/wsdl/types/DynamicProxyTestCase.java Index: DynamicProxyTestCase.java =================================================================== RCS file: /home/cvs/xml-axis/java/test/wsdl/types/DynamicProxyTestCase.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- DynamicProxyTestCase.java 4 Sep 2002 13:09:23 -0000 1.11 +++ DynamicProxyTestCase.java 15 Sep 2002 19:16:17 -0000 1.12 @@ -50,6 +50,9 @@ import test.wsdl.types.comprehensive_service.TypeTest; import org.apache.axis.types.NonNegativeInteger; +import org.apache.axis.types.PositiveInteger; +import org.apache.axis.types.NonPositiveInteger; +import org.apache.axis.types.NegativeInteger; import org.apache.axis.types.Time; import org.apache.axis.types.UnsignedLong; import org.apache.axis.types.UnsignedInt; @@ -61,7 +64,10 @@ import org.apache.axis.types.Day; import org.apache.axis.types.YearMonth; import org.apache.axis.types.MonthDay; +import org.apache.axis.holders.NegativeIntegerHolder; import org.apache.axis.holders.NonNegativeIntegerHolder; +import org.apache.axis.holders.NonPositiveIntegerHolder; +import org.apache.axis.holders.PositiveIntegerHolder; import org.apache.axis.holders.TimeHolder; import org.apache.axis.holders.UnsignedLongHolder; import org.apache.axis.holders.UnsignedShortHolder; @@ -143,6 +149,9 @@ new UnsignedShort(0), new UnsignedByte(0), new NonNegativeInteger("0"), + new PositiveInteger("1"), + new NonPositiveInteger("0"), + new NegativeInteger("-1"), new URI("urn:this-is-a-test"), new Year(1995), new Month(7), @@ -203,6 +212,9 @@ new UnsignedShortHolder(new UnsignedShort(0)), new UnsignedByteHolder(new UnsignedByte(0)), new NonNegativeIntegerHolder(new NonNegativeInteger("0")), + new PositiveIntegerHolder(new PositiveInteger("1")), + new NonPositiveIntegerHolder(new NonPositiveInteger("0")), + new NegativeIntegerHolder(new NegativeInteger("-1")), new URIHolder(new URI("urn:this-is-a-test")), new YearHolder(new Year(1995)), new MonthHolder(new Month(7)), @@ -263,6 +275,9 @@ new UnsignedShortHolder(), new UnsignedByteHolder(), new NonNegativeIntegerHolder(), + new PositiveIntegerHolder(), + new NonPositiveIntegerHolder(), + new NegativeIntegerHolder(), new URIHolder(), new YearHolder(), new MonthHolder(), 1.33 +54 -0 xml-axis/java/test/wsdl/types/VerifyTestCase.java Index: VerifyTestCase.java =================================================================== RCS file: /home/cvs/xml-axis/java/test/wsdl/types/VerifyTestCase.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- VerifyTestCase.java 4 Sep 2002 13:09:23 -0000 1.32 +++ VerifyTestCase.java 15 Sep 2002 19:16:17 -0000 1.33 @@ -73,7 +73,10 @@ import test.wsdl.types.comprehensive_service.TypeTest; import test.wsdl.types.comprehensive_service.TypeTestServiceLocator; +import org.apache.axis.types.NegativeInteger; import org.apache.axis.types.NonNegativeInteger; +import org.apache.axis.types.NonPositiveInteger; +import org.apache.axis.types.PositiveInteger; import org.apache.axis.types.UnsignedLong; import org.apache.axis.types.UnsignedInt; import org.apache.axis.types.UnsignedShort; @@ -85,7 +88,10 @@ import org.apache.axis.types.YearMonth; import org.apache.axis.types.MonthDay; import org.apache.axis.holders.TimeHolder; +import org.apache.axis.holders.NegativeIntegerHolder; import org.apache.axis.holders.NonNegativeIntegerHolder; +import org.apache.axis.holders.NonPositiveIntegerHolder; +import org.apache.axis.holders.PositiveIntegerHolder; import org.apache.axis.holders.UnsignedLongHolder; import org.apache.axis.holders.UnsignedByteHolder; import org.apache.axis.holders.UnsignedShortHolder; @@ -118,6 +124,9 @@ UnsignedShort ushort = null; UnsignedByte ubyte = null; NonNegativeInteger nnint = null; + PositiveInteger pint = null; + NonPositiveInteger npint = null; + NegativeInteger nint = null; URI uri = null; Year year = null; Month month = null; @@ -131,6 +140,9 @@ ushort = new UnsignedShort(77); ubyte = new UnsignedByte(7); nnint = new NonNegativeInteger("7"); + pint = new PositiveInteger("7"); + npint = new NonPositiveInteger("-7"); + nint = new NegativeInteger("-7"); uri = new URI("urn:this-is-a-test"); year = new Year(1995); month = new Month(7); @@ -172,6 +184,9 @@ ushort, ubyte, nnint, + pint, + npint, + nint, uri, year, month, @@ -212,6 +227,9 @@ new UnsignedShortHolder(ushort), new UnsignedByteHolder(ubyte), new NonNegativeIntegerHolder(nnint), + new PositiveIntegerHolder(pint), + new NonPositiveIntegerHolder(npint), + new NegativeIntegerHolder(nint), new URIHolder(uri), new YearHolder(year), new MonthHolder(month), @@ -252,6 +270,9 @@ new UnsignedShortHolder(), new UnsignedByteHolder(), new NonNegativeIntegerHolder(), + new PositiveIntegerHolder(), + new NonPositiveIntegerHolder(), + new NegativeIntegerHolder(), new URIHolder(), new YearHolder(), new MonthHolder(), @@ -730,6 +751,39 @@ NonNegativeInteger actual = binding.methodNonNegativeInteger(sendValue, nnih); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("methodNonNegativeInteger Exception caught: " + re ); + } + try { + PositiveInteger sendValue = null; + try { + sendValue = new PositiveInteger("246802468024680"); + } catch (Exception e) { + } + PositiveIntegerHolder pih = new PositiveIntegerHolder(sendValue); + PositiveInteger actual = binding.methodPositiveInteger(sendValue, pih); + } catch (java.rmi.RemoteException re) { + throw new junit.framework.AssertionFailedError("methodPositiveInteger Exception caught: " + re ); + } + try { + NonPositiveInteger sendValue = null; + try { + sendValue = new NonPositiveInteger("-246802468024680"); + } catch (Exception e) { + } + NonPositiveIntegerHolder npih = new NonPositiveIntegerHolder(sendValue); + NonPositiveInteger actual = binding.methodNonPositiveInteger(sendValue, npih); + } catch (java.rmi.RemoteException re) { + throw new junit.framework.AssertionFailedError("methodNonPositiveInteger Exception caught: " + re ); + } + try { + NegativeInteger sendValue = null; + try { + sendValue = new NegativeInteger("-246802468024680"); + } catch (Exception e) { + } + NegativeIntegerHolder nih = new NegativeIntegerHolder(sendValue); + NegativeInteger actual = binding.methodNegativeInteger(sendValue, nih); + } catch (java.rmi.RemoteException re) { + throw new junit.framework.AssertionFailedError("methodNegativeInteger Exception caught: " + re ); } try { URI sendValue = null;