axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From di...@apache.org
Subject svn commit: r280324 - in /webservices/axis/trunk/c: include/axis/ src/soap/xsd/ tests/auto_build/testcases/client/cpp/ tests/auto_build/testcases/output/
Date Mon, 12 Sep 2005 12:14:00 GMT
Author: dicka
Date: Mon Sep 12 05:13:48 2005
New Revision: 280324

URL: http://svn.apache.org/viewcvs?rev=280324&view=rev
Log:
Changes to resolve AXISCPP-788 - ambiguous use of unsigned integer for xsd:negativeInteger
and xsd:nonPositiveInteger data types.
Have now changed to be signed, the internal checks for MaxInclusive, etc. will correctly prevent
the use of +ve values.

Modified:
    webservices/axis/trunk/c/include/axis/AxisUserAPI.h
    webservices/axis/trunk/c/include/axis/AxisUserAPI.hpp
    webservices/axis/trunk/c/src/soap/xsd/NegativeInteger.cpp
    webservices/axis/trunk/c/src/soap/xsd/NonPositiveInteger.cpp
    webservices/axis/trunk/c/src/soap/xsd/NonPositiveInteger.hpp
    webservices/axis/trunk/c/src/soap/xsd/PositiveInteger.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_negativeIntegerClient.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_nonPositiveIntegerClient.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_negativeInteger.expected
    webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_negativeInteger_ServerResponse.expected
    webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_nonPositiveInteger.expected
    webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_nonPositiveInteger_ServerResponse.expected

Modified: webservices/axis/trunk/c/include/axis/AxisUserAPI.h
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/include/axis/AxisUserAPI.h?rev=280324&r1=280323&r2=280324&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/AxisUserAPI.h (original)
+++ webservices/axis/trunk/c/include/axis/AxisUserAPI.h Mon Sep 12 05:13:48 2005
@@ -278,9 +278,9 @@
  * Axis C++ defined type for xml basic type nonPositiveInteger
  */
 #ifdef WIN32
-typedef unsigned __int64 xsdc__nonPositiveInteger;
+typedef __int64 xsdc__nonPositiveInteger;
 #else
-typedef unsigned long long xsdc__nonPositiveInteger;
+typedef long long xsdc__nonPositiveInteger;
 #endif
 
 /**
@@ -298,9 +298,9 @@
  * Axis C++ defined type for xml basic type negativeInteger
  */
 #ifdef WIN32
-typedef unsigned __int64 xsdc__negativeInteger;
+typedef __int64 xsdc__negativeInteger;
 #else
-typedef unsigned long long xsdc__negativeInteger;
+typedef long long xsdc__negativeInteger;
 #endif
 
 /**

Modified: webservices/axis/trunk/c/include/axis/AxisUserAPI.hpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/include/axis/AxisUserAPI.hpp?rev=280324&r1=280323&r2=280324&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/AxisUserAPI.hpp (original)
+++ webservices/axis/trunk/c/include/axis/AxisUserAPI.hpp Mon Sep 12 05:13:48 2005
@@ -249,9 +249,9 @@
  * Axis C++ defined type for xml basic type nonPositiveInteger
  */
 #ifdef WIN32
-typedef unsigned __int64 xsd__nonPositiveInteger;
+typedef __int64 xsd__nonPositiveInteger;
 #else
-typedef unsigned long long xsd__nonPositiveInteger;
+typedef long long xsd__nonPositiveInteger;
 #endif
 /**
  * @typedef xsd__positiveInteger
@@ -267,9 +267,9 @@
  * Axis C++ defined type for xml basic type negativeInteger
  */
 #ifdef WIN32
-typedef unsigned __int64 xsd__negativeInteger;
+typedef __int64 xsd__negativeInteger;
 #else
