You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2005/01/24 18:21:27 UTC
cvs commit: ws-axis/c/src/soap/xsd/constraints MaxExclusive.cpp MaxExclusive.hpp MaxInclusive.cpp MaxInclusive.hpp MinExclusive.cpp MinExclusive.hpp
dicka 2005/01/24 09:21:27
Modified: c/src/soap Makefile.am
c/src/soap/xsd Byte.cpp Byte.hpp Date.cpp Date.hpp
DateTime.cpp DateTime.hpp Decimal.cpp Decimal.hpp
Double.cpp Double.hpp Duration.cpp Duration.hpp
Float.cpp Float.hpp Int.cpp Int.hpp Long.cpp
Long.hpp NonNegativeInteger.cpp
NonNegativeInteger.hpp Short.cpp Short.hpp Time.cpp
Time.hpp UnsignedLong.cpp UnsignedLong.hpp
c/vc AxisClientDLL.dsp AxisServerDLL.dsp
Added: c/src/soap/xsd/constraints MaxExclusive.cpp MaxExclusive.hpp
MaxInclusive.cpp MaxInclusive.hpp MinExclusive.cpp
MinExclusive.hpp
Log:
Adding constraint validation/processing to XSD SOAP objects. Addition of MaxInclusive and MaxExclusive constraints.
Submitted by: Adrian Dick
Revision Changes Path
1.23 +3 -1 ws-axis/c/src/soap/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/Makefile.am,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- Makefile.am 24 Jan 2005 16:25:55 -0000 1.22
+++ Makefile.am 24 Jan 2005 17:21:25 -0000 1.23
@@ -49,7 +49,9 @@
xsd/constraints/MinLength.cpp \
xsd/constraints/MaxLength.cpp \
xsd/constraints/MinInclusive.cpp \
- xsd/constraints/MinExclusive.cpp
+ xsd/constraints/MinExclusive.cpp \
+ xsd/constraints/MaxInclusive.cpp \
+ xsd/constraints/MaxExclusive.cpp
libsoap_la_LIBADD = $(LDFLAGS)
INCLUDES = -I../../include
1.4 +10 -0 ws-axis/c/src/soap/xsd/Byte.cpp
Index: Byte.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Byte.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Byte.cpp 24 Jan 2005 16:25:55 -0000 1.3
+++ Byte.cpp 24 Jan 2005 17:21:26 -0000 1.4
@@ -52,4 +52,14 @@
return new MinExclusive(static_cast<LONGLONG>(-129));
}
+MaxInclusive* Byte::getMaxInclusive()
+{
+ return new MaxInclusive(static_cast<LONGLONG>(127));
+}
+
+MaxExclusive* Byte::getMaxExclusive()
+{
+ return new MaxExclusive(static_cast<LONGLONG>(128));
+}
+
AXIS_CPP_NAMESPACE_END
1.4 +14 -0 ws-axis/c/src/soap/xsd/Byte.hpp
Index: Byte.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Byte.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Byte.hpp 24 Jan 2005 16:25:55 -0000 1.3
+++ Byte.hpp 24 Jan 2005 17:21:26 -0000 1.4
@@ -84,6 +84,20 @@
* @return MinExclusive object
*/
virtual MinExclusive* getMinExclusive();
+
+ /**
+ * Creates a MaxInclusive object. For the Byte type this is defined as
+ * 127.
+ * @return MaxInclusive object
+ */
+ virtual MaxInclusive* getMaxInclusive();
+
+ /**
+ * Creates a Maxexclusive object. For the Byte type this is defined as
+ * 128.
+ * @return Maxexclusive object
+ */
+ virtual MaxExclusive* getMaxExclusive();
private:
char* m_Byte;
1.6 +46 -0 ws-axis/c/src/soap/xsd/Date.cpp
Index: Date.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Date.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Date.cpp 24 Jan 2005 16:25:55 -0000 1.5
+++ Date.cpp 24 Jan 2005 17:21:26 -0000 1.6
@@ -53,6 +53,42 @@
}
}
delete minExclusive;
+
+ MaxInclusive* maxInclusive = getMaxInclusive();
+ if (maxInclusive->isSet())
+ {
+ if ( 0 > difftime(mktime(&(maxInclusive->getMaxInclusiveAsStructTM())), mktime(const_cast<struct tm*>(value))) )
+ {
+ AxisString exceptionMessage =
+ "Value to be serialized is greater than MaxInclusive specified for this type. MaxInclusive = ";
+ exceptionMessage += asctime(&(maxInclusive->getMaxInclusiveAsStructTM()));
+ exceptionMessage += ", Value = ";
+ exceptionMessage += asctime(value);
+ exceptionMessage += ".";
+
+ throw new AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR,
+ const_cast<AxisChar*>(exceptionMessage.c_str()));
+ }
+ }
+ delete maxInclusive;
+
+ MaxExclusive* maxExclusive = getMaxExclusive();
+ if (maxExclusive->isSet())
+ {
+ if ( 0 > difftime(mktime(&(maxExclusive->getMaxExclusiveAsStructTM())), mktime(const_cast<struct tm*>(value))) )
+ {
+ AxisString exceptionMessage =
+ "Value to be serialized is greater than or equal to MaxExclusive specified for this type. MaxExclusive = ";
+ exceptionMessage += asctime(&(maxExclusive->getMaxExclusiveAsStructTM()));
+ exceptionMessage += ", Value = ";
+ exceptionMessage += asctime(value);
+ exceptionMessage += ".";
+
+ throw new AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR,
+ const_cast<AxisChar*>(exceptionMessage.c_str()));
+ }
+ }
+ delete maxExclusive;
AxisChar* serializedValue = new AxisChar[80];
strftime (serializedValue, 80, "%Y-%m-%dZ", value);
@@ -190,6 +226,16 @@
MinExclusive* Date::getMinExclusive()
{
return new MinExclusive();
+ }
+
+ MaxInclusive* Date::getMaxInclusive()
+ {
+ return new MaxInclusive();
+ }
+
+ MaxExclusive* Date::getMaxExclusive()
+ {
+ return new MaxExclusive();
}
WhiteSpace* Date::getWhiteSpace()
1.6 +16 -0 ws-axis/c/src/soap/xsd/Date.hpp
Index: Date.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Date.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Date.hpp 24 Jan 2005 16:25:55 -0000 1.5
+++ Date.hpp 24 Jan 2005 17:21:26 -0000 1.6
@@ -25,6 +25,8 @@
#include "IAnySimpleType.hpp"
#include "constraints/MinInclusive.hpp"
#include "constraints/MinExclusive.hpp"
+#include "constraints/MaxInclusive.hpp"
+#include "constraints/MaxExclusive.hpp"
#include <ctime>
AXIS_CPP_NAMESPACE_START
@@ -82,6 +84,20 @@
* @return MinExclusive object
*/
MinExclusive* getMinExclusive();
+
+ /**
+ * Creates a MaxInclusive object. For the Date type this is undefined,
+ * so an unset MaxInclusive object is created.
+ * @return MaxInclusive object
+ */
+ MaxInclusive* getMaxInclusive();
+
+ /**
+ * Creates a MaxExclusive object. For the Date type this is undefined,
+ * so an unset MaxExclusive object is created.
+ * @return MaxExclusive object
+ */
+ MaxExclusive* getMaxExclusive();
/**
* Creates a WhiteSpace object to collapse whitespace
1.8 +46 -0 ws-axis/c/src/soap/xsd/DateTime.cpp
Index: DateTime.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/DateTime.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- DateTime.cpp 24 Jan 2005 16:25:55 -0000 1.7
+++ DateTime.cpp 24 Jan 2005 17:21:26 -0000 1.8
@@ -62,6 +62,42 @@
}
}
delete minExclusive;
+
+ MaxInclusive* maxInclusive = getMaxInclusive();
+ if (maxInclusive->isSet())
+ {
+ if ( 0 > difftime(mktime(&(maxInclusive->getMaxInclusiveAsStructTM())), mktime(const_cast<struct tm*>(value))) )
+ {
+ AxisString exceptionMessage =
+ "Value to be serialized is greater than MaxInclusive specified for this type. MaxInclusive = ";
+ exceptionMessage += asctime(&(maxInclusive->getMaxInclusiveAsStructTM()));
+ exceptionMessage += ", Value = ";
+ exceptionMessage += asctime(value);
+ exceptionMessage += ".";
+
+ throw new AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR,
+ const_cast<AxisChar*>(exceptionMessage.c_str()));
+ }
+ }
+ delete maxInclusive;
+
+ MaxExclusive* maxExclusive = getMaxExclusive();
+ if (maxExclusive->isSet())
+ {
+ if ( 0 > difftime(mktime(&(maxExclusive->getMaxExclusiveAsStructTM())), mktime(const_cast<struct tm*>(value))) )
+ {
+ AxisString exceptionMessage =
+ "Value to be serialized is greater than or equal to MaxExclusive specified for this type. MaxExclusive = ";
+ exceptionMessage += asctime(&(maxExclusive->getMaxExclusiveAsStructTM()));
+ exceptionMessage += ", Value = ";
+ exceptionMessage += asctime(value);
+ exceptionMessage += ".";
+
+ throw new AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR,
+ const_cast<AxisChar*>(exceptionMessage.c_str()));
+ }
+ }
+ delete maxExclusive;
AxisChar* serializedValue = new AxisChar[80];
strftime (serializedValue, 80, "%Y-%m-%dT%H:%M:%SZ", value);
@@ -210,6 +246,16 @@
MinExclusive* DateTime::getMinExclusive()
{
return new MinExclusive();
+ }
+
+ MaxInclusive* DateTime::getMaxInclusive()
+ {
+ return new MaxInclusive();
+ }
+
+ MaxExclusive* DateTime::getMaxExclusive()
+ {
+ return new MaxExclusive();
}
WhiteSpace* DateTime::getWhiteSpace()
1.7 +16 -0 ws-axis/c/src/soap/xsd/DateTime.hpp
Index: DateTime.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/DateTime.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DateTime.hpp 24 Jan 2005 16:25:55 -0000 1.6
+++ DateTime.hpp 24 Jan 2005 17:21:26 -0000 1.7
@@ -25,6 +25,8 @@
#include "IAnySimpleType.hpp"
#include "constraints/MinInclusive.hpp"
#include "constraints/MinExclusive.hpp"
+#include "constraints/MaxInclusive.hpp"
+#include "constraints/MaxExclusive.hpp"
#include <ctime>
AXIS_CPP_NAMESPACE_START
@@ -87,6 +89,20 @@
* @return MinExclusive object
*/
MinExclusive* getMinExclusive();
+
+ /**
+ * Creates a MaxInclusive object. For the DateTime type this is undefined,
+ * so an unset MaxInclusive object is created.
+ * @return MaxInclusive object
+ */
+ MaxInclusive* getMaxInclusive();
+
+ /**
+ * Creates a MaxExclusive object. For the DateTime type this is undefined,
+ * so an unset MaxExclusive object is created.
+ * @return MaxExclusive object
+ */
+ MaxExclusive* getMaxExclusive();
/**
* Creates a WhiteSpace object to collapse whitespace
1.8 +56 -0 ws-axis/c/src/soap/xsd/Decimal.cpp
Index: Decimal.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Decimal.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Decimal.cpp 24 Jan 2005 16:25:55 -0000 1.7
+++ Decimal.cpp 24 Jan 2005 17:21:26 -0000 1.8
@@ -72,6 +72,52 @@
}
delete minExclusive;
+
+MaxInclusive* maxInclusive = getMaxInclusive();
+ if (maxInclusive->isSet())
+ {
+ if ( *value < maxInclusive->getMaxInclusiveAsDouble() )
+ {
+ AxisString exceptionMessage =
+ "Value to be serialized is greater than MaxInclusive specified for this type. MaxInclusive = ";
+ AxisChar* length = new AxisChar[25];
+ sprintf(length, "%f", maxInclusive->getMaxInclusiveAsDouble());
+ exceptionMessage += length;
+ exceptionMessage += ", Value = ";
+ sprintf(length, "%f", *value);
+ exceptionMessage += length;
+ exceptionMessage += ".";
+ delete [] length;
+
+ throw new AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR,
+ const_cast<AxisChar*>(exceptionMessage.c_str()));
+ }
+ }
+ delete maxInclusive;
+
+ MaxExclusive* maxExclusive = getMaxExclusive();
+ if (maxExclusive->isSet())
+ {
+ if ( *value < maxExclusive->getMaxExclusiveAsDouble() )
+ {
+ AxisString exceptionMessage =
+ "Value to be serialized is greater than or equal to MaxExclusive specified for this type. MaxExclusive = ";
+ AxisChar* length = new AxisChar[25];
+ sprintf(length, "%f", maxExclusive->getMaxExclusiveAsDouble());
+ exceptionMessage += length;
+ exceptionMessage += ", Value = ";
+ sprintf(length, "%f", *value);
+ exceptionMessage += length;
+ exceptionMessage += ".";
+ delete [] length;
+
+ throw new AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR,
+ const_cast<AxisChar*>(exceptionMessage.c_str()));
+ }
+ }
+ delete maxExclusive;
+
+
AxisChar* serializedValue = new char[80];
AxisSprintf (serializedValue, 80, "%f", *value);
@@ -108,6 +154,16 @@
MinExclusive* Decimal::getMinExclusive()
{
return new MinExclusive();
+}
+
+MaxInclusive* Decimal::getMaxInclusive()
+{
+ return new MaxInclusive();
+}
+
+MaxExclusive* Decimal::getMaxExclusive()
+{
+ return new MaxExclusive();
}
AXIS_CPP_NAMESPACE_END
1.7 +16 -0 ws-axis/c/src/soap/xsd/Decimal.hpp
Index: Decimal.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Decimal.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Decimal.hpp 24 Jan 2005 16:25:55 -0000 1.6
+++ Decimal.hpp 24 Jan 2005 17:21:26 -0000 1.7
@@ -25,6 +25,8 @@
#include "IAnySimpleType.hpp"
#include "constraints/MinInclusive.hpp"
#include "constraints/MinExclusive.hpp"
+#include "constraints/MaxInclusive.hpp"
+#include "constraints/MaxExclusive.hpp"
AXIS_CPP_NAMESPACE_START
@@ -86,6 +88,20 @@
* @return MinExclusive object
*/
virtual MinExclusive* getMinExclusive();
+
+ /**
+ * Creates a MaxInclusive object. For the Decimal type this is undefined,
+ * so an unset MaxInclusive object is created.
+ * @return MaxInclusive object
+ */
+ virtual MaxInclusive* getMaxInclusive();
+
+ /**
+ * Creates a MaxExclusive object. For the Decimal type this is undefined,
+ * so an unset MaxExclusive object is created.
+ * @return MaxExclusive object
+ */
+ virtual MaxExclusive* getMaxExclusive();
/**
* Creates a WhiteSpace object to collapse whitespace
1.6 +56 -0 ws-axis/c/src/soap/xsd/Double.cpp
Index: Double.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Double.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Double.cpp 24 Jan 2005 16:25:55 -0000 1.5
+++ Double.cpp 24 Jan 2005 17:21:26 -0000 1.6
@@ -63,6 +63,52 @@
}
delete minExclusive;
+
+ MaxInclusive* maxInclusive = getMaxInclusive();
+ if (maxInclusive->isSet())
+ {
+ if ( *value < maxInclusive->getMaxInclusiveAsDouble() )
+ {
+ AxisString exceptionMessage =
+ "Value to be serialized is greater than MaxInclusive specified for this type. MaxInclusive = ";
+ AxisChar* length = new AxisChar[25];
+ sprintf(length, "%f", maxInclusive->getMaxInclusiveAsDouble());
+ exceptionMessage += length;
+ exceptionMessage += ", Value = ";
+ sprintf(length, "%f", *value);
+ exceptionMessage += length;
+ exceptionMessage += ".";
+ delete [] length;
+
+ throw new AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR,
+ const_cast<AxisChar*>(exceptionMessage.c_str()));
+ }
+ }
+ delete maxInclusive;
+
+ MaxExclusive* maxExclusive = getMaxExclusive();
+ if (maxExclusive->isSet())
+ {
+ if ( *value < maxExclusive->getMaxExclusiveAsDouble() )
+ {
+ AxisString exceptionMessage =
+ "Value to be serialized is greater than or equal to MaxExclusive specified for this type. MaxExclusive = ";
+ AxisChar* length = new AxisChar[25];
+ sprintf(length, "%f", maxExclusive->getMaxExclusiveAsDouble());
+ exceptionMessage += length;
+ exceptionMessage += ", Value = ";
+ sprintf(length, "%f", *value);
+ exceptionMessage += length;
+ exceptionMessage += ".";
+ delete [] length;
+
+ throw new AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR,
+ const_cast<AxisChar*>(exceptionMessage.c_str()));
+ }
+ }
+ delete maxExclusive;
+
+
AxisChar* serializedValue = new char[80];
AxisSprintf (serializedValue, 80, "%f", *value);
@@ -99,6 +145,16 @@
MinExclusive* Double::getMinExclusive()
{
return new MinExclusive();
+}
+
+MaxInclusive* Double::getMaxInclusive()
+{
+ return new MaxInclusive();
+}
+
+MaxExclusive* Double::getMaxExclusive()
+{
+ return new MaxExclusive();
}
AXIS_CPP_NAMESPACE_END
1.6 +16 -0 ws-axis/c/src/soap/xsd/Double.hpp
Index: Double.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Double.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Double.hpp 24 Jan 2005 16:25:55 -0000 1.5
+++ Double.hpp 24 Jan 2005 17:21:26 -0000 1.6
@@ -25,6 +25,8 @@
#include "IAnySimpleType.hpp"
#include "constraints/MinInclusive.hpp"
#include "constraints/MinExclusive.hpp"
+#include "constraints/MaxInclusive.hpp"
+#include "constraints/MaxExclusive.hpp"
AXIS_CPP_NAMESPACE_START
@@ -81,6 +83,20 @@
* @return MinExclusive object
*/
virtual MinExclusive* getMinExclusive();
+
+ /**
+ * Creates a MaxInclusive object. For the Double type this is undefined,
+ * so an unset MaxInclusive object is created.
+ * @return MaxInclusive object
+ */
+ virtual MaxInclusive* getMaxInclusive();
+
+ /**
+ * Creates a MaxExclusive object. For the Double type this is undefined,
+ * so an unset MaxExclusive object is created.
+ * @return MaxExclusive object
+ */
+ virtual MaxExclusive* getMaxExclusive();
/**
* Creates a WhiteSpace object to collapse whitespace
1.6 +55 -0 ws-axis/c/src/soap/xsd/Duration.cpp
Index: Duration.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Duration.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Duration.cpp 24 Jan 2005 16:25:55 -0000 1.5
+++ Duration.cpp 24 Jan 2005 17:21:26 -0000 1.6
@@ -62,6 +62,51 @@
}
}
delete minExclusive;
+
+
+ MaxInclusive* maxInclusive = getMaxInclusive();
+ if (maxInclusive->isSet())
+ {
+ if ( *value < maxInclusive->getMaxInclusiveAsLONGLONG() )
+ {
+ AxisString exceptionMessage =
+ "Value to be serialized is greater than MaxInclusive specified for this type. MaxInclusive = ";
+ AxisChar* length = new AxisChar[25];
+ sprintf(length, "%d", maxInclusive->getMaxInclusiveAsLONGLONG());
+ exceptionMessage += length;
+ exceptionMessage += ", Value = ";
+ sprintf(length, PRINTF_LONGLONG_FORMAT_SPECIFIER, *value);
+ exceptionMessage += length;
+ exceptionMessage += ".";
+ delete [] length;
+
+ throw new AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR,
+ const_cast<AxisChar*>(exceptionMessage.c_str()));
+ }
+ }
+ delete maxInclusive;
+
+ MaxExclusive* maxExclusive = getMaxExclusive();
+ if (maxExclusive->isSet())
+ {
+ if ( *value < maxExclusive->getMaxExclusiveAsLONGLONG() )
+ {
+ AxisString exceptionMessage =
+ "Value to be serialized is greater than or equal to MaxExclusive specified for this type. MaxExclusive = ";
+ AxisChar* length = new AxisChar[25];
+ sprintf(length, "%d", maxExclusive->getMaxExclusiveAsLONGLONG());
+ exceptionMessage += length;
+ exceptionMessage += ", Value = ";
+ sprintf(length, PRINTF_LONGLONG_FORMAT_SPECIFIER, *value);
+ exceptionMessage += length;
+ exceptionMessage += ".";
+ delete [] length;
+
+ throw new AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR,
+ const_cast<AxisChar*>(exceptionMessage.c_str()));
+ }
+ }
+ delete maxExclusive;
long valueToSerialize = *value;
AxisChar buff[4];
@@ -193,6 +238,16 @@
MinExclusive* Duration::getMinExclusive()
{
return new MinExclusive();
+ }
+
+ MaxInclusive* Duration::getMaxInclusive()
+ {
+ return new MaxInclusive();
+ }
+
+ MaxExclusive* Duration::getMaxExclusive()
+ {
+ return new MaxExclusive();
}
AXIS_CPP_NAMESPACE_END
1.6 +16 -0 ws-axis/c/src/soap/xsd/Duration.hpp
Index: Duration.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Duration.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Duration.hpp 24 Jan 2005 16:25:55 -0000 1.5
+++ Duration.hpp 24 Jan 2005 17:21:26 -0000 1.6
@@ -25,6 +25,8 @@
#include "IAnySimpleType.hpp"
#include "constraints/MinInclusive.hpp"
#include "constraints/MinExclusive.hpp"
+#include "constraints/MaxInclusive.hpp"
+#include "constraints/MaxExclusive.hpp"
#include <string>
AXIS_CPP_NAMESPACE_START
@@ -82,6 +84,20 @@
* @return MinExclusive object
*/
MinExclusive* getMinExclusive();
+
+ /**
+ * Creates a MaxInclusive object. For the Duration type this is undefined,
+ * so an unset MaxInclusive object is created.
+ * @return MaxInclusive object
+ */
+ MaxInclusive* getMaxInclusive();
+
+ /**
+ * Creates a MaxExclusive object. For the Duration type this is undefined,
+ * so an unset MaxExclusive object is created.
+ * @return MaxExclusive object
+ */
+ MaxExclusive* getMaxExclusive();
/**
* Creates a WhiteSpace object to collapse whitespace
1.7 +55 -0 ws-axis/c/src/soap/xsd/Float.cpp
Index: Float.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Float.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Float.cpp 24 Jan 2005 16:25:55 -0000 1.6
+++ Float.cpp 24 Jan 2005 17:21:26 -0000 1.7
@@ -69,6 +69,51 @@
}
delete minExclusive;
+
+ MaxInclusive* maxInclusive = getMaxInclusive();
+ if (maxInclusive->isSet())
+ {
+ if ( *value < static_cast<float>(maxInclusive->getMaxInclusiveAsDouble()) )
+ {
+ AxisString exceptionMessage =
+ "Value to be serialized is greater than MaxInclusive specified for this type. MaxInclusive = ";
+ AxisChar* length = new AxisChar[25];
+ sprintf(length, "%f", maxInclusive->getMaxInclusiveAsDouble());
+ exceptionMessage += length;
+ exceptionMessage += ", Value = ";
+ sprintf(length, "%f", *value);
+ exceptionMessage += length;
+ exceptionMessage += ".";
+ delete [] length;
+
+ throw new AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR,
+ const_cast<AxisChar*>(exceptionMessage.c_str()));
+ }
+ }
+ delete maxInclusive;
+
+ MaxExclusive* maxExclusive = getMaxExclusive();
+ if (maxExclusive->isSet())
+ {
+ if ( *value < static_cast<float>(maxExclusive->getMaxExclusiveAsDouble()) )
+ {
+ AxisString exceptionMessage =
+ "Value to be serialized is greater than or equal to MaxExclusive specified for this type. MaxExclusive = ";
+ AxisChar* length = new AxisChar[25];
+ sprintf(length, "%f", maxExclusive->getMaxExclusiveAsDouble());
+ exceptionMessage += length;
+ exceptionMessage += ", Value = ";
+ sprintf(length, "%f", *value);
+ exceptionMessage += length;
+ exceptionMessage += ".";
+ delete [] length;
+
+ throw new AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR,
+ const_cast<AxisChar*>(exceptionMessage.c_str()));
+ }
+ }
+ delete maxExclusive;
+
AxisChar* serializedValue = new char[80];
AxisSprintf (serializedValue, 80, "%f", *value);
@@ -104,6 +149,16 @@
MinExclusive* Float::getMinExclusive()
{
return new MinExclusive();
+}
+
+MaxInclusive* Float::getMaxInclusive()
+{
+ return new MaxInclusive();
+}
+
+MaxExclusive* Float::getMaxExclusive()
+{
+ return new MaxExclusive();
}
AXIS_CPP_NAMESPACE_END
1.7 +17 -0 ws-axis/c/src/soap/xsd/Float.hpp
Index: Float.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Float.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Float.hpp 24 Jan 2005 16:25:55 -0000 1.6
+++ Float.hpp 24 Jan 2005 17:21:26 -0000 1.7
@@ -25,6 +25,9 @@
#include "IAnySimpleType.hpp"
#include "constraints/MinInclusive.hpp"
#include "constraints/MinExclusive.hpp"
+#include "constraints/MaxInclusive.hpp"
+#include "constraints/MaxExclusive.hpp"
+
AXIS_CPP_NAMESPACE_START
@@ -86,6 +89,20 @@
* @return MinExclusive object
*/
virtual MinExclusive* getMinExclusive();
+
+ /**
+ * Creates a MaxInclusive object. For the Float type this is undefined,
+ * so an unset MaxInclusive object is created.
+ * @return MaxInclusive object
+ */
+ virtual MaxInclusive* getMaxInclusive();
+
+ /**
+ * Creates a MaxExclusive object. For the Float type this is undefined,
+ * so an unset MaxExclusive object is created.
+ * @return MaxExclusive object
+ */
+ virtual MaxExclusive* getMaxExclusive();
/**
* Creates a WhiteSpace object to collapse whitespace
1.7 +18 -0 ws-axis/c/src/soap/xsd/Int.cpp
Index: Int.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Int.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Int.cpp 24 Jan 2005 16:25:55 -0000 1.6
+++ Int.cpp 24 Jan 2005 17:21:26 -0000 1.7
@@ -60,4 +60,22 @@
return new MinExclusive(*minExclusive);
}
+MaxInclusive* Int::getMaxInclusive()
+{
+ AxisChar* end;
+ LONGLONG* maxInclusive = new LONGLONG;
+ *maxInclusive = strtol ("2147483647", &end, 10);
+
+ return new MaxInclusive(*maxInclusive);
+}
+
+MaxExclusive* Int::getMaxExclusive()
+{
+ AxisChar* end;
+ LONGLONG* maxExclusive = new LONGLONG;
+ *maxExclusive = strtol ("2147483648", &end, 10);
+
+ return new MaxExclusive(*maxExclusive);
+}
+
AXIS_CPP_NAMESPACE_END
1.7 +14 -0 ws-axis/c/src/soap/xsd/Int.hpp
Index: Int.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Int.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Int.hpp 24 Jan 2005 16:25:55 -0000 1.6
+++ Int.hpp 24 Jan 2005 17:21:26 -0000 1.7
@@ -85,6 +85,20 @@
*/
virtual MinExclusive* getMinExclusive();
+ /**
+ * Creates a MaxInclusive object. For the Int type this is defined as
+ * 2147483647.
+ * @return MaxInclusive object
+ */
+ virtual MaxInclusive* getMaxInclusive();
+
+ /**
+ * Creates a MaxExclusive object. For the Int type this is defined as
+ * 2147483648.
+ * @return MaxExclusive object
+ */
+ virtual MaxExclusive* getMaxExclusive();
+
private:
int* m_Int;
};
1.4 +10 -0 ws-axis/c/src/soap/xsd/Long.cpp
Index: Long.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Long.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Long.cpp 24 Jan 2005 16:25:55 -0000 1.3
+++ Long.cpp 24 Jan 2005 17:21:26 -0000 1.4
@@ -17,4 +17,14 @@
return new MinExclusive(static_cast<LONGLONG>(-9223372036854775809));
}
+MaxInclusive* Long::getMaxInclusive()
+{
+ return new MaxInclusive(static_cast<LONGLONG>(9223372036854775807));
+}
+
+MaxExclusive* Long::getMaxExclusive()
+{
+ return new MaxExclusive(static_cast<LONGLONG>(9223372036854775808));
+}
+
AXIS_CPP_NAMESPACE_END
1.4 +14 -0 ws-axis/c/src/soap/xsd/Long.hpp
Index: Long.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Long.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Long.hpp 24 Jan 2005 16:25:55 -0000 1.3
+++ Long.hpp 24 Jan 2005 17:21:26 -0000 1.4
@@ -53,6 +53,20 @@
* @return MinExclusive object
*/
virtual MinExclusive* getMinExclusive();
+
+ /**
+ * Creates a MaxInclusive object. For the Long type this is defined as
+ * 9223372036854775807.
+ * @return MaxInclusive object
+ */
+ virtual MaxInclusive* getMaxInclusive();
+
+ /**
+ * Creates a MaxExclusive object. For the Long type this is defined as
+ * 9223372036854775808.
+ * @return MaxExclusive object
+ */
+ virtual MaxExclusive* getMaxExclusive();
};
AXIS_CPP_NAMESPACE_END
1.4 +10 -0 ws-axis/c/src/soap/xsd/NonNegativeInteger.cpp
Index: NonNegativeInteger.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/NonNegativeInteger.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- NonNegativeInteger.cpp 24 Jan 2005 16:25:55 -0000 1.3
+++ NonNegativeInteger.cpp 24 Jan 2005 17:21:26 -0000 1.4
@@ -17,4 +17,14 @@
return new MinExclusive((LONGLONG) -1);
}
+MaxInclusive* NonNegativeInteger::getMaxInclusive()
+{
+ return new MaxInclusive();
+}
+
+MaxExclusive* NonNegativeInteger::getMaxExclusive()
+{
+ return new MaxExclusive();
+}
+
AXIS_CPP_NAMESPACE_END
1.4 +14 -0 ws-axis/c/src/soap/xsd/NonNegativeInteger.hpp
Index: NonNegativeInteger.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/NonNegativeInteger.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- NonNegativeInteger.hpp 24 Jan 2005 16:25:55 -0000 1.3
+++ NonNegativeInteger.hpp 24 Jan 2005 17:21:26 -0000 1.4
@@ -54,6 +54,20 @@
*/
virtual MinExclusive* getMinExclusive();
+ /**
+ * Creates a MaxInclusive object. For the NonNegativeInteger type this is
+ * undefined, so an unset MaxExclusive object is returned.
+ * @return MaxInclusive object
+ */
+ virtual MaxInclusive* getMaxInclusive();
+
+ /**
+ * Creates a MaxExclusive object. For the NonNegativeInteger type this is
+ * undefined, so an unset MaxExclusive object is returned.
+ * @return MaxExclusive object
+ */
+ virtual MaxExclusive* getMaxExclusive();
+
};
AXIS_CPP_NAMESPACE_END
1.4 +10 -0 ws-axis/c/src/soap/xsd/Short.cpp
Index: Short.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Short.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Short.cpp 24 Jan 2005 16:25:55 -0000 1.3
+++ Short.cpp 24 Jan 2005 17:21:26 -0000 1.4
@@ -52,4 +52,14 @@
return new MinExclusive(static_cast<LONGLONG>(-32769));
}
+MaxInclusive* Short::getMaxInclusive()
+{
+ return new MaxInclusive(static_cast<LONGLONG>(32767));
+}
+
+MaxExclusive* Short::getMaxExclusive()
+{
+ return new MaxExclusive(static_cast<LONGLONG>(32768));
+}
+
AXIS_CPP_NAMESPACE_END
1.4 +14 -0 ws-axis/c/src/soap/xsd/Short.hpp
Index: Short.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Short.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Short.hpp 24 Jan 2005 16:25:55 -0000 1.3
+++ Short.hpp 24 Jan 2005 17:21:26 -0000 1.4
@@ -84,6 +84,20 @@
* @return MinExclusive object
*/
virtual MinExclusive* getMinExclusive();
+
+ /**
+ * Creates a MaxInclusive object. For the Short type this is defined as
+ * 32767.
+ * @return MaxInclusive object
+ */
+ virtual MaxInclusive* getMaxInclusive();
+
+ /**
+ * Creates a MaxExclusive object. For the Short type this is defined as
+ * 32768.
+ * @return MaxExclusive object
+ */
+ virtual MaxExclusive* getMaxExclusive();
private:
short* m_Short;
1.6 +46 -0 ws-axis/c/src/soap/xsd/Time.cpp
Index: Time.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Time.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Time.cpp 24 Jan 2005 16:25:55 -0000 1.5
+++ Time.cpp 24 Jan 2005 17:21:26 -0000 1.6
@@ -53,6 +53,42 @@
}
}
delete minExclusive;
+
+ MaxInclusive* maxInclusive = getMaxInclusive();
+ if (maxInclusive->isSet())
+ {
+ if ( 0 > difftime(mktime(&(maxInclusive->getMaxInclusiveAsStructTM())), mktime(const_cast<struct tm*>(value))) )
+ {
+ AxisString exceptionMessage =
+ "Value to be serialized is greater than MaxInclusive specified for this type. MaxInclusive = ";
+ exceptionMessage += asctime(&(maxInclusive->getMaxInclusiveAsStructTM()));
+ exceptionMessage += ", Value = ";
+ exceptionMessage += asctime(value);
+ exceptionMessage += ".";
+
+ throw new AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR,
+ const_cast<AxisChar*>(exceptionMessage.c_str()));
+ }
+ }
+ delete maxInclusive;
+
+ MaxExclusive* maxExclusive = getMaxExclusive();
+ if (maxExclusive->isSet())
+ {
+ if ( 0 > difftime(mktime(&(maxExclusive->getMaxExclusiveAsStructTM())), mktime(const_cast<struct tm*>(value))) )
+ {
+ AxisString exceptionMessage =
+ "Value to be serialized is greater than or equal to MaxExclusive specified for this type. MaxExclusive = ";
+ exceptionMessage += asctime(&(maxExclusive->getMaxExclusiveAsStructTM()));
+ exceptionMessage += ", Value = ";
+ exceptionMessage += asctime(value);
+ exceptionMessage += ".";
+
+ throw new AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR,
+ const_cast<AxisChar*>(exceptionMessage.c_str()));
+ }
+ }
+ delete maxExclusive;
AxisChar* serializedValue = new AxisChar[80];
strftime (serializedValue, 80, "%H:%M:%SZ", value);
@@ -201,6 +237,16 @@
MinExclusive* Time::getMinExclusive()
{
return new MinExclusive();
+ }
+
+ MaxInclusive* Time::getMaxInclusive()
+ {
+ return new MaxInclusive();
+ }
+
+ MaxExclusive* Time::getMaxExclusive()
+ {
+ return new MaxExclusive();
}
WhiteSpace* Time::getWhiteSpace()
1.6 +16 -0 ws-axis/c/src/soap/xsd/Time.hpp
Index: Time.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Time.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Time.hpp 24 Jan 2005 16:25:55 -0000 1.5
+++ Time.hpp 24 Jan 2005 17:21:26 -0000 1.6
@@ -25,6 +25,8 @@
#include "IAnySimpleType.hpp"
#include "constraints/MinInclusive.hpp"
#include "constraints/MinExclusive.hpp"
+#include "constraints/MaxInclusive.hpp"
+#include "constraints/MaxExclusive.hpp"
#include <ctime>
AXIS_CPP_NAMESPACE_START
@@ -82,6 +84,20 @@
* @return MinExclusive object
*/
MinExclusive* getMinExclusive();
+
+ /**
+ * Creates a MaxInclusive object. For the Time type this is undefined,
+ * so an unset MaxInclusive object is created.
+ * @return MaxInclusive object
+ */
+ MaxInclusive* getMaxInclusive();
+
+ /**
+ * Creates a MaxExclusive object. For the Time type this is undefined,
+ * so an unset MaxExclusive object is created.
+ * @return MaxExclusive object
+ */
+ MaxExclusive* getMaxExclusive();
/**
* Creates a WhiteSpace object to collapse whitespace
1.2 +5 -0 ws-axis/c/src/soap/xsd/UnsignedLong.cpp
Index: UnsignedLong.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/UnsignedLong.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- UnsignedLong.cpp 24 Jan 2005 09:38:32 -0000 1.1
+++ UnsignedLong.cpp 24 Jan 2005 17:21:26 -0000 1.2
@@ -42,4 +42,9 @@
return m_UnsignedLong;
}
+MaxInclusive* UnsignedLong::getMaxInclusive()
+{
+ return new MaxInclusive((LONGLONG) 18446744073709551615);
+}
+
AXIS_CPP_NAMESPACE_END
1.2 +9 -0 ws-axis/c/src/soap/xsd/UnsignedLong.hpp
Index: UnsignedLong.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/UnsignedLong.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- UnsignedLong.hpp 24 Jan 2005 09:38:32 -0000 1.1
+++ UnsignedLong.hpp 24 Jan 2005 17:21:26 -0000 1.2
@@ -68,6 +68,15 @@
* @return Deserialized UnsignedLong value.
*/
unsigned long* deserializeUnsignedLong(const AxisChar* valueAsChar) throw (AxisSoapException);
+
+protected:
+
+ /**
+ * Creates a MaxInclusive object. For the UnsignedLong type this is
+ * defined as 18446744073709551615.
+ * @return MaxInclusive object
+ */
+ virtual MaxInclusive* getMaxInclusive();
private:
unsigned long *m_UnsignedLong;
1.33 +8 -0 ws-axis/c/vc/AxisClientDLL.dsp
Index: AxisClientDLL.dsp
===================================================================
RCS file: /home/cvs/ws-axis/c/vc/AxisClientDLL.dsp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- AxisClientDLL.dsp 24 Jan 2005 16:25:56 -0000 1.32
+++ AxisClientDLL.dsp 24 Jan 2005 17:21:26 -0000 1.33
@@ -294,6 +294,14 @@
# End Source File
# Begin Source File
+SOURCE=..\src\soap\xsd\constraints\MaxExclusive.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\soap\xsd\constraints\MaxInclusive.cpp
+# End Source File
+# Begin Source File
+
SOURCE=..\src\soap\xsd\constraints\MaxLength.cpp
# End Source File
# Begin Source File
1.32 +8 -0 ws-axis/c/vc/AxisServerDLL.dsp
Index: AxisServerDLL.dsp
===================================================================
RCS file: /home/cvs/ws-axis/c/vc/AxisServerDLL.dsp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- AxisServerDLL.dsp 24 Jan 2005 16:25:56 -0000 1.31
+++ AxisServerDLL.dsp 24 Jan 2005 17:21:26 -0000 1.32
@@ -290,6 +290,14 @@
# End Source File
# Begin Source File
+SOURCE=..\src\soap\xsd\constraints\MaxExclusive.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\soap\xsd\constraints\MaxInclusive.cpp
+# End Source File
+# Begin Source File
+
SOURCE=..\src\soap\xsd\constraints\MaxLength.cpp
# End Source File
# Begin Source File
1.1 ws-axis/c/src/soap/xsd/constraints/MaxExclusive.cpp
Index: MaxExclusive.cpp
===================================================================
#include "MaxExclusive.hpp"
AXIS_CPP_NAMESPACE_START
MaxExclusive::MaxExclusive(LONGLONG maxExclusive)
{
m_MaxExclusive.longlongMaxExclusive = maxExclusive;
m_isSet = true;
}
MaxExclusive::MaxExclusive(double maxExclusive)
{
m_MaxExclusive.doubleMaxExclusive = maxExclusive;
m_isSet = true;
}
MaxExclusive::MaxExclusive(struct tm maxExclusive)
{
m_MaxExclusive.structTMMaxExclusive = maxExclusive;
m_isSet = true;
}
MaxExclusive::MaxExclusive()
{
m_isSet = false;
}
LONGLONG MaxExclusive::getMaxExclusiveAsLONGLONG()
{
return m_MaxExclusive.longlongMaxExclusive;
}
double MaxExclusive::getMaxExclusiveAsDouble()
{
return m_MaxExclusive.doubleMaxExclusive;
}
struct tm MaxExclusive::getMaxExclusiveAsStructTM()
{
return m_MaxExclusive.structTMMaxExclusive;
}
AXIS_CPP_NAMESPACE_END
1.1 ws-axis/c/src/soap/xsd/constraints/MaxExclusive.hpp
Index: MaxExclusive.hpp
===================================================================
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* @file MaxExclusive.hpp
*/
#if !defined(_MAXEXCLUSIVE_HPP____OF_AXIS_INCLUDED_)
#define _MAXEXCLUSIVE_HPP____OF_AXIS_INCLUDED_
#include "IConstrainingFacet.hpp"
#include "../../../platforms/PlatformAutoSense.hpp"
#include <ctime>
AXIS_CPP_NAMESPACE_START
/**
* @class MaxExclusive
*
* @author Adrian Dick (adrian.dick@uk.ibm.com)
*
*/
class MaxExclusive : public IConstrainingFacet {
public:
MaxExclusive();
MaxExclusive(LONGLONG maxExclusive);
MaxExclusive(double maxExclusive);
MaxExclusive(struct tm maxExclusive);
LONGLONG getMaxExclusiveAsLONGLONG();
double getMaxExclusiveAsDouble();
struct tm getMaxExclusiveAsStructTM();
private:
union
{
LONGLONG longlongMaxExclusive;
double doubleMaxExclusive;
struct tm structTMMaxExclusive;
} m_MaxExclusive;
};
AXIS_CPP_NAMESPACE_END
#endif
1.1 ws-axis/c/src/soap/xsd/constraints/MaxInclusive.cpp
Index: MaxInclusive.cpp
===================================================================
#include "MaxInclusive.hpp"
AXIS_CPP_NAMESPACE_START
MaxInclusive::MaxInclusive(LONGLONG maxInclusive)
{
m_MaxInclusive.longlongMaxInclusive = maxInclusive;
m_isSet = true;
}
MaxInclusive::MaxInclusive(double maxInclusive)
{
m_MaxInclusive.doubleMaxInclusive = maxInclusive;
m_isSet = true;
}
MaxInclusive::MaxInclusive(struct tm maxInclusive)
{
m_MaxInclusive.structTMMaxInclusive = maxInclusive;
m_isSet = true;
}
MaxInclusive::MaxInclusive()
{
m_isSet = false;
}
LONGLONG MaxInclusive::getMaxInclusiveAsLONGLONG()
{
return m_MaxInclusive.longlongMaxInclusive;
}
double MaxInclusive::getMaxInclusiveAsDouble()
{
return m_MaxInclusive.doubleMaxInclusive;
}
struct tm MaxInclusive::getMaxInclusiveAsStructTM()
{
return m_MaxInclusive.structTMMaxInclusive;
}
AXIS_CPP_NAMESPACE_END
1.1 ws-axis/c/src/soap/xsd/constraints/MaxInclusive.hpp
Index: MaxInclusive.hpp
===================================================================
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* @file MaxInclusive.hpp
*/
#if !defined(_MAXINCLUSIVE_HPP____OF_AXIS_INCLUDED_)
#define _MAXINCLUSIVE_HPP____OF_AXIS_INCLUDED_
#include "IConstrainingFacet.hpp"
#include "../../../platforms/PlatformAutoSense.hpp"
#include <ctime>
AXIS_CPP_NAMESPACE_START
/**
* @class MaxInclusive
*
* @author Adrian Dick (adrian.dick@uk.ibm.com)
*
*/
class MaxInclusive : public IConstrainingFacet {
public:
MaxInclusive();
MaxInclusive(LONGLONG maxInclusive);
MaxInclusive(double maxInclusive);
MaxInclusive(struct tm maxInclusive);
LONGLONG getMaxInclusiveAsLONGLONG();
double getMaxInclusiveAsDouble();
struct tm getMaxInclusiveAsStructTM();
private:
union
{
LONGLONG longlongMaxInclusive;
double doubleMaxInclusive;
struct tm structTMMaxInclusive;
} m_MaxInclusive;
};
AXIS_CPP_NAMESPACE_END
#endif
1.1 ws-axis/c/src/soap/xsd/constraints/MinExclusive.cpp
Index: MinExclusive.cpp
===================================================================
#include "MinExclusive.hpp"
AXIS_CPP_NAMESPACE_START
MinExclusive::MinExclusive(LONGLONG minExclusive)
{
m_MinExclusive.longlongMinExclusive = minExclusive;
m_isSet = true;
}
MinExclusive::MinExclusive(double minExclusive)
{
m_MinExclusive.doubleMinExclusive = minExclusive;
m_isSet = true;
}
MinExclusive::MinExclusive(struct tm minExclusive)
{
m_MinExclusive.structTMMinExclusive = minExclusive;
m_isSet = true;
}
MinExclusive::MinExclusive()
{
m_isSet = false;
}
LONGLONG MinExclusive::getMinExclusiveAsLONGLONG()
{
return m_MinExclusive.longlongMinExclusive;
}
double MinExclusive::getMinExclusiveAsDouble()
{
return m_MinExclusive.doubleMinExclusive;
}
struct tm MinExclusive::getMinExclusiveAsStructTM()
{
return m_MinExclusive.structTMMinExclusive;
}
AXIS_CPP_NAMESPACE_END
1.1 ws-axis/c/src/soap/xsd/constraints/MinExclusive.hpp
Index: MinExclusive.hpp
===================================================================
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* @file MinExclusive.hpp
*/
#if !defined(_MINEXCLUSIVE_HPP____OF_AXIS_INCLUDED_)
#define _MINEXCLUSIVE_HPP____OF_AXIS_INCLUDED_
#include "IConstrainingFacet.hpp"
#include "../../../platforms/PlatformAutoSense.hpp"
#include <ctime>
AXIS_CPP_NAMESPACE_START
/**
* @class MinExclusive
*
* @author Adrian Dick (adrian.dick@uk.ibm.com)
*
*/
class MinExclusive : public IConstrainingFacet {
public:
MinExclusive();
MinExclusive(LONGLONG minExclusive);
MinExclusive(double minExclusive);
MinExclusive(struct tm minExclusive);
LONGLONG getMinExclusiveAsLONGLONG();
double getMinExclusiveAsDouble();
struct tm getMinExclusiveAsStructTM();
private:
union
{
LONGLONG longlongMinExclusive;
double doubleMinExclusive;
struct tm structTMMinExclusive;
} m_MinExclusive;
};
AXIS_CPP_NAMESPACE_END
#endif