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 Tom Jordahl <to...@macromedia.com> on 2002/09/04 16:17:19 UTC

RE: cvs commit: xml-axis/java/test/wsdl/types ComprehensiveTypes. wsdl DynamicProxyTestCase.java VerifyTestCase.java

+1

Russell, if we support NonNegativeInteger, we should support the other 3:
PositiveInteger, NonPositiveInteger, and NegativeInteger.

Can you add those too?   :-)

BTW, there were some comments in this submit that you didn't change from UnsignedInt
and you left Chris Haddad as an @author in one of the files.


--
Tom Jordahl
Macromedia Server Development



-----Original Message-----
From: butek@apache.org [mailto:butek@apache.org]
Sent: Wednesday, September 04, 2002 9:09 AM
To: xml-axis-cvs@apache.org
Subject: cvs commit: xml-axis/java/test/wsdl/types
ComprehensiveTypes.wsdl DynamicProxyTestCase.java VerifyTestCase.java


butek       2002/09/04 06:09:23

  Modified:    java/samples/echo InteropTest.wsdl
                        InteropTestSoapBindingImpl.java TestClient.java
               java/src/org/apache/axis/encoding
                        DefaultTypeMappingImpl.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
               java/test/wsdl/types ComprehensiveTypes.wsdl
                        DynamicProxyTestCase.java VerifyTestCase.java
  Added:       java/src/org/apache/axis/holders
                        NonNegativeIntegerHolder.java
               java/src/org/apache/axis/types NonNegativeInteger.java
               java/test/types TestNonNegativeInteger.java
  Log:
  Added support and tests for xsd:nonNegativeInteger.  Needed by WS-I.
  
  Revision  Changes    Path
  1.4       +20 -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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- InteropTest.wsdl	7 Aug 2002 21:02:10 -0000	1.3
  +++ InteropTest.wsdl	4 Sep 2002 13:09:22 -0000	1.4
  @@ -253,6 +253,13 @@
       <part name="return" type="xsd:unsignedByte"/>
     </message>
   
  +  <message name="echoNonNegativeIntegerRequest">
  +    <part name="inputNonNegativeInteger" type="xsd:nonNegativeInteger"/>
  +  </message>
  +  <message name="echoNonNegativeIntegerResponse">
  +    <part name="return" type="xsd:nonNegativeInteger"/>
  +  </message>
  +
     <portType name="InteropTestPortType">
       <operation name="echoString" parameterOrder="inputString">
         <input message="tns:echoStringRequest"/>
  @@ -369,6 +376,10 @@
         <input message="tns:echoUnsignedByteRequest"/>
         <output message="tns:echoUnsignedByteResponse"/>
       </operation>
  +    <operation name="echoNonNegativeInteger">
  +      <input message="tns:echoNonNegativeIntegerRequest"/>
  +      <output message="tns:echoNonNegativeIntegerResponse"/>
  +    </operation>
     </portType>
   
     <binding name="InteropTestSoapBinding" type="tns:InteropTestPortType">
  @@ -614,6 +625,15 @@
         </output>
       </operation>
       <operation name="echoUnsignedByte">
  +      <soap:operation soapAction="http://soapinterop.org/"/>
  +      <input>
  +        <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </input>
  +      <output>
  +      <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </output>
  +    </operation>
  +    <operation name="echoNonNegativeInteger">
         <soap:operation soapAction="http://soapinterop.org/"/>
         <input>
           <soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  
  
  
  1.4       +8 -0      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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- InteropTestSoapBindingImpl.java	7 Aug 2002 21:02:10 -0000	1.3
  +++ InteropTestSoapBindingImpl.java	4 Sep 2002 13:09:22 -0000	1.4
  @@ -153,4 +153,12 @@
               return input;
           }
   
  +    /**
  +     * This method accepts a UnsignedInt (xsd:unsignedInt) 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;
  +        }
  +
   }
  
  
  
  1.67      +14 -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.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- TestClient.java	7 Aug 2002 21:02:10 -0000	1.66
  +++ TestClient.java	4 Sep 2002 13:09:22 -0000	1.67
  @@ -58,6 +58,7 @@
   import org.apache.axis.AxisFault;
   
   import org.apache.axis.types.HexBinary;
  +import org.apache.axis.types.NonNegativeInteger;
   import org.apache.axis.types.NormalizedString;
   import org.apache.axis.types.Token;
   import org.apache.axis.types.UnsignedLong;
  @@ -283,6 +284,19 @@
           } catch (Exception e) {
               if (!testMode) {
                   verify("echoUnsignedByte", ubInput, e);
  +            } else {
  +                throw e;
  +            }
  +        }
  +
  +        // Test xsd:nonNegativeInteger
  +        NonNegativeInteger nniInput = new NonNegativeInteger("12345678901234567890");
  +        try {
  +            output = binding.echoNonNegativeInteger(nniInput);
  +            verify("echoNonNegativeInteger", nniInput, output);
  +        } catch (Exception e) {
  +            if (!testMode) {
  +                verify("echoNonNegativeInteger", nniInput, e);
               } else {
                   throw e;
               }
  
  
  
  1.51      +8 -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.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- DefaultTypeMappingImpl.java	29 Aug 2002 20:05:51 -0000	1.50
  +++ DefaultTypeMappingImpl.java	4 Sep 2002 13:09:22 -0000	1.51
  @@ -455,6 +455,14 @@
                                                Constants.XSD_UNSIGNEDBYTE),
                      true);
   
  +        // a xsd:nonNegativeInteger
  +        myRegister(Constants.XSD_NONNEGATIVEINTEGER, org.apache.axis.types.NonNegativeInteger.class,
  +             new SimplePrimitiveSerializerFactory(org.apache.axis.types.NonNegativeInteger.class,
  +                                                  Constants.XSD_NONNEGATIVEINTEGER),
  +             new SimpleDeserializerFactory(org.apache.axis.types.NonNegativeInteger.class,
  +                                           Constants.XSD_NONNEGATIVEINTEGER),
  +             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/NonNegativeIntegerHolder.java
  
  Index: NonNegativeIntegerHolder.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
   * <http://www.apache.org/>.
   */
  
  package org.apache.axis.holders;
  
  import org.apache.axis.types.NonNegativeInteger;
  
  import javax.xml.rpc.holders.Holder;
  
  /**
   * Class UnsignedIntHolder
   *
   */
  public final class NonNegativeIntegerHolder implements Holder {
  
      /** Field _value */
      public NonNegativeInteger value;
  
      /**
       * Constructor NonNegativeIntegerHolder
       */
      public NonNegativeIntegerHolder() {
      }
  
      /**
       * Constructor NonNegativeIntegerHolder
       *
       * @param value
       */
      public NonNegativeIntegerHolder(NonNegativeInteger value) {
          this.value = value;
      }
  }
  
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/types/NonNegativeInteger.java
  
  Index: NonNegativeInteger.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
   * <http://www.apache.org/>.
   */
  package org.apache.axis.types;
  
  import java.math.BigInteger;
  
  import java.util.Random;
  
  import org.apache.axis.utils.JavaUtils;
  
  /**
   * Custom class for supporting primitive XSD data type nonNegativeInteger
   *
   * @author Chris Haddad <ch...@cobia.net>
   * @see <a href="http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger">XML Schema 3.3.22</a>
   */
  public class NonNegativeInteger extends BigInteger {
  
      public NonNegativeInteger(byte[] val) {
          super(val);
          checkValidity();
      } // ctor
  
      public NonNegativeInteger(int signum, byte[] magnitude) {
          super(signum, magnitude);
          checkValidity();
      } // ctor
  
      public NonNegativeInteger(int bitLength, int certainty, Random rnd) {
          super(bitLength, certainty, rnd);
          checkValidity();
      } // ctor
  
      public NonNegativeInteger(int numBits, Random rnd) {
          super(numBits, rnd);
          checkValidity();
      } // ctor
  
      public NonNegativeInteger(String val) {
          super(val);
          checkValidity();
      }
  
      public NonNegativeInteger(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(
                      JavaUtils.getMessage("badNonNegInt00")
                      + ":  " + this);
          }
      } // checkValidity
  
  } // class NonNegativeInteger
  
  
  
  1.57      +2 -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.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- axisNLS.properties	3 Sep 2002 20:36:44 -0000	1.56
  +++ axisNLS.properties	4 Sep 2002 13:09:23 -0000	1.57
  @@ -1007,3 +1007,5 @@
   
   noClassNameAttr00=classname attribute is missing.
   noValidHeader=qname attribute is missing.
  +
  +badNonNegInt00=Invalid nonNegativeInteger
  
  
  
  1.55      +1 -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.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- Utils.java	28 Aug 2002 22:53:17 -0000	1.54
  +++ Utils.java	4 Sep 2002 13:09:23 -0000	1.55
  @@ -763,6 +763,7 @@
           constructorThrowMap.put("org.apache.axis.types.UnsignedInt", "new org.apache.axis.types.UnsignedInt(0)");
           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.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.23      +6 -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.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- TestDeser2001.java	22 Aug 2002 22:00:42 -0000	1.22
  +++ TestDeser2001.java	4 Sep 2002 13:09:23 -0000	1.23
  @@ -3,6 +3,7 @@
   import org.apache.axis.Constants;
   
   import org.apache.axis.types.HexBinary;
  +import org.apache.axis.types.NonNegativeInteger;
   import org.apache.axis.types.NormalizedString;
   import org.apache.axis.types.Token;
   import org.apache.axis.types.UnsignedLong;
  @@ -195,6 +196,11 @@
       public void testUnsignedByte() throws Exception {
           deserialize("<result xsi:type=\"xsd:unsignedByte\">103</result>",
                       new UnsignedByte(103),true);
  +    }
  +
  +    public void testNonNegativeInteger() throws Exception {
  +        deserialize("<result xsi:type=\"xsd:nonNegativeInteger\">12345678901234567890</result>",
  +                    new NonNegativeInteger("12345678901234567890"), true);
       }
   
       public void testName() throws Exception {
  
  
  
  1.2       +1 -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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PackageTests.java	16 Aug 2002 20:28:51 -0000	1.1
  +++ PackageTests.java	4 Sep 2002 13:09:23 -0000	1.2
  @@ -73,6 +73,7 @@
       {
           TestSuite suite = new TestSuite();
   
  +        suite.addTestSuite(TestNonNegativeInteger.class);
           suite.addTestSuite(TestNormalizedString.class);
           suite.addTestSuite(TestToken.class);
           suite.addTestSuite(TestUnsignedLong.class);
  
  
  
  1.1                  xml-axis/java/test/types/TestNonNegativeInteger.java
  
  Index: TestNonNegativeInteger.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
   * <http://www.apache.org/>.
   */
  
  package test.types;
  
  import junit.framework.TestCase;
  
  import org.apache.axis.types.NonNegativeInteger;
  
  /**
   * Test validation of types.NonNegativeInteger
   */
  public class TestNonNegativeInteger extends TestCase {
  
      public TestNonNegativeInteger(String name) {
          super(name);
      }
  
      /**
       * Run a failure test.  value should be invalid.
       */
      private void runFailTest(String value) throws Exception {
          NonNegativeInteger oNonNegativeInteger = null;
          try {
              oNonNegativeInteger = new NonNegativeInteger(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.", oNonNegativeInteger);
      }
  
      /**
       * Run a successful test.  value should be valid.
       */
      private void runPassTest(String value) throws Exception {
          NonNegativeInteger oNonNegativeInteger = null;
          try {
              oNonNegativeInteger = new NonNegativeInteger(value);
          }
          catch (Exception e) { // catch the validation exception
          }
          assertEquals("unsigned int not equal" +
                  value, oNonNegativeInteger.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("0");
      }
  
  }
  
  
  
  1.42      +30 -0     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.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- ComprehensiveTypes.wsdl	30 Aug 2002 15:45:29 -0000	1.41
  +++ ComprehensiveTypes.wsdl	4 Sep 2002 13:09:23 -0000	1.42
  @@ -422,6 +422,7 @@
       <part name="unsignedInt" type="xsd:unsignedInt"/>
       <part name="unsignedShort" type="xsd:unsignedShort"/>
       <part name="unsignedByte" type="xsd:unsignedByte"/>
  +    <part name="nonNegativeInteger" type="xsd:nonNegativeInteger"/>
       <part name="anyURI" type="xsd:anyURI"/>
       <part name="gYear" type="xsd:gYear"/>
       <part name="gMonth" type="xsd:gMonth"/>
  @@ -619,6 +620,16 @@
       <part name="unsignedByte" type="xsd:unsignedByte"/>
     </message>
   
  +  <message name="inputNonNegativeInteger">
  +    <part name="inNonNegativeInteger" type="xsd:nonNegativeInteger"/>
  +    <part name="NonNegativeInteger" type="xsd:nonNegativeInteger"/>
  +  </message>
  +
  +  <message name="outputNonNegativeInteger">
  +    <part name="outNonNegativeInteger" type="xsd:nonNegativeInteger"/>
  +    <part name="NonNegativeInteger" type="xsd:nonNegativeInteger"/>
  +  </message>
  +
     <message name="inputAnyURI">
       <part name="inAnyURI" type="xsd:anyURI"/>
       <part name="anyURI" type="xsd:anyURI"/>
  @@ -1118,6 +1129,10 @@
         <input message="tns:inputUnsignedByte"/>
         <output message="tns:outputUnsignedByte"/>
       </operation>
  +    <operation name="methodNonNegativeInteger">
  +      <input message="tns:inputNonNegativeInteger"/>
  +      <output message="tns:outputNonNegativeInteger"/>
  +    </operation>    
       <operation name="methodAnyURI">
         <input message="tns:inputAnyURI"/>
         <output message="tns:outputAnyURI"/>
  @@ -2255,6 +2270,21 @@
               encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
         </output>
       </operation>    
  +    <operation name="methodNonNegativeInteger">
  +      <soap:operation soapAction=""/>
  +      <input>
  +        <soap:body
  +            use="encoded"
  +            namespace=""
  +            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </input>
  +      <output>
  +        <soap:body
  +            use="encoded"
  +            namespace=""
  +            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </output>
  +    </operation>
       <operation name="methodAnyURI">
         <soap:operation soapAction=""/>
         <input>
  
  
  
  1.11      +6 -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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- DynamicProxyTestCase.java	26 Aug 2002 21:15:54 -0000	1.10
  +++ DynamicProxyTestCase.java	4 Sep 2002 13:09:23 -0000	1.11
  @@ -48,6 +48,8 @@
   import junit.framework.TestCase;
   
   import test.wsdl.types.comprehensive_service.TypeTest;
  +
  +import org.apache.axis.types.NonNegativeInteger;
   import org.apache.axis.types.Time;
   import org.apache.axis.types.UnsignedLong;
   import org.apache.axis.types.UnsignedInt;
  @@ -59,6 +61,7 @@
   import org.apache.axis.types.Day;
   import org.apache.axis.types.YearMonth;
   import org.apache.axis.types.MonthDay;
  +import org.apache.axis.holders.NonNegativeIntegerHolder;
   import org.apache.axis.holders.TimeHolder;
   import org.apache.axis.holders.UnsignedLongHolder;
   import org.apache.axis.holders.UnsignedShortHolder;
  @@ -139,6 +142,7 @@
                       new UnsignedInt(0),
                       new UnsignedShort(0),
                       new UnsignedByte(0),
  +                    new NonNegativeInteger("0"),
                       new URI("urn:this-is-a-test"),
                       new Year(1995),
                       new Month(7),
  @@ -198,6 +202,7 @@
                       new UnsignedIntHolder(new UnsignedInt(0)),
                       new UnsignedShortHolder(new UnsignedShort(0)),
                       new UnsignedByteHolder(new UnsignedByte(0)),
  +                    new NonNegativeIntegerHolder(new NonNegativeInteger("0")),
                       new URIHolder(new URI("urn:this-is-a-test")),
                       new YearHolder(new Year(1995)),
                       new MonthHolder(new Month(7)),
  @@ -257,6 +262,7 @@
                       new UnsignedIntHolder(),
                       new UnsignedShortHolder(),
                       new UnsignedByteHolder(),
  +                    new NonNegativeIntegerHolder(),
                       new URIHolder(),
                       new YearHolder(),
                       new MonthHolder(),
  
  
  
  1.32      +18 -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.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- VerifyTestCase.java	27 Aug 2002 20:38:13 -0000	1.31
  +++ VerifyTestCase.java	4 Sep 2002 13:09:23 -0000	1.32
  @@ -73,6 +73,7 @@
   
   import test.wsdl.types.comprehensive_service.TypeTest;
   import test.wsdl.types.comprehensive_service.TypeTestServiceLocator;
  +import org.apache.axis.types.NonNegativeInteger;
   import org.apache.axis.types.UnsignedLong;
   import org.apache.axis.types.UnsignedInt;
   import org.apache.axis.types.UnsignedShort;
  @@ -84,6 +85,7 @@
   import org.apache.axis.types.YearMonth;
   import org.apache.axis.types.MonthDay;
   import org.apache.axis.holders.TimeHolder;
  +import org.apache.axis.holders.NonNegativeIntegerHolder;
   import org.apache.axis.holders.UnsignedLongHolder;
   import org.apache.axis.holders.UnsignedByteHolder;
   import org.apache.axis.holders.UnsignedShortHolder;
  @@ -115,6 +117,7 @@
           UnsignedInt uint = null;
           UnsignedShort ushort = null;
           UnsignedByte ubyte = null;
  +        NonNegativeInteger nnint = null;
           URI uri = null;
           Year year = null;
           Month month = null;
  @@ -127,6 +130,7 @@
               uint = new UnsignedInt(777);
               ushort = new UnsignedShort(77);
               ubyte = new UnsignedByte(7);
  +            nnint = new NonNegativeInteger("7");
               uri = new URI("urn:this-is-a-test");
               year =  new Year(1995);
               month = new Month(7);
  @@ -167,6 +171,7 @@
                       uint,
                       ushort,
                       ubyte,
  +                    nnint,
                       uri,
                       year,
                       month,
  @@ -206,6 +211,7 @@
                       new UnsignedIntHolder(uint),
                       new UnsignedShortHolder(ushort),
                       new UnsignedByteHolder(ubyte),
  +                    new NonNegativeIntegerHolder(nnint),
                       new URIHolder(uri),
                       new YearHolder(year),
                       new MonthHolder(month),
  @@ -245,6 +251,7 @@
                       new UnsignedIntHolder(),
                       new UnsignedShortHolder(),
                       new UnsignedByteHolder(),
  +                    new NonNegativeIntegerHolder(),
                       new URIHolder(),
                       new YearHolder(),
                       new MonthHolder(),
  @@ -712,6 +719,17 @@
               UnsignedByte actual = binding.methodUnsignedByte(sendValue, ch);
           } catch (java.rmi.RemoteException re) {
               throw new junit.framework.AssertionFailedError("methodUnsignedByte Exception caught: " + re );
  +        }
  +        try {
  +            NonNegativeInteger sendValue = null;
  +            try {
  +                sendValue = new NonNegativeInteger("246802468024680");
  +            } catch (Exception e) {
  +            }
  +            NonNegativeIntegerHolder nnih = new NonNegativeIntegerHolder(sendValue);
  +            NonNegativeInteger actual = binding.methodNonNegativeInteger(sendValue, nnih);
  +        } catch (java.rmi.RemoteException re) {
  +            throw new junit.framework.AssertionFailedError("methodNonNegativeInteger Exception caught: " + re );
           }
           try {
               URI sendValue = null;