-typedef unsigned long long xsd__negativeInteger;
+typedef long long xsd__negativeInteger;
 #endif
 /**
  * @class xsd__base64Binary

Modified: webservices/axis/trunk/c/src/soap/xsd/NegativeInteger.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/soap/xsd/NegativeInteger.cpp?rev=280324&r1=280323&r2=280324&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/soap/xsd/NegativeInteger.cpp (original)
+++ webservices/axis/trunk/c/src/soap/xsd/NegativeInteger.cpp Mon Sep 12 05:13:48 2005
@@ -24,9 +24,6 @@
 {
     if (value)
     {
-        int vauleToCheck = (*value);
-        if(vauleToCheck > -1) // the value must be minus one or less, hence validate and
fix
-            throw AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR, "PositiveInteger value
must be minus one or less");
         setNil(false);
         serialize(value);
     }
@@ -61,11 +58,7 @@
 
 MaxInclusive* NegativeInteger::getMaxInclusive()
 {   
-    return new MaxInclusive((unsigned LONGLONG) 1);
-    /* 
-     * Note: 
-     * Due to use of unsigned values all values are actually negative
-     */
+    return new MaxInclusive((LONGLONG) -1);
 }
 
 AXIS_CPP_NAMESPACE_END

Modified: webservices/axis/trunk/c/src/soap/xsd/NonPositiveInteger.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/soap/xsd/NonPositiveInteger.cpp?rev=280324&r1=280323&r2=280324&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/soap/xsd/NonPositiveInteger.cpp (original)
+++ webservices/axis/trunk/c/src/soap/xsd/NonPositiveInteger.cpp Mon Sep 12 05:13:48 2005
@@ -25,8 +25,6 @@
 {
     if (value)
     {
-        if((*value) > 0) // the value must be non positive, hence validate and fix
-            throw AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR, "NonPositiveInteger value
must be non positive");
         setNil(false);
         serialize(value);
     }
@@ -59,180 +57,14 @@
     return (void*) getNonPositiveInteger();
 }
 
-AxisChar* NonPositiveInteger::serialize(const xsd__nonPositiveInteger* value) throw (AxisSoapException)
-{
-    MinInclusive* minInclusive = getMinInclusive();
-    if (minInclusive->isSet())
-    {
-        if ( *value > minInclusive->getMinInclusiveAsUnsignedLONGLONG() )
-        {
-            AxisString exceptionMessage =
-            "Value to be serialized is less than MinInclusive specified for this type.  MinInclusive
= ";
-            if (minInclusive->getMinInclusiveAsUnsignedLONGLONG() != 0)
-            {
-                exceptionMessage += "-";
-            }
-            AxisChar* length = new AxisChar[25];
-            sprintf(length, PRINTF_UNSIGNED_LONGLONG_FORMAT_SPECIFIER, minInclusive->getMinInclusiveAsUnsignedLONGLONG());
-            exceptionMessage += length;
-            exceptionMessage += ", Value = ";
-            if (*value != 0)
-            {
-                exceptionMessage += "-";
-            }
-            sprintf(length, PRINTF_UNSIGNED_LONGLONG_FORMAT_SPECIFIER, *value);
-            exceptionMessage += length;
-            exceptionMessage += ".";
-            delete [] length;
-            
-            throw AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR,
-                const_cast<AxisChar*>(exceptionMessage.c_str()));
-        }
-    }
-    delete minInclusive;
-
-    MinExclusive* minExclusive = getMinExclusive();
-    if (minExclusive->isSet())
-    {
-        if ( *value >= minExclusive->getMinExclusiveAsUnsignedLONGLONG() )
-        {
-            AxisString exceptionMessage =
-            "Value to be serialized is less than or equal to MinExclusive specified for this
type.  MinExclusive = ";
-            if (minExclusive->getMinExclusiveAsUnsignedLONGLONG() != 0)
-            {
-                exceptionMessage += "-";
-            }
-            AxisChar* length = new AxisChar[25];
-            sprintf(length, PRINTF_UNSIGNED_LONGLONG_FORMAT_SPECIFIER, minExclusive->getMinExclusiveAsUnsignedLONGLONG());
-            exceptionMessage += length;
-            exceptionMessage += ", Value = ";
-            if (*value != 0)
-            {
-                exceptionMessage += "-";
-            }
-            sprintf(length, PRINTF_UNSIGNED_LONGLONG_FORMAT_SPECIFIER, *value);
-            exceptionMessage += length;
-            exceptionMessage += ".";
-            delete [] length;
-            
-            throw AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR,
-                const_cast<AxisChar*>(exceptionMessage.c_str()));
-        }
-    }
-    delete minExclusive;
-
-    MaxInclusive* maxInclusive = getMaxInclusive();
-    if (maxInclusive->isSet())
-    {
-        if ( *value < maxInclusive->getMaxInclusiveAsUnsignedLONGLONG() )
-        {
-            AxisString exceptionMessage =
-            "Value to be serialized is greater than MaxInclusive specified for this type.
 MaxInclusive = ";
-            if (maxInclusive->getMaxInclusiveAsUnsignedLONGLONG() != 0)
-            {
-                exceptionMessage += "-";
-            }
-            AxisChar* length = new AxisChar[25];
-            sprintf(length, PRINTF_UNSIGNED_LONGLONG_FORMAT_SPECIFIER, maxInclusive->getMaxInclusiveAsUnsignedLONGLONG());
-            exceptionMessage += length;
-            exceptionMessage += ", Value = ";
-            if (*value != 0)
-            {
-                exceptionMessage += "-";
-            }
-            sprintf(length, PRINTF_UNSIGNED_LONGLONG_FORMAT_SPECIFIER, *value);
-            exceptionMessage += length;
-            exceptionMessage += ".";
-            delete [] length;
-            
-            throw AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR,
-                const_cast<AxisChar*>(exceptionMessage.c_str()));
-        }
-    }
-    delete maxInclusive;
-
-    MaxExclusive* maxExclusive = getMaxExclusive();
-    if (maxExclusive->isSet())
-    {
-        if ( *value <= maxExclusive->getMaxExclusiveAsUnsignedLONGLONG() )
-        {
-            AxisString exceptionMessage =
-            "Value to be serialized is greater than or equal to MaxExclusive specified for
this type.  MaxExclusive = ";
-            if (maxInclusive->getMaxInclusiveAsUnsignedLONGLONG() != 0)
-            {
-                exceptionMessage += "-";
-            }
-            AxisChar* length = new AxisChar[25];
-            sprintf(length, PRINTF_UNSIGNED_LONGLONG_FORMAT_SPECIFIER, maxExclusive->getMaxExclusiveAsUnsignedLONGLONG());
-            exceptionMessage += length;
-            exceptionMessage += ", Value = ";
-            if (*value != 0)
-            {
-                exceptionMessage += "-";
-            }
-            sprintf(length, PRINTF_UNSIGNED_LONGLONG_FORMAT_SPECIFIER, *value);
-            exceptionMessage += length;
-            exceptionMessage += ".";
-            delete [] length;
-            
-            throw AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR,
-                const_cast<AxisChar*>(exceptionMessage.c_str()));
-        }
-    }
-    delete maxExclusive;
-
-    AxisString formatSpecifier = "-%";
-    
-    int valueSize = 80;
-    TotalDigits* totalDigits = getTotalDigits();
-    if (totalDigits->isSet())
-    {
-        valueSize = totalDigits->getTotalDigits() + 1;
-        AxisChar* digits = new char[10];
-        AxisSprintf (digits, 10, "%i", totalDigits->getTotalDigits());
-        formatSpecifier += digits;
-        delete [] digits;
-    }
-    delete totalDigits;
-    
-    formatSpecifier += PRINTF_UNSIGNED_LONGLONG_FORMAT_SPECIFIER_CHARS;
-
-    AxisChar serializedValue[80];
-    if (*value == 0)
-    {
-        serializedValue[0] = '0';
-		serializedValue[1] = 0;
-    }
-    else
-    {
-        AxisSprintf (serializedValue, valueSize, formatSpecifier.c_str(), *value);
-    }
-
-    IAnySimpleType::serialize(serializedValue);
-    return m_Buf;
-}
-
 xsd__nonPositiveInteger* NonPositiveInteger::deserializeNonPositiveInteger(const AxisChar*
valueAsChar) throw (AxisSoapException)
 {
-    xsd__integer* returnValue = NULL;
-    if (*valueAsChar == '-')
-    {
-        returnValue = Integer::deserializeInteger(valueAsChar + 1);
-    }
-    else
-    {
-        returnValue = Integer::deserializeInteger(valueAsChar);
-    }
-  
-    xsd__nonPositiveInteger * value = new xsd__nonPositiveInteger;
-    *value = static_cast<xsd__nonPositiveInteger> (*returnValue);
-    delete returnValue;
-    return value;
+    return (xsd__negativeInteger*) deserializeInteger(valueAsChar);
 }
 
 MaxInclusive* NonPositiveInteger::getMaxInclusive()
 {   
-    return new MaxInclusive((unsigned LONGLONG) 0);
+    return new MaxInclusive((LONGLONG) 0);
 }
 
 AXIS_CPP_NAMESPACE_END

Modified: webservices/axis/trunk/c/src/soap/xsd/NonPositiveInteger.hpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/soap/xsd/NonPositiveInteger.hpp?rev=280324&r1=280323&r2=280324&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/soap/xsd/NonPositiveInteger.hpp (original)
+++ webservices/axis/trunk/c/src/soap/xsd/NonPositiveInteger.hpp Mon Sep 12 05:13:48 2005
@@ -76,13 +76,6 @@
     xsd__nonPositiveInteger* deserializeNonPositiveInteger(const AxisChar* valueAsChar) throw
(AxisSoapException);
 
     /**
-     * Serialize NonPositiveInteger value to it's on-the-wire string form.
-     * @param value The NonPositiveInteger value to be serialized.
-     * @return Serialized form of NonPositiveInteger value.
-     */
-    AxisChar* serialize(const xsd__nonPositiveInteger* value) throw (AxisSoapException);
-
-    /**
      * Creates a MaxInclusive object.  For the NonPositiveInteger type this is
      * defined as 0.
      * @return MaxInclusive object

Modified: webservices/axis/trunk/c/src/soap/xsd/PositiveInteger.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/soap/xsd/PositiveInteger.cpp?rev=280324&r1=280323&r2=280324&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/soap/xsd/PositiveInteger.cpp (original)
+++ webservices/axis/trunk/c/src/soap/xsd/PositiveInteger.cpp Mon Sep 12 05:13:48 2005
@@ -24,8 +24,6 @@
 {
     if (value)
     {
-        if((*value) < 1) // the value must be one or greater, hence validate and fix
-            throw AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR, "PositiveInteger value
must be one or greater");
         setNil(false);
         serialize(value);
     }

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_negativeIntegerClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_negativeIntegerClient.cpp?rev=280324&r1=280323&r2=280324&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_negativeIntegerClient.cpp
(original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_negativeIntegerClient.cpp
Mon Sep 12 05:13:48 2005
@@ -23,10 +23,10 @@
 #ifdef Q168440_WORKAROUND
   // Bug in MS Visual C++ 6.0. Fixed in Visual C++ .Net version.
   // Cannot print an __int64 number with cout without this overloading
-  std::ostream& operator<<(std::ostream& os, unsigned __int64 i )
+  std::ostream& operator<<(std::ostream& os, __int64 i )
   {
     char buf[40];
-    sprintf(buf,"%I64u", i );
+    sprintf(buf,"%I64d", i );
     os << buf;
     return os;
   }
@@ -48,9 +48,9 @@
         sprintf(endpoint, "%s", url);
         XSD_negativeInteger* ws = new XSD_negativeInteger(endpoint);
 
-        xsd__negativeInteger result = ws->asNonNillableElement((xsd__negativeInteger)18446744073709551615);
+        xsd__negativeInteger result = ws->asNonNillableElement((xsd__negativeInteger)-9223372036854775808);
         cout << "non-nillable element=" << result << endl;
-        result = ws->asNonNillableElement((xsd__negativeInteger)1);
+        result = ws->asNonNillableElement((xsd__negativeInteger)-1);
         cout << "non-nillable element=" << result << endl;
         try
         {
@@ -65,13 +65,13 @@
          * Test client correctly handles server response data beginning with '-'
          * which is also permitted for nonPositiveInteger.
          */
-        result = ws->asNonNillableElement((xsd__negativeInteger)123456789);
+        result = ws->asNonNillableElement((xsd__negativeInteger)-123456789);
         cout << "non-nillable element=" << result << endl;
 
 
         // Test nillable element, with a value
         xsd__negativeInteger* nillableInput = new xsd__negativeInteger();
-        *(nillableInput) = (xsd__negativeInteger)123456789;
+        *(nillableInput) = (xsd__negativeInteger)-123456789;
         xsd__negativeInteger* nillableResult = ws->asNillableElement(nillableInput);
         if (nillableResult)
         {
@@ -98,7 +98,7 @@
 
         // Test required attribute
         RequiredAttributeElement requiredAttributeInput;
-        requiredAttributeInput.setrequiredAttribute(123456789);
+        requiredAttributeInput.setrequiredAttribute(-123456789);
         RequiredAttributeElement* requiredAttributeResult = ws->asRequiredAttribute(&requiredAttributeInput);
         cout << "required attribute=" << requiredAttributeResult->getrequiredAttribute()
<< endl;
         delete requiredAttributeResult;
@@ -107,7 +107,7 @@
  * Exact coding of this section may change depending on chosen implementation
         // Test optional attribute, with a value
         OptionalAttributeElement optionalAttributeInput;
-        optionalAttributeInput.setoptionalAttribute(123456789);
+        optionalAttributeInput.setoptionalAttribute(-123456789);
         OptionalAttributeElement* optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
         if (optionalAttributeResult->getoptionalAttribute())
         {
@@ -140,7 +140,7 @@
         arrayInput.m_Size = 2;
         for (int inputIndex=0 ; inputIndex < 2 ; inputIndex++)
         {
-            array[inputIndex] = 123456789;
+            array[inputIndex] = -123456789;
             arrayInput.m_Array[inputIndex] = &array[inputIndex];
         }
         xsd__negativeInteger_Array arrayResult = ws->asArray(arrayInput);
@@ -156,7 +156,7 @@
 
         // Test complex type
         SimpleComplexType complexTypeInput;
-        complexTypeInput.setcomplexTypeElement(123456789);
+        complexTypeInput.setcomplexTypeElement(-123456789);
         SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
         cout << "within complex type=" << complexTypeResult->getcomplexTypeElement()
<< endl;
         delete complexTypeResult;

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_nonPositiveIntegerClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_nonPositiveIntegerClient.cpp?rev=280324&r1=280323&r2=280324&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_nonPositiveIntegerClient.cpp
(original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_nonPositiveIntegerClient.cpp
Mon Sep 12 05:13:48 2005
@@ -23,10 +23,10 @@
 #ifdef Q168440_WORKAROUND
   // Bug in MS Visual C++ 6.0. Fixed in Visual C++ .Net version.
   // Cannot print an __int64 number with cout without this overloading
-  std::ostream& operator<<(std::ostream& os, unsigned __int64 i )
+  std::ostream& operator<<(std::ostream& os, __int64 i )
   {
     char buf[40];
-    sprintf(buf,"%I64u", i );
+    sprintf(buf,"%I64d", i );
     os << buf;
     return os;
   }
@@ -49,9 +49,9 @@
         sprintf(endpoint, "%s", url);
         XSD_nonPositiveInteger* ws = new XSD_nonPositiveInteger(endpoint);
 
-        xsd__nonPositiveInteger result = ws->asNonNillableElement((xsd__nonPositiveInteger)1844674407370955165);
+        xsd__nonPositiveInteger result = ws->asNonNillableElement((xsd__nonPositiveInteger)-9223372036854775808);
         cout << "non-nillable element=" << result << endl;
-        result = ws->asNonNillableElement((xsd__nonPositiveInteger)1);
+        result = ws->asNonNillableElement((xsd__nonPositiveInteger)-1);
         cout << "non-nillable element=" << result << endl;
         result = ws->asNonNillableElement((xsd__nonPositiveInteger)0);
         cout << "non-nillable element=" << result << endl;
@@ -59,13 +59,13 @@
          * Test client correctly handles server response data beginning with '-'
          * which is also permitted for nonPositiveInteger.
          */
-        result = ws->asNonNillableElement((xsd__nonPositiveInteger)123456789);
+        result = ws->asNonNillableElement((xsd__nonPositiveInteger)-123456789);
         cout << "non-nillable element=" << result << endl;
 
 
         // Test nillable element, with a value
         xsd__nonPositiveInteger* nillableInput = new xsd__nonPositiveInteger();
-        *(nillableInput) = (xsd__nonPositiveInteger)123456789;
+        *(nillableInput) = (xsd__nonPositiveInteger)-123456789;
         xsd__nonPositiveInteger* nillableResult = ws->asNillableElement(nillableInput);
         if (nillableResult)
         {
@@ -92,7 +92,7 @@
 
         // Test required attribute
         RequiredAttributeElement requiredAttributeInput;
-        requiredAttributeInput.setrequiredAttribute(123456789);
+        requiredAttributeInput.setrequiredAttribute(-123456789);
         RequiredAttributeElement* requiredAttributeResult = ws->asRequiredAttribute(&requiredAttributeInput);
         cout << "required attribute=" << requiredAttributeResult->getrequiredAttribute()
<< endl;
         delete requiredAttributeResult;
@@ -101,7 +101,7 @@
  * Exact coding of this section may change depending on chosen implementation
         // Test optional attribute, with a value
         OptionalAttributeElement optionalAttributeInput;
-        optionalAttributeInput.setoptionalAttribute(123456789);
+        optionalAttributeInput.setoptionalAttribute(-123456789);
         OptionalAttributeElement* optionalAttributeResult = ws->asOptionalAttribute(&optionalAttributeInput);
         if (optionalAttributeResult->getoptionalAttribute())
         {
@@ -134,7 +134,7 @@
         arrayInput.m_Size = 2;
         for (int inputIndex=0 ; inputIndex < 2 ; inputIndex++)
         {
-            array[inputIndex] = 123456789;
+            array[inputIndex] = -123456789;
             arrayInput.m_Array[inputIndex] = &array[inputIndex];
         }
         xsd__nonPositiveInteger_Array arrayResult = ws->asArray(arrayInput);
@@ -150,7 +150,7 @@
 
         // Test complex type
         SimpleComplexType complexTypeInput;
-        complexTypeInput.setcomplexTypeElement(123456789);
+        complexTypeInput.setcomplexTypeElement(-123456789);
         SimpleComplexType* complexTypeResult = ws->asComplexType(&complexTypeInput);
         cout << "within complex type=" << complexTypeResult->getcomplexTypeElement()
<< endl;
         delete complexTypeResult;

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_negativeInteger.expected
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_negativeInteger.expected?rev=280324&r1=280323&r2=280324&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_negativeInteger.expected
(original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_negativeInteger.expected
Mon Sep 12 05:13:48 2005
@@ -1,12 +1,12 @@
-non-nillable element=18446744073709551615
-non-nillable element=1
+non-nillable element=-9223372036854775808
+non-nillable element=-1
 AxisException : AxisSoapException:Received content is faulty Value to be serialized is greater
than MaxInclusive specified for this type.  MaxInclusive = -1, Value = 0.
-non-nillable element=123456789
-nillable element=123456789
+non-nillable element=-123456789
+nillable element=-123456789
 nil element=<nil>
-required attribute=123456789
+required attribute=-123456789
 array of 2 elements
-  element[0]=123456789
-  element[1]=123456789
-within complex type=123456789
+  element[0]=-123456789
+  element[1]=-123456789
+within complex type=-123456789
 ---------------------- TEST COMPLETE -----------------------------

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_negativeInteger_ServerResponse.expected
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_negativeInteger_ServerResponse.expected?rev=280324&r1=280323&r2=280324&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_negativeInteger_ServerResponse.expected
(original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_negativeInteger_ServerResponse.expected
Mon Sep 12 05:13:48 2005
@@ -6,7 +6,7 @@
 
 ###
 <?xml version="1.0" encoding="utf-8"?>
-<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asNonNillableElementResponse xmlns="http://xsd_negativeInteger.test.apache.org"><nonNillableElement>18446744073709551615</nonNillableElement></asNonNillableElementResponse></soapenv:Body></soapenv:Envelope>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asNonNillableElementResponse xmlns="http://xsd_negativeInteger.test.apache.org"><nonNillableElement>-9223372036854775808</nonNillableElement></asNonNillableElementResponse></soapenv:Body></soapenv:Envelope>
 0
 
 HTTP/1.1 200 OK
@@ -17,7 +17,7 @@
 
 ###
 <?xml version="1.0" encoding="utf-8"?>
-<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asNonNillableElementResponse xmlns="http://xsd_negativeInteger.test.apache.org"><nonNillableElement>1</nonNillableElement></asNonNillableElementResponse></soapenv:Body></soapenv:Envelope>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asNonNillableElementResponse xmlns="http://xsd_negativeInteger.test.apache.org"><nonNillableElement>-1</nonNillableElement></asNonNillableElementResponse></soapenv:Body></soapenv:Envelope>
 0
 
 HTTP/1.1 200 OK
@@ -39,7 +39,7 @@
 
 ###
 <?xml version="1.0" encoding="utf-8"?>
-<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asNillableElementResponse xmlns="http://xsd_negativeInteger.test.apache.org"><nillableElement>123456789</nillableElement></asNillableElementResponse></soapenv:Body></soapenv:Envelope>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asNillableElementResponse xmlns="http://xsd_negativeInteger.test.apache.org"><nillableElement>-123456789</nillableElement></asNillableElementResponse></soapenv:Body></soapenv:Envelope>
 0
 
 HTTP/1.1 200 OK
@@ -61,7 +61,7 @@
 
 ###
 <?xml version="1.0" encoding="utf-8"?>
-<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asRequiredAttributeResponse xmlns="http://xsd_negativeInteger.test.apache.org"><RequiredAttributeElement
requiredAttribute="123456789" /></asRequiredAttributeResponse></soapenv:Body></soapenv:Envelope>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asRequiredAttributeResponse xmlns="http://xsd_negativeInteger.test.apache.org"><RequiredAttributeElement
requiredAttribute="-123456789" /></asRequiredAttributeResponse></soapenv:Body></soapenv:Envelope>
 0
 
 HTTP/1.1 200 OK
@@ -72,7 +72,7 @@
 
 ###
 <?xml version="1.0" encoding="utf-8"?>
-<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asArrayResponse xmlns="http://xsd_negativeInteger.test.apache.org"><arrayElement>123456789</arrayElement><arrayElement>123456789</arrayElement></asArrayResponse></soapenv:Body></soapenv:Envelope>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asArrayResponse xmlns="http://xsd_negativeInteger.test.apache.org"><arrayElement>-123456789</arrayElement><arrayElement>-123456789</arrayElement></asArrayResponse></soapenv:Body></soapenv:Envelope>
 0
 
 HTTP/1.1 200 OK
@@ -83,6 +83,6 @@
 
 ###
 <?xml version="1.0" encoding="utf-8"?>
-<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asComplexTypeResponse xmlns="http://xsd_negativeInteger.test.apache.org"><SimpleComplexType><complexTypeElement>123456789</complexTypeElement></SimpleComplexType></asComplexTypeResponse></soapenv:Body></soapenv:Envelope>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asComplexTypeResponse xmlns="http://xsd_negativeInteger.test.apache.org"><SimpleComplexType><complexTypeElement>-123456789</complexTypeElement></SimpleComplexType></asComplexTypeResponse></soapenv:Body></soapenv:Envelope>
 0
 

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_nonPositiveInteger.expected
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_nonPositiveInteger.expected?rev=280324&r1=280323&r2=280324&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_nonPositiveInteger.expected
(original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_nonPositiveInteger.expected
Mon Sep 12 05:13:48 2005
@@ -1,12 +1,12 @@
-non-nillable element=18446744073709551615
-non-nillable element=1
+non-nillable element=-9223372036854775808
+non-nillable element=-1
 non-nillable element=0
-non-nillable element=123456789
-nillable element=123456789
+non-nillable element=-123456789
+nillable element=-123456789
 nil element=<nil>
-required attribute=123456789
+required attribute=-123456789
 array of 2 elements
-  element[0]=123456789
-  element[1]=123456789
-within complex type=123456789
+  element[0]=-123456789
+  element[1]=-123456789
+within complex type=-123456789
 ---------------------- TEST COMPLETE -----------------------------

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_nonPositiveInteger_ServerResponse.expected
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_nonPositiveInteger_ServerResponse.expected?rev=280324&r1=280323&r2=280324&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_nonPositiveInteger_ServerResponse.expected
(original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/XSD_nonPositiveInteger_ServerResponse.expected
Mon Sep 12 05:13:48 2005
@@ -6,7 +6,7 @@
 
 ###
 <?xml version="1.0" encoding="utf-8"?>
-<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asNonNillableElementResponse xmlns="http://xsd_nonPositiveInteger.test.apache.org"><nonNillableElement>-18446744073709551615</nonNillableElement></asNonNillableElementResponse></soapenv:Body></soapenv:Envelope>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asNonNillableElementResponse xmlns="http://xsd_nonPositiveInteger.test.apache.org"><nonNillableElement>-9223372036854775808</nonNillableElement></asNonNillableElementResponse></soapenv:Body></soapenv:Envelope>
 0
 
 HTTP/1.1 200 OK
@@ -39,7 +39,7 @@
 
 ###
 <?xml version="1.0" encoding="utf-8"?>
-<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asNonNillableElementResponse xmlns="http://xsd_nonPositiveInteger.test.apache.org"><nonNillableElement>123456789</nonNillableElement></asNonNillableElementResponse></soapenv:Body></soapenv:Envelope>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asNonNillableElementResponse xmlns="http://xsd_nonPositiveInteger.test.apache.org"><nonNillableElement>-123456789</nonNillableElement></asNonNillableElementResponse></soapenv:Body></soapenv:Envelope>
 0
 
 HTTP/1.1 200 OK
@@ -50,7 +50,7 @@
 
 ###
 <?xml version="1.0" encoding="utf-8"?>
-<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asNillableElementResponse xmlns="http://xsd_nonPositiveInteger.test.apache.org"><nillableElement>123456789</nillableElement></asNillableElementResponse></soapenv:Body></soapenv:Envelope>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asNillableElementResponse xmlns="http://xsd_nonPositiveInteger.test.apache.org"><nillableElement>-123456789</nillableElement></asNillableElementResponse></soapenv:Body></soapenv:Envelope>
 0
 
 HTTP/1.1 200 OK
@@ -72,7 +72,7 @@
 
 ###
 <?xml version="1.0" encoding="utf-8"?>
-<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asRequiredAttributeResponse xmlns="http://xsd_nonPositiveInteger.test.apache.org"><RequiredAttributeElement
requiredAttribute="123456789" /></asRequiredAttributeResponse></soapenv:Body></soapenv:Envelope>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asRequiredAttributeResponse xmlns="http://xsd_nonPositiveInteger.test.apache.org"><RequiredAttributeElement
requiredAttribute="-123456789" /></asRequiredAttributeResponse></soapenv:Body></soapenv:Envelope>
 0
 
 HTTP/1.1 200 OK
@@ -83,7 +83,7 @@
 
 ###
 <?xml version="1.0" encoding="utf-8"?>
-<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asArrayResponse xmlns="http://xsd_nonPositiveInteger.test.apache.org"><arrayElement>123456789</arrayElement><arrayElement>123456789</arrayElement></asArrayResponse></soapenv:Body></soapenv:Envelope>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asArrayResponse xmlns="http://xsd_nonPositiveInteger.test.apache.org"><arrayElement>-123456789</arrayElement><arrayElement>-123456789</arrayElement></asArrayResponse></soapenv:Body></soapenv:Envelope>
 0
 
 HTTP/1.1 200 OK
@@ -94,6 +94,6 @@
 
 ###
 <?xml version="1.0" encoding="utf-8"?>
-<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asComplexTypeResponse xmlns="http://xsd_nonPositiveInteger.test.apache.org"><SimpleComplexType><complexTypeElement>123456789</complexTypeElement></SimpleComplexType></asComplexTypeResponse></soapenv:Body></soapenv:Envelope>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header
/><soapenv:Body><asComplexTypeResponse xmlns="http://xsd_nonPositiveInteger.test.apache.org"><SimpleComplexType><complexTypeElement>-123456789</complexTypeElement></SimpleComplexType></asComplexTypeResponse></soapenv:Body></soapenv:Envelope>
 0
 



Mime
View raw message