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 di...@apache.org on 2005/01/12 17:43:47 UTC

cvs commit: ws-axis/c/src/soap SoapDeSerializer.cpp SoapDeSerializer.h

dicka       2005/01/12 08:43:47

  Modified:    c/src/common BasicTypeSerializer.cpp BasicTypeSerializer.h
               c/src/soap SoapDeSerializer.cpp SoapDeSerializer.h
  Log:
  Modification of BasicTypeSerializer and SoapDeSerializer to use OO Model for XSD simple types.
  XSD primitive simple types, using existing deserialization/serialization algorithms.  XSD derived simple types currently unchanged.
  
  Submitted by: Adrian Dick
  
  Revision  Changes    Path
  1.38      +167 -38   ws-axis/c/src/common/BasicTypeSerializer.cpp
  
  Index: BasicTypeSerializer.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/common/BasicTypeSerializer.cpp,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- BasicTypeSerializer.cpp	17 Dec 2004 11:49:44 -0000	1.37
  +++ BasicTypeSerializer.cpp	12 Jan 2005 16:43:46 -0000	1.38
  @@ -58,9 +58,10 @@
               m_sSZ += m_Buf;
               break;
           case XSD_BOOLEAN:
  -            AxisSprintf (m_Buf, BTS_BUFFSIZE, "%s",
  -                       (*((int*)(pValue)) == false_) ? "false" : "true");
  -            m_sSZ += m_Buf;
  +        	{
  +        		Boolean booleanSerializer;
  +           		m_sSZ += booleanSerializer.serialize(pValue);
  +        	}
               break;
           case XSD_UNSIGNEDINT:
               AxisSprintf (m_Buf, BTS_BUFFSIZE, "%u", *((unsigned int*)(pValue)));
  @@ -99,26 +100,84 @@
               m_sSZ += m_Buf;
               break;
           case XSD_DURATION:
  -            AxisSprintf (m_Buf, BTS_BUFFSIZE, "%s", m_AxisTime.serialize(
  -                *((long*)(pValue)), type).c_str ());
  -            m_sSZ += m_Buf;
  +        	{
  +        		Duration durationSerializer;
  +        		m_sSZ += durationSerializer.serialize(pValue);
  +        	}
               break;
           case XSD_UNSIGNEDLONG:
               AxisSprintf (m_Buf, BTS_BUFFSIZE, "%lu", *((unsigned long*)(pValue)));
               m_sSZ += m_Buf;
               break;
           case XSD_FLOAT:
  -            AxisSprintf (m_Buf, BTS_BUFFSIZE, "%g", *((float*)(pValue)));
  -            m_sSZ += m_Buf;
  +        	{
  +        		Float floatSerializer;
  +        		m_sSZ += floatSerializer.serialize(pValue);
  +        	}
               break;
           case XSD_DOUBLE:
  +        	{
  +        		Double doubleSerializer;
  +        		m_sSZ += doubleSerializer.serialize(pValue);
  +        	}
  +        	break;
           case XSD_DECIMAL:
  -            AxisSprintf (m_Buf, BTS_BUFFSIZE, "%g", *((double*)(pValue)));
  -            m_sSZ += m_Buf;
  +        	{
  +        		Decimal decimalSerializer;
  +        		m_sSZ += decimalSerializer.serialize(pValue);
  +        	}
               break;
           case XSD_STRING:
  +	        pStr = *((char**)(pValue));
  +            if (!pStr)
  +            {
  +                /*
  +                 * It is a null value not an empty value.
  +                 */
  +                m_sSZ = "<";
  +                m_sSZ += pName;
  +                m_sSZ += " xsi:nil=\"true\"/>\n";
  +                return m_sSZ.c_str ();
  +            }
  +            {
  +            	String stringSerializer;
  +            	m_sSZ += stringSerializer.serialize(pStr);
  +            }
  +            break;
           case XSD_ANYURI:
  +            pStr = *((char**)(pValue));
  +            if (!pStr)
  +            {
  +                /*
  +                 * It is a null value not an empty value.
  +                 */
  +                m_sSZ = "<";
  +                m_sSZ += pName;
  +                m_sSZ += " xsi:nil=\"true\"/>\n";
  +                return m_sSZ.c_str ();
  +            }
  +            {
  +            	AnyURI anyURISerializer;
  +            	m_sSZ += anyURISerializer.serialize(pStr);
  +            }
  +            break;
           case XSD_QNAME:
  +	        pStr = *((char**)(pValue));
  +            if (!pStr)
  +            {
  +                /*
  +                 * It is a null value not an empty value.
  +                 */
  +                m_sSZ = "<";
  +                m_sSZ += pName;
  +                m_sSZ += " xsi:nil=\"true\"/>\n";
  +                return m_sSZ.c_str ();
  +            }
  +            {
  +            	XSD_QName QNameSerializer;
  +            	m_sSZ += QNameSerializer.serialize(pStr);
  +            }
  +            break;
           case XSD_NOTATION:
               pStr = *((char**)(pValue));
               if (!pStr)
  @@ -131,21 +190,40 @@
                   m_sSZ += " xsi:nil=\"true\"/>\n";
                   return m_sSZ.c_str ();
               }
  -            m_AuxStr = pStr;
  -            m_sSZ += getEntityReferenced (m_AuxStr).c_str ();
  +            {
  +            	NOTATION notationSerializer;
  +            	m_sSZ += notationSerializer.serialize(pStr);
  +            }
               break;
           case XSD_HEXBINARY:
  -            m_sSZ += encodeToHexBinary ((xsd__hexBinary*) (pValue));
  +        	{
  +        		HexBinary hexBinarySerializer;
  +        		m_sSZ += hexBinarySerializer.serialize(pValue);
  +        	}
               break;
           case XSD_BASE64BINARY:
  -            m_sSZ += encodeToBase64Binary ((xsd__base64Binary*) (pValue));
  +        	{
  +        		Base64Binary base64BinarySerializer;
  +        		m_sSZ += base64BinarySerializer.serialize(pValue);
  +        	}
               break;
           case XSD_DATETIME:
  +        	{
  +        		DateTime dateTimeSerializer;
  +        		m_sSZ += dateTimeSerializer.serialize(pValue);
  +        	}
  +        	break;
           case XSD_DATE:
  +        	{
  +        		Date dateSerializer;
  +        		m_sSZ += dateSerializer.serialize(pValue);
  +        	}
  +        	break;
           case XSD_TIME:
  -            AxisSprintf (m_Buf, BTS_BUFFSIZE, "%s", m_AxisTime.serialize(
  -                *((struct tm*)(pValue)), type).c_str ());
  -            m_sSZ += m_Buf;
  +        	{
  +        		Time timeSerializer;
  +        		m_sSZ += timeSerializer.serialize(pValue);
  +        	}
               break;
           default:
               return NULL;
  @@ -199,9 +277,10 @@
               m_sSZ += m_Buf;
               break;
           case XSD_BOOLEAN:
  -            AxisSprintf (m_Buf, BTS_BUFFSIZE, "%s",
  -                (*((int *) (pValue)) == 0) ? "false" : "true");
  -            m_sSZ += m_Buf;
  +        	{
  +            	Boolean booleanSerializer;
  +            	m_sSZ += booleanSerializer.serialize(pValue);
  +        	}
               break;
           case XSD_UNSIGNEDINT:
               AxisSprintf (m_Buf, BTS_BUFFSIZE, "%u", *((unsigned int*)(pValue)));
  @@ -240,10 +319,10 @@
               m_sSZ += m_Buf;
               break;
           case XSD_DURATION:
  -            AxisSprintf (m_Buf, BTS_BUFFSIZE, "%s",
  -                m_AxisTime.serialize (*((long*)(pValue)),
  -                type).c_str ());
  -            m_sSZ += m_Buf;
  +        	{
  +        		Duration durationSerializer;
  +        		m_sSZ += durationSerializer.serialize(pValue);
  +        	}
               break;
           case XSD_UNSIGNEDLONG:
               AxisSprintf (m_Buf, BTS_BUFFSIZE, "%lu",
  @@ -251,35 +330,85 @@
               m_sSZ += m_Buf;
               break;
           case XSD_FLOAT:
  -            AxisSprintf (m_Buf, BTS_BUFFSIZE, "%f", *((float*)(pValue)));
  -            m_sSZ += m_Buf;
  +        	{
  +        		Float floatSerializer;
  +        		m_sSZ += floatSerializer.serialize(pValue);
  +        	}
               break;
           case XSD_DOUBLE:
  +        	{
  +        		Double doubleSerializer;
  +        		m_sSZ += doubleSerializer.serialize(pValue);
  +        	}
  +        	break;
           case XSD_DECIMAL:
  -            AxisSprintf (m_Buf, BTS_BUFFSIZE, "%f", *((double*)(pValue)));
  -            m_sSZ += m_Buf;
  +        	{
  +        		Decimal decimalSerializer;
  +        		m_sSZ += decimalSerializer.serialize(pValue);
  +        	}
               break;
  -        case XSD_STRING:
           case XSD_ANYURI:
  +            {
  +            	const AxisChar* pStr;
  +            	pStr = *((char**)(pValue));
  +           		AnyURI anyURISerializer;
  +           		m_sSZ += anyURISerializer.serialize(pStr);
  +            }
  +        	break;
  +        case XSD_STRING:
  +        	{
  +        		const AxisChar* pStr;
  +            	pStr = *((char**)(pValue));
  +        		String stringSerializer;
  +        		m_sSZ += stringSerializer.serialize(pStr);
  +        	}
  +        	break;
           case XSD_QNAME:
  +	        {
  +        		const AxisChar* pStr;
  +            	pStr = *((char**)(pValue));
  +        		XSD_QName QNameSerializer;
  +        		m_sSZ += QNameSerializer.serialize(pStr);
  +        	}
  +        	break;
           case XSD_NOTATION:
  -            m_AuxStr = *((char**)(pValue));
  -            m_sSZ += getEntityReferenced (m_AuxStr).c_str ();
  +        	{
  +        		const AxisChar* pStr;
  +        		pStr = *((char**)(pValue));
  +        		NOTATION notationSerializer;
  +            	m_sSZ += notationSerializer.serialize(pStr);
  +        	}
               break;
           case XSD_HEXBINARY:
  -            m_sSZ += encodeToHexBinary ((xsd__hexBinary*)(pValue));
  +        	{
  +        		HexBinary hexBinarySerializer;
  +        		m_sSZ += hexBinarySerializer.serialize(pValue);
  +        	}
               break;
           case XSD_BASE64BINARY:
  -            m_sSZ += encodeToBase64Binary ((xsd__base64Binary*)(pValue));
  +        	{
  +        		Base64Binary base64BinarySerializer;
  +        		m_sSZ += base64BinarySerializer.serialize(pValue);
  +        	}
               break;
           case XSD_DATETIME:
  +        	{
  +        		DateTime dateTimeSerializer;
  +        		m_sSZ += dateTimeSerializer.serialize(pValue);
  +        	}
  +        	break;
           case XSD_DATE:
  +	        {
  +	        	Date dateSerializer;
  +	        	m_sSZ += dateSerializer.serialize(pValue);
  +	        }
  +	        break;
           case XSD_TIME:
  -            AxisSprintf (m_Buf, BTS_BUFFSIZE, "%s",
  -                m_AxisTime.serialize (*((struct tm *) (pValue)),
  -                type).c_str ());
  -            m_sSZ += m_Buf;
  -            break;
  +        	{
  +        		Time timeSerializer;
  +        		m_sSZ += timeSerializer.serialize(pValue);
  +        	}
  +        	break;
           default:
               return NULL;
       }
  
  
  
  1.22      +15 -0     ws-axis/c/src/common/BasicTypeSerializer.h
  
  Index: BasicTypeSerializer.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/common/BasicTypeSerializer.h,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- BasicTypeSerializer.h	17 Dec 2004 11:49:44 -0000	1.21
  +++ BasicTypeSerializer.h	12 Jan 2005 16:43:46 -0000	1.22
  @@ -29,6 +29,21 @@
   #include <axis/TypeMapping.hpp>
   #include "AxisTime.h"
   #include <string>
  +#include "../soap/xsd/Boolean.hpp"
  +#include "../soap/xsd/AnyURI.hpp"
  +#include "../soap/xsd/String.hpp"
  +#include "../soap/xsd/XSD_QName.hpp"
  +#include "../soap/xsd/NOTATION.hpp"
  +#include "../soap/xsd/Base64Binary.hpp"
  +#include "../soap/xsd/HexBinary.hpp"
  +#include "../soap/xsd/Duration.hpp"
  +#include "../soap/xsd/DateTime.hpp"
  +#include "../soap/xsd/Date.hpp"
  +#include "../soap/xsd/Time.hpp"
  +#include "../soap/xsd/Float.hpp"
  +#include "../soap/xsd/Double.hpp"
  +#include "../soap/xsd/Decimal.hpp"
  +
   using namespace std;
   
   #define BTS_BUFFSIZE 32
  
  
  
  1.123     +830 -718  ws-axis/c/src/soap/SoapDeSerializer.cpp
  
  Index: SoapDeSerializer.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapDeSerializer.cpp,v
  retrieving revision 1.122
  retrieving revision 1.123
  diff -u -r1.122 -r1.123
  --- SoapDeSerializer.cpp	30 Dec 2004 06:22:04 -0000	1.122
  +++ SoapDeSerializer.cpp	12 Jan 2005 16:43:46 -0000	1.123
  @@ -880,12 +880,98 @@
   /* Following macros are used just to shorten the coding */
   #define CONV_STRTOL(str) strtol(str, &m_pEndptr, 10)
   #define CONV_STRTOUL(str) strtoul(str, &m_pEndptr, 10)
  -#define CONV_STRTOD(str) strtod(str,  &m_pEndptr)
  -#define CONV_STRTODATETIME(str) AxisTime::deserialize(str, nType)
  -#define CONV_STRTODURATION(str) AxisTime::deserializeDuration(str, nType)
  +#define CONV_STRTODECIMAL(str) AxisSoapDeSerializerStringToDecimal(str)
  +#define CONV_STRTOFLOAT(str) AxisSoapDeSerializerStringToFloat(str)
  +#define CONV_STRTODOUBLE(str) AxisSoapDeSerializerStringToDouble(str)
  +#define CONV_STRTODATETIME(str) AxisSoapDeSerializerStringToDateTime(str)
  +#define CONV_STRTODATE(str) AxisSoapDeSerializerStringToDate(str)
  +#define CONV_STRTOTIME(str) AxisSoapDeSerializerStringToTime(str)
  +#define CONV_STRTODURATION(str) AxisSoapDeSerializerStringToDuration(str)
   #define CONV_STRINGCOPY(str) AxisSoapDeSerializerStringCopy(str)
  -#define CONV_STRTOBASE64BINARY(str) decodeFromBase64Binary(str)
  -#define CONV_STRTOHEXBINARY(str) decodeFromHexBinary(str)
  +#define CONV_STRTOBASE64BINARY(str) AxisSoapDeSerializerStringToBase64Binary(str)
  +#define CONV_STRTOHEXBINARY(str) AxisSoapDeSerializerStringToHexBinary(str)
  +#define CONV_STRTOANYURI(str) AxisSoapDeSerializerStringToAnyURI(str)
  +#define CONV_STRTOSTRING(str) AxisSoapDeSerializerStringToString(str)
  +#define CONV_STRTOQNAME(str) AxisSoapDeSerializerStringToQName(str)
  +#define CONV_STRTONOTATION(str) AxisSoapDeSerializerStringToNotation(str)
  +
  +double AxisSoapDeSerializerStringToDecimal(const char *valueAsChar)
  +{
  +	Decimal decimalDeserializer;
  +	return *( decimalDeserializer.deserializeDecimal(valueAsChar));
  +}
  +
  +double AxisSoapDeSerializerStringToDouble(const char *valueAsChar)
  +{
  +	Double doubleDeserializer;
  +	return *( doubleDeserializer.deserializeDouble(valueAsChar));
  +}
  +
  +float AxisSoapDeSerializerStringToFloat(const char *valueAsChar)
  +{
  +	Float floatDeserializer;
  +	return *( floatDeserializer.deserializeFloat(valueAsChar));
  +}
  +
  +struct tm AxisSoapDeSerializerStringToTime(const char *valueAsChar)
  +{
  +	Time timeDeserializer;
  +	return *(timeDeserializer.deserializeTime(valueAsChar));
  +}
  +
  +struct tm AxisSoapDeSerializerStringToDate(const char *valueAsChar)
  +{
  +	Date dateDeserializer;
  +	return *(dateDeserializer.deserializeDate(valueAsChar));
  +}
  +
  +struct tm AxisSoapDeSerializerStringToDateTime(const char *valueAsChar)
  +{
  +	DateTime dateTimeDeserializer;
  +	return *(dateTimeDeserializer.deserializeDateTime(valueAsChar));
  +}
  +
  +long AxisSoapDeSerializerStringToDuration(const char *valueAsChar)
  +{
  +	Duration durationDeserializer;
  +	return *(durationDeserializer.deserializeDuration(valueAsChar));
  +}
  +
  +xsd__hexBinary AxisSoapDeSerializerStringToHexBinary(const char *valueAsChar)
  +{
  +	HexBinary hexBinaryDeserializer;
  +	return *( hexBinaryDeserializer.deserializeHexBinary(valueAsChar) );
  +}
  +
  +xsd__base64Binary AxisSoapDeSerializerStringToBase64Binary(const char *valueAsChar)
  +{
  +	Base64Binary base64BinaryDeserializer;
  +	return *( base64BinaryDeserializer.deserializeBase64Binary(valueAsChar) );
  +}
  +
  +AxisChar* AxisSoapDeSerializerStringToAnyURI(const char *valueAsChar)
  +{
  +	AnyURI anyURIDeserializer;
  +	return anyURIDeserializer.deserializeAnyURI(valueAsChar);
  +}
  +
  +AxisChar* AxisSoapDeSerializerStringToString(const char *valueAsChar)
  +{
  +	String stringDeserializer;
  +	return stringDeserializer.deserializeString(valueAsChar);
  +}
  +
  +AxisChar* AxisSoapDeSerializerStringToQName(const char *valueAsChar)
  +{
  +	XSD_QName qnameDeserializer;
  +	return qnameDeserializer.deserializeQName(valueAsChar);
  +}
  +
  +AxisChar* AxisSoapDeSerializerStringToNotation(const char *valueAsChar)
  +{
  +	NOTATION notationDeserializer;
  +	return notationDeserializer.deserializeNOTATION(valueAsChar);
  +}
   
   char *
   AxisSoapDeSerializerStringCopy (const char *s1)
  @@ -1020,599 +1106,579 @@
   
       /* if anything has gone wrong earlier just do nothing */
       if (RPC_ENCODED == m_nStyle)
  -    {
  -	m_pNode = m_pParser->next ();
  -
  -	/* just skip wrapper node with type info  Ex: <tns:ArrayOfPhoneNumbers
  -	 * xmlns:tns="http://www.getquote.org/test">
  -	 */
  -	if (!m_pNode)
  -	{
  -	    return Array;
  -	}
  -
  -	Array.m_Size = getArraySize (m_pNode);
  -
  -	if (Array.m_Size > 0)
  -	{
  -	    switch (nType)
   	    {
  -	    case XSD_INT:
  -		Array.m_Array = new int[Array.m_Size];
  -
  -		if (!Array.m_Array)
  -		{
  -		    Array.m_Size = 0;
  -		    m_nStatus = AXIS_FAIL;
  -
  -		    return Array;
  -		}
  -
  -		for (; nIndex < Array.m_Size; nIndex++)
  -		{
  -		    m_pNode = m_pParser->next ();
  -		    /* wrapper node without type info  Ex: <item> */
  -		    m_pNode = m_pParser->next (true);	/* charactor node */
  -
  -		    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
  -		    {
  -			((int *) Array.m_Array)[nIndex] =
  -			    strtol (m_pNode->m_pchNameOrValue, &m_pEndptr,
  -				    10);
  -			m_pNode = m_pParser->next ();
  -			/* skip end element node too */
  -			continue;
  -		    }
  -
  -		    /* error : unexpected element type or end of stream */
  -		    m_nStatus = AXIS_FAIL;
  -		    delete[](int *) Array.m_Array;
  -		    Array.m_Array = 0;
  -		    Array.m_Size = 0;
  -
  -		    return Array;
  -		}
  -
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		return Array;
  -
  -	    case XSD_UNSIGNEDINT:
  -		DESERIALIZE_ENCODED_ARRAY_BLOCK (unsigned int, CONV_STRTOUL)
  -		    case XSD_SHORT:DESERIALIZE_ENCODED_ARRAY_BLOCK (short,
  -								    CONV_STRTOL)
  -		    case
  -		    XSD_UNSIGNEDSHORT:DESERIALIZE_ENCODED_ARRAY_BLOCK
  -		    (unsigned short,
  -		     CONV_STRTOUL) case
  -		    XSD_BYTE:DESERIALIZE_ENCODED_ARRAY_BLOCK (char,
  -							      CONV_STRTOL)
  -		    case
  -		    XSD_UNSIGNEDBYTE:DESERIALIZE_ENCODED_ARRAY_BLOCK (unsigned
  -								      char,
  -								      CONV_STRTOUL)
  -		    case XSD_LONG:DESERIALIZE_ENCODED_ARRAY_BLOCK (LONGLONG,
  -								   CONV_STRTOUL)
  -		    case XSD_INTEGER:DESERIALIZE_ENCODED_ARRAY_BLOCK (long,
  -								      CONV_STRTOL)
  -		    case
  -		    XSD_UNSIGNEDLONG:DESERIALIZE_ENCODED_ARRAY_BLOCK (unsigned
  -								      long,
  -								      CONV_STRTOUL)
  -		    case XSD_FLOAT:DESERIALIZE_ENCODED_ARRAY_BLOCK (float,
  -								    CONV_STRTOD)
  -		    case XSD_DOUBLE:case
  -		    XSD_DECIMAL:DESERIALIZE_ENCODED_ARRAY_BLOCK (double,
  -								 CONV_STRTOD)
  -		    case XSD_STRING:case XSD_HEXBINARY:case
  -		    XSD_BASE64BINARY:case XSD_ANYURI:case XSD_QNAME:case
  -		    XSD_NOTATION:DESERIALIZE_ENCODED_ARRAY_BLOCK (char *,
  -								  CONV_STRINGCOPY)
  -		    case XSD_DATETIME:case XSD_DATE:case
  -		    XSD_TIME:DESERIALIZE_ENCODED_ARRAY_BLOCK (struct tm,
  -							      CONV_STRTODATETIME)
  -		    case XSD_DURATION:DESERIALIZE_ENCODED_ARRAY_BLOCK (long,
  -								       CONV_STRTODURATION)
  -		    case XSD_BOOLEAN:
  -//                                      DESERIALIZE_ENCODED_ARRAY_BLOCK(long, CONV_STRTOL)
  -		  Array.m_Array = new long[Array.m_Size];
  -
  -		if (!Array.m_Array)
  +		m_pNode = m_pParser->next ();
  +	
  +		/* just skip wrapper node with type info  Ex: <tns:ArrayOfPhoneNumbers
  +		 * xmlns:tns="http://www.getquote.org/test">
  +		 */
  +		if (!m_pNode)
   		{
  -		    Array.m_Size = 0;
  -		    m_nStatus = AXIS_FAIL;
   		    return Array;
   		}
  -
  -		for (; nIndex < Array.m_Size; nIndex++)
  -		{
  -		    /* wrapper node without type info  Ex: <item> */
  -		    m_pNode = m_pParser->next ();
  -		    m_pNode = m_pParser->next (true);	/* charactor node */
  -
  -		    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
  -		    {
  -			if (!strcmp ("false", m_pNode->m_pchNameOrValue)
  -			    || !strcmp ("FALSE", m_pNode->m_pchNameOrValue))
  -			{
  -			    ((long *) Array.m_Array)[nIndex] = 0;
  -			}
  -			else if (!strcmp ("true", m_pNode->m_pchNameOrValue)
  -				 || !strcmp ("TRUE",
  -					     m_pNode->m_pchNameOrValue))
  +	
  +		Array.m_Size = getArraySize (m_pNode);
  +	
  +		if (Array.m_Size > 0)
  +		{
  +		    switch (nType)
  +		    {
  +		    case XSD_INT:
  +			Array.m_Array = new int[Array.m_Size];
  +	
  +			if (!Array.m_Array)
   			{
  -			    ((long *) Array.m_Array)[nIndex] = 1;
  +			    Array.m_Size = 0;
  +			    m_nStatus = AXIS_FAIL;
  +	
  +			    return Array;
   			}
  -			else
  +	
  +			for (; nIndex < Array.m_Size; nIndex++)
   			{
  -			    ((long *) Array.m_Array)[nIndex] =
  -				(long) (strtol
  -					(m_pNode->m_pchNameOrValue,
  -					 &m_pEndptr, 10) & 1);
  +			    m_pNode = m_pParser->next ();
  +			    /* wrapper node without type info  Ex: <item> */
  +			    m_pNode = m_pParser->next (true);	/* charactor node */
  +	
  +			    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
  +			    {
  +				((int *) Array.m_Array)[nIndex] =
  +				    strtol (m_pNode->m_pchNameOrValue, &m_pEndptr,
  +					    10);
  +				m_pNode = m_pParser->next ();
  +				/* skip end element node too */
  +				continue;
  +			    }
  +	
  +			    /* error : unexpected element type or end of stream */
  +			    m_nStatus = AXIS_FAIL;
  +			    delete[](int *) Array.m_Array;
  +			    Array.m_Array = 0;
  +			    Array.m_Size = 0;
  +	
  +			    return Array;
   			}
  -
  +	
   			m_pNode = m_pParser->next ();	/* skip end element node too */
  -
  -			continue;
  +			return Array;
  +	
  +		    case XSD_UNSIGNEDINT:
  +				DESERIALIZE_ENCODED_ARRAY_BLOCK (unsigned int, CONV_STRTOUL)
  +		    case XSD_SHORT:
  +		    	DESERIALIZE_ENCODED_ARRAY_BLOCK (short,CONV_STRTOL)
  +		    case XSD_UNSIGNEDSHORT:
  +		    	DESERIALIZE_ENCODED_ARRAY_BLOCK(unsigned short, CONV_STRTOUL)
  +		    case XSD_BYTE:
  +		    	DESERIALIZE_ENCODED_ARRAY_BLOCK (char, CONV_STRTOL)
  +		    case XSD_UNSIGNEDBYTE:
  +		    	DESERIALIZE_ENCODED_ARRAY_BLOCK (unsigned char, CONV_STRTOUL)
  +		    case XSD_LONG:
  +		    	DESERIALIZE_ENCODED_ARRAY_BLOCK (LONGLONG, CONV_STRTOUL)
  +		    case XSD_INTEGER:
  +		    	DESERIALIZE_ENCODED_ARRAY_BLOCK (long, CONV_STRTOL)
  +		    case XSD_UNSIGNEDLONG:
  +		    	DESERIALIZE_ENCODED_ARRAY_BLOCK (unsigned long, CONV_STRTOUL)
  +		    case XSD_FLOAT:
  +		    	DESERIALIZE_ENCODED_ARRAY_BLOCK (float, CONV_STRTOFLOAT)
  +		    case XSD_DOUBLE:
  +		    	DESERIALIZE_ENCODED_ARRAY_BLOCK (double, CONV_STRTODOUBLE)
  +		    case XSD_DECIMAL:
  +		    	DESERIALIZE_ENCODED_ARRAY_BLOCK (double, CONV_STRTODECIMAL)
  +		    case XSD_ANYURI:
  +		    	DESERIALIZE_ENCODED_ARRAY_BLOCK (AxisChar *, CONV_STRTOANYURI)
  +		    case XSD_STRING:
  +		    	DESERIALIZE_ENCODED_ARRAY_BLOCK (AxisChar *, CONV_STRTOSTRING)
  +		    case XSD_QNAME:
  +		    	DESERIALIZE_ENCODED_ARRAY_BLOCK (AxisChar *, CONV_STRTOQNAME)
  +		    case XSD_NOTATION:
  +		    	DESERIALIZE_ENCODED_ARRAY_BLOCK (AxisChar *, CONV_STRTONOTATION)
  +		    case XSD_BASE64BINARY:
  +		    	DESERIALIZE_ENCODED_ARRAY_BLOCK (xsd__base64Binary, CONV_STRTOBASE64BINARY)
  +		    case XSD_HEXBINARY:
  +		    	DESERIALIZE_ENCODED_ARRAY_BLOCK (xsd__hexBinary, CONV_STRTOHEXBINARY)
  +		    case XSD_DATETIME:
  +		    	DESERIALIZE_ENCODED_ARRAY_BLOCK (struct tm, CONV_STRTODATETIME)
  +		    case XSD_DATE:
  +		    	DESERIALIZE_ENCODED_ARRAY_BLOCK (struct tm, CONV_STRTODATE)
  +		    case XSD_TIME:
  +		    	DESERIALIZE_ENCODED_ARRAY_BLOCK (struct tm, CONV_STRTOTIME)
  +		    case XSD_DURATION:
  +		    	DESERIALIZE_ENCODED_ARRAY_BLOCK (long, CONV_STRTODURATION)
  +		    case XSD_BOOLEAN:
  +				// DESERIALIZE_ENCODED_ARRAY_BLOCK(long, CONV_STRTOL)
  +				Array.m_Array = new long[Array.m_Size];
  +		
  +				if (!Array.m_Array)
  +				{
  +				    Array.m_Size = 0;
  +				    m_nStatus = AXIS_FAIL;
  +				    return Array;
  +				}
  +	
  +				for (; nIndex < Array.m_Size; nIndex++)
  +				{
  +				    /* wrapper node without type info  Ex: <item> */
  +				    m_pNode = m_pParser->next ();
  +				    m_pNode = m_pParser->next (true);	/* charactor node */
  +		
  +				    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
  +				    {
  +				    	Boolean booleanDeserializer;
  +				    	((long *) Array.m_Array)[nIndex] =
  +				    		booleanDeserializer.deserializeBoolean(m_pNode->m_pchNameOrValue);
  +						m_pNode = m_pParser->next ();	/* skip end element node too */
  +			
  +						continue;
  +				    }
  +				    /* error : unexpected element type or end of stream */
  +				    m_nStatus = AXIS_FAIL;
  +				    delete[](long *) Array.m_Array;
  +				    Array.m_Array = 0;
  +				    Array.m_Size = 0;
  +				}
  +		
  +				return Array;
  +		    default:
  +		    	;
   		    }
  -		    /* error : unexpected element type or end of stream */
  -		    m_nStatus = AXIS_FAIL;
  -		    delete[](long *) Array.m_Array;
  -		    Array.m_Array = 0;
  -		    Array.m_Size = 0;
   		}
  -
  -		return Array;
  -
  -	    default:;
   	    }
  -	}
  -    }
       else
  -    {
  -	switch (nType)
  -	{
  -	case XSD_INT:
  -	    Array.m_Array = new int[INITIAL_ARRAY_SIZE];
  -
  -	    if (!Array.m_Array)
   	    {
  -		return Array;
  -	    }
  -
  -	    Array.m_Size = INITIAL_ARRAY_SIZE;
  -
  -	    while (true)
  -	    {
  -		for (; nIndex < Array.m_Size; nIndex++)
  +		switch (nType)
   		{
  -		    if (!m_pNode)
  -		    {
  -			/* if there is an unprocessed node that may be one 
  -			 * left from last array deserialization
  -			 */
  -			m_pNode = m_pParser->next ();
  -		    }
  -
  -		    /* wrapper node without type info  Ex: <phonenumbers> */
  -		    if (!m_pNode)
  +		case XSD_INT:
  +		    Array.m_Array = new int[INITIAL_ARRAY_SIZE];
  +	
  +		    if (!Array.m_Array)
   		    {
  -			m_nStatus = AXIS_FAIL;
  -			delete[](int *) Array.m_Array;
  -			Array.m_Array = 0;
  -			Array.m_Size = 0;
  -
   			return Array;
   		    }
  -
  -		    if (0 == strcmp (pName, m_pNode->m_pchNameOrValue))
  +	
  +		    Array.m_Size = INITIAL_ARRAY_SIZE;
  +	
  +		    while (true)
   		    {
  -			m_pNode = m_pParser->next (true);	/* charactor node */
  -
  -			if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
  +			for (; nIndex < Array.m_Size; nIndex++)
   			{
  -			    ((int *) Array.m_Array)[nIndex] =
  -				strtol (m_pNode->m_pchNameOrValue, &m_pEndptr,
  -					10);
  -			    m_pNode = m_pParser->next ();
  -			    /* skip end element node too */
  -			    m_pNode = NULL;	/* this is important in doc/lit 
  -						 * style when deserializing arrays
  -						 */
  -			    continue;
  +			    if (!m_pNode)
  +			    {
  +				/* if there is an unprocessed node that may be one 
  +				 * left from last array deserialization
  +				 */
  +				m_pNode = m_pParser->next ();
  +			    }
  +	
  +			    /* wrapper node without type info  Ex: <phonenumbers> */
  +			    if (!m_pNode)
  +			    {
  +				m_nStatus = AXIS_FAIL;
  +				delete[](int *) Array.m_Array;
  +				Array.m_Array = 0;
  +				Array.m_Size = 0;
  +	
  +				return Array;
  +			    }
  +	
  +			    if (0 == strcmp (pName, m_pNode->m_pchNameOrValue))
  +			    {
  +				m_pNode = m_pParser->next (true);	/* charactor node */
  +	
  +				if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
  +				{
  +				    ((int *) Array.m_Array)[nIndex] =
  +					strtol (m_pNode->m_pchNameOrValue, &m_pEndptr,
  +						10);
  +				    m_pNode = m_pParser->next ();
  +				    /* skip end element node too */
  +				    m_pNode = NULL;	/* this is important in doc/lit 
  +							 * style when deserializing arrays
  +							 */
  +				    continue;
  +				}
  +				/* error : unexpected element type or end of the stream */
  +			    }
  +			    else
  +			    {
  +				if (nIndex > 0)
  +				{
  +				    Array.m_Size = nIndex;
  +				    /* put the actual deserialized item size
  +				     * note we do not make m_pNode = NULL because this
  +				     * node doesnot belong to this array
  +				     */
  +				    return Array;
  +				}
  +				/* error : no elements deserialized */
  +			    }
  +	
  +			    /* if we come here it is an error situation */
  +			    m_nStatus = AXIS_FAIL;
  +			    m_pNode = NULL;
  +			    delete[](int *) Array.m_Array;
  +			    Array.m_Array = 0;
  +			    Array.m_Size = 0;
  +			    return Array;
   			}
  -			/* error : unexpected element type or end of the stream */
  -		    }
  -		    else
  -		    {
  -			if (nIndex > 0)
  +			/* if we come here that means the array allocated is not enough
  +			 * So double it
  +			 */
  +			void *tmp = Array.m_Array;
  +			Array.m_Array = new int[Array.m_Size * 2];
  +	
  +			if (!Array.m_Array)
   			{
  -			    Array.m_Size = nIndex;
  -			    /* put the actual deserialized item size
  -			     * note we do not make m_pNode = NULL because this
  -			     * node doesnot belong to this array
  -			     */
  +			    Array.m_Size = 0;
   			    return Array;
   			}
  -			/* error : no elements deserialized */
  +	
  +			memcpy (Array.m_Array, tmp, Array.m_Size * sizeof (int));
  +			delete[](int *) tmp;
  +			Array.m_Size *= 2;
  +			/* Array.m_RealSize = Array.m_Size; */
   		    }
  -
  -		    /* if we come here it is an error situation */
  -		    m_nStatus = AXIS_FAIL;
  -		    m_pNode = NULL;
  -		    delete[](int *) Array.m_Array;
  -		    Array.m_Array = 0;
  -		    Array.m_Size = 0;
  -		    return Array;
  -		}
  -		/* if we come here that means the array allocated is not enough
  -		 * So double it
  -		 */
  -		void *tmp = Array.m_Array;
  -		Array.m_Array = new int[Array.m_Size * 2];
  -
  -		if (!Array.m_Array)
  -		{
  -		    Array.m_Size = 0;
  +	
   		    return Array;
  -		}
  -
  -		memcpy (Array.m_Array, tmp, Array.m_Size * sizeof (int));
  -		delete[](int *) tmp;
  -		Array.m_Size *= 2;
  -		/* Array.m_RealSize = Array.m_Size; */
  -	    }
  -
  -	    return Array;
  -	    break;
  -
  -	case XSD_UNSIGNEDINT:
  -	    DESERIALIZE_LITERAL_ARRAY_BLOCK (unsigned int, CONV_STRTOUL)
  -		case XSD_SHORT:DESERIALIZE_LITERAL_ARRAY_BLOCK (short,
  -								CONV_STRTOL)
  -		case
  -		XSD_UNSIGNEDSHORT:DESERIALIZE_LITERAL_ARRAY_BLOCK (unsigned
  -								   short,
  -								   CONV_STRTOUL)
  -		case XSD_BYTE:DESERIALIZE_LITERAL_ARRAY_BLOCK (char,
  -							       CONV_STRTOL)
  -		case
  -		XSD_UNSIGNEDBYTE:DESERIALIZE_LITERAL_ARRAY_BLOCK (unsigned
  -								  char,
  -								  CONV_STRTOUL)
  +		    break;
  +	
  +		case XSD_UNSIGNEDINT:
  +		    DESERIALIZE_LITERAL_ARRAY_BLOCK (unsigned int, CONV_STRTOUL)
  +		case XSD_SHORT:
  +			DESERIALIZE_LITERAL_ARRAY_BLOCK (short, CONV_STRTOL)
  +		case XSD_UNSIGNEDSHORT:
  +			DESERIALIZE_LITERAL_ARRAY_BLOCK (unsigned short, CONV_STRTOUL)
  +		case XSD_BYTE:
  +			DESERIALIZE_LITERAL_ARRAY_BLOCK (char, CONV_STRTOL)
  +		case XSD_UNSIGNEDBYTE:
  +			DESERIALIZE_LITERAL_ARRAY_BLOCK (unsigned char, CONV_STRTOUL)
   		case XSD_LONG:
  -//                              DESERIALIZE_ENCODED_ARRAY_BLOCK (LONGLONG, CONV_STRTOUL)
  -// > FJP
  -	      Array.m_Array = new LONGLONG[INITIAL_ARRAY_SIZE];
  -
  -	    if (!Array.m_Array)
  -	    {
  -		return Array;
  -	    }
  -
  -	    Array.m_Size = INITIAL_ARRAY_SIZE;
  -
  -	    while (true)
  -	    {
  -		for (; nIndex < Array.m_Size; nIndex++)
  -		{
  -		    if (!m_pNode)
  -		    {
  -// if there is an unprocessed node that may be one left from last array deserialization
  -			m_pNode = m_pParser->next ();
  -		    }
  -
  -// wrapper node without type info  Ex: <phonenumbers>
  -		    if (!m_pNode)
  +			// DESERIALIZE_ENCODED_ARRAY_BLOCK (LONGLONG, CONV_STRTOUL)
  +			// > FJP
  +		    Array.m_Array = new LONGLONG[INITIAL_ARRAY_SIZE];
  +	
  +		    if (!Array.m_Array)
   		    {
  -			m_nStatus = AXIS_FAIL;
  -
  -			delete[](LONGLONG *) Array.m_Array;
  -
  -			Array.m_Array = 0;
  -			Array.m_Size = 0;
  -
   			return Array;
   		    }
  -
  -		    if (0 == strcmp (pName, m_pNode->m_pchNameOrValue))
  +	
  +		    Array.m_Size = INITIAL_ARRAY_SIZE;
  +	
  +		    while (true)
   		    {
  -			m_pNode = m_pParser->next (true);	// charactor node
  -
  -			if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
  +			for (; nIndex < Array.m_Size; nIndex++)
   			{
  -			    ((LONGLONG *) Array.m_Array)[nIndex] =
  -				SoapDeSerializer::strtoll (m_pNode->
  -							   m_pchNameOrValue);
  -			    m_pNode = m_pParser->next ();
  -
  -// skip end element node too
  -			    m_pNode = NULL;	// this is important in doc/lit style when deserializing arrays
  -			    continue;
  +			    if (!m_pNode)
  +			    {
  +				// if there is an unprocessed node that may be one left from last array deserialization
  +				m_pNode = m_pParser->next ();
  +			    }
  +	
  +				// wrapper node without type info  Ex: <phonenumbers>
  +			    if (!m_pNode)
  +			    {
  +				m_nStatus = AXIS_FAIL;
  +	
  +				delete[](LONGLONG *) Array.m_Array;
  +	
  +				Array.m_Array = 0;
  +				Array.m_Size = 0;
  +	
  +				return Array;
  +			    }
  +	
  +			    if (0 == strcmp (pName, m_pNode->m_pchNameOrValue))
  +			    {
  +					m_pNode = m_pParser->next (true);	// charactor node
  +		
  +					if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
  +					{
  +					    ((LONGLONG *) Array.m_Array)[nIndex] =
  +						SoapDeSerializer::strtoll (m_pNode->
  +									   m_pchNameOrValue);
  +					    m_pNode = m_pParser->next ();
  +		
  +					// skip end element node too
  +					    m_pNode = NULL;	// this is important in doc/lit style when deserializing arrays
  +					    continue;
  +					}
  +		
  +					// error : unexpected element type or end of the stream
  +			    }
  +			    else
  +			    {
  +					if (nIndex > 0)
  +					{
  +					    Array.m_Size = nIndex;
  +		
  +						// put the actual deserialized item size note we do not make m_pNode = NULL
  +						// because this node doesnot belong to this array
  +					    return Array;
  +					}
  +					// error : no elements deserialized
  +			    }
  +	
  +				// if we come here it is an error situation
  +			    m_nStatus = AXIS_FAIL;
  +			    m_pNode = NULL;
  +	
  +			    delete[](LONGLONG *) Array.m_Array;
  +	
  +			    Array.m_Array = 0;
  +			    Array.m_Size = 0;
  +	
  +			    return Array;
   			}
  -
  -// error : unexpected element type or end of the stream
  -		    }
  -		    else
  -		    {
  -			if (nIndex > 0)
  +	
  +			// if we come here that means the array allocated is not enough, so double it
  +			void *tmp = Array.m_Array;
  +	
  +			Array.m_Array = new LONGLONG[Array.m_Size * 2];
  +	
  +			if (!Array.m_Array)
   			{
  -			    Array.m_Size = nIndex;
  -
  -// put the actual deserialized item size note we do not make m_pNode = NULL
  -// because this node doesnot belong to this array
  +			    Array.m_Size = 0;
  +	
   			    return Array;
   			}
  -// error : no elements deserialized
  +	
  +			memcpy (Array.m_Array, tmp, Array.m_Size * sizeof (LONGLONG));
  +	
  +			delete[](LONGLONG *) tmp;
  +	
  +			Array.m_Size *= 2;
   		    }
  -
  -// if we come here it is an error situation
  -		    m_nStatus = AXIS_FAIL;
  -		    m_pNode = NULL;
  -
  -		    delete[](LONGLONG *) Array.m_Array;
  -
  -		    Array.m_Array = 0;
  -		    Array.m_Size = 0;
  -
  -		    return Array;
  -		}
  -
  -// if we come here that means the array allocated is not enough, so double it
  -		void *tmp = Array.m_Array;
  -
  -		Array.m_Array = new LONGLONG[Array.m_Size * 2];
  -
  -		if (!Array.m_Array)
  -		{
  -		    Array.m_Size = 0;
  -
  +	
   		    return Array;
  -		}
  -
  -		memcpy (Array.m_Array, tmp, Array.m_Size * sizeof (LONGLONG));
  -
  -		delete[](LONGLONG *) tmp;
  -
  -		Array.m_Size *= 2;
  -	    }
  -
  -	    return Array;
  -	    break;
  -
  -// < FJP
  -	case XSD_INTEGER:
  -	    DESERIALIZE_LITERAL_ARRAY_BLOCK (long, CONV_STRTOL)
  -		case
  -		XSD_UNSIGNEDLONG:DESERIALIZE_LITERAL_ARRAY_BLOCK (unsigned
  -								  long,
  -								  CONV_STRTOUL)
  -		case XSD_FLOAT:DESERIALIZE_LITERAL_ARRAY_BLOCK (float,
  -								CONV_STRTOD)
  -		case XSD_DOUBLE:case
  -		XSD_DECIMAL:DESERIALIZE_LITERAL_ARRAY_BLOCK (double,
  -							     CONV_STRTOD) case
  -		XSD_STRING:case XSD_HEXBINARY:case XSD_BASE64BINARY:case
  -		XSD_ANYURI:case XSD_QNAME:case
  -		XSD_NOTATION:DESERIALIZE_LITERAL_ARRAY_BLOCK (char *,
  -							      CONV_STRINGCOPY)
  -/*
  -// > FJP
  -			Array.m_Array = new char *[INITIAL_ARRAY_SIZE];
  -
  -			if( !Array.m_Array)
  -			{
  -				return Array;
  -			}
  -
  -			Array.m_Size = INITIAL_ARRAY_SIZE;
  -
  -			while (true)
  -			{
  -				for( ; nIndex < Array.m_Size; nIndex++)
  +		    break;
  +	
  +		// < FJP
  +		case XSD_INTEGER:
  +		    DESERIALIZE_LITERAL_ARRAY_BLOCK (long, CONV_STRTOL)
  +		case XSD_UNSIGNEDLONG:
  +			DESERIALIZE_LITERAL_ARRAY_BLOCK (unsigned long, CONV_STRTOUL)
  +		case XSD_FLOAT:
  +			DESERIALIZE_LITERAL_ARRAY_BLOCK (float, CONV_STRTOFLOAT)
  +		case XSD_DOUBLE:
  +			DESERIALIZE_LITERAL_ARRAY_BLOCK (double, CONV_STRTODOUBLE)
  +		case XSD_DECIMAL:
  +			DESERIALIZE_LITERAL_ARRAY_BLOCK (double, CONV_STRTODECIMAL)
  +		case XSD_ANYURI:
  +			DESERIALIZE_LITERAL_ARRAY_BLOCK (AxisChar *, CONV_STRTOANYURI)
  +		case XSD_STRING:
  +			DESERIALIZE_LITERAL_ARRAY_BLOCK (AxisChar *, CONV_STRTOSTRING)
  +		case XSD_QNAME:
  +			DESERIALIZE_LITERAL_ARRAY_BLOCK (AxisChar *, CONV_STRTOQNAME)
  +		case XSD_NOTATION:
  +			DESERIALIZE_LITERAL_ARRAY_BLOCK (AxisChar *, CONV_STRTONOTATION)
  +		case XSD_HEXBINARY:
  +			DESERIALIZE_LITERAL_ARRAY_BLOCK (xsd__hexBinary, CONV_STRTOHEXBINARY)
  +		case XSD_BASE64BINARY:
  +			DESERIALIZE_LITERAL_ARRAY_BLOCK (xsd__base64Binary, CONV_STRTOBASE64BINARY)
  +
  +	/*
  +	// > FJP
  +				Array.m_Array = new char *[INITIAL_ARRAY_SIZE];
  +	
  +				if( !Array.m_Array)
   				{
  -					if( !m_pNode)
  -					{
  -// if there is an unprocessed node that may be one left from last array deserialization
  -						m_pNode = m_pParser->next ();
  -					}
  -
  -// wrapper node without type info  Ex: <phonenumbers>
  -					if( !m_pNode)
  -					{
  -						m_nStatus = AXIS_FAIL;
  -
  -						delete[](LONGLONG *) Array.m_Array;
  -
  -						Array.m_Array = 0;
  -						Array.m_Size = 0;
  -
  -						return Array;
  -					}
  -
  -					if( 0 == strcmp( pName, m_pNode->m_pchNameOrValue))
  +					return Array;
  +				}
  +	
  +				Array.m_Size = INITIAL_ARRAY_SIZE;
  +	
  +				while (true)
  +				{
  +					for( ; nIndex < Array.m_Size; nIndex++)
   					{
  -						m_pNode = m_pParser->next (true);	// charactor node
  -
  -						if( m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
  +						if( !m_pNode)
   						{
  -							((char*) Array.m_Array)[nIndex] = SoapDeSerializer::strtoll( m_pNode->m_pchNameOrValue);
  +	// if there is an unprocessed node that may be one left from last array deserialization
   							m_pNode = m_pParser->next ();
  -
  -// skip end element node too
  -								m_pNode = NULL;	// this is important in doc/lit style when deserializing arrays
  -								continue;
  -							}
  -
  -// error : unexpected element type or end of the stream
   						}
  -						else
  +	
  +	// wrapper node without type info  Ex: <phonenumbers>
  +						if( !m_pNode)
   						{
  -							if( nIndex > 0)
  +							m_nStatus = AXIS_FAIL;
  +	
  +							delete[](LONGLONG *) Array.m_Array;
  +	
  +							Array.m_Array = 0;
  +							Array.m_Size = 0;
  +	
  +							return Array;
  +						}
  +	
  +						if( 0 == strcmp( pName, m_pNode->m_pchNameOrValue))
  +						{
  +							m_pNode = m_pParser->next (true);	// charactor node
  +	
  +							if( m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   							{
  -								Array.m_Size = nIndex;
  -
  -// put the actual deserialized item size note we do not make m_pNode = NULL
  -// because this node doesnot belong to this array
  -								return Array;
  +								((char*) Array.m_Array)[nIndex] = SoapDeSerializer::strtoll( m_pNode->m_pchNameOrValue);
  +								m_pNode = m_pParser->next ();
  +	
  +	// skip end element node too
  +									m_pNode = NULL;	// this is important in doc/lit style when deserializing arrays
  +									continue;
  +								}
  +	
  +	// error : unexpected element type or end of the stream
   							}
  -// error : no elements deserialized
  +							else
  +							{
  +								if( nIndex > 0)
  +								{
  +									Array.m_Size = nIndex;
  +	
  +	// put the actual deserialized item size note we do not make m_pNode = NULL
  +	// because this node doesnot belong to this array
  +									return Array;
  +								}
  +	// error : no elements deserialized
  +							}
  +	
  +	// if we come here it is an error situation
  +							m_nStatus = AXIS_FAIL;
  +							m_pNode = NULL;
  +	
  +							delete [] (LONGLONG *) Array.m_Array;
  +	
  +							Array.m_Array = 0;
  +							Array.m_Size = 0;
  +	
  +							return Array;
   						}
  -
  -// if we come here it is an error situation
  -						m_nStatus = AXIS_FAIL;
  -						m_pNode = NULL;
  -
  -						delete [] (LONGLONG *) Array.m_Array;
  -
  -						Array.m_Array = 0;
  -						Array.m_Size = 0;
  -
  -						return Array;
  -					}
  -
  -// if we come here that means the array allocated is not enough, so double it
  -					void *	tmp = Array.m_Array;
  -
  -					Array.m_Array = new int[Array.m_Size * 2];
  -
  -					if( !Array.m_Array)
  -					{
  -						Array.m_Size = 0;
  -
  -						return Array;
  +	
  +	// if we come here that means the array allocated is not enough, so double it
  +						void *	tmp = Array.m_Array;
  +	
  +						Array.m_Array = new int[Array.m_Size * 2];
  +	
  +						if( !Array.m_Array)
  +						{
  +							Array.m_Size = 0;
  +	
  +							return Array;
  +						}
  +	
  +						memcpy( Array.m_Array, tmp, Array.m_Size * sizeof( LONGLONG));
  +	
  +						delete[](LONGLONG *) tmp;
  +	
  +						Array.m_Size *= 2;
   					}
  -
  -					memcpy( Array.m_Array, tmp, Array.m_Size * sizeof( LONGLONG));
  -
  -					delete[](LONGLONG *) tmp;
  -
  -					Array.m_Size *= 2;
  -				}
  -
  -			return Array;
  -			break;
  -
  -// < FJP
  -*/
  -	    case XSD_DATETIME:case XSD_DATE:case
  -		XSD_TIME:DESERIALIZE_LITERAL_ARRAY_BLOCK (struct tm,
  -							  CONV_STRTODATETIME)
  -		case XSD_DURATION:DESERIALIZE_LITERAL_ARRAY_BLOCK (long,
  -								   CONV_STRTODURATION)
  +	
  +				return Array;
  +				break;
  +	
  +	// < FJP
  +	*/
  +	    case XSD_DATETIME:
  +	    	DESERIALIZE_LITERAL_ARRAY_BLOCK (struct tm, CONV_STRTODATETIME)
  +	    case XSD_DATE:
  +	    	DESERIALIZE_LITERAL_ARRAY_BLOCK (struct tm, CONV_STRTODATE)
  +	    case XSD_TIME:
  +	    	DESERIALIZE_LITERAL_ARRAY_BLOCK (struct tm, CONV_STRTOTIME)
  +		case XSD_DURATION:
  +			DESERIALIZE_LITERAL_ARRAY_BLOCK (long, CONV_STRTODURATION)
   		case XSD_BOOLEAN:
  -//          DESERIALIZE_LITERAL_ARRAY_BLOCK(long, CONV_STRTOL)
  -// Originally, The above macro was all that was required, but because boolean
  -// can have any of the following values '0', '1', 'false' or 'true', special,
  -// non-standard processing is required.  Thus the standard macro has had to be
  -// expanded and extended to cover the additional tests, unique to this type.
  -	      Array.m_Array = new long[INITIAL_ARRAY_SIZE];
  -
  -	    if (!Array.m_Array)
  -	    {
  -		return Array;
  -	    }
  -
  -	    Array.m_Size = INITIAL_ARRAY_SIZE;
  -
  -	    while (true)
  -	    {
  -		for (; nIndex < Array.m_Size; nIndex++)
  -		{
  -		    if (!m_pNode)
  +	//          DESERIALIZE_LITERAL_ARRAY_BLOCK(long, CONV_STRTOL)
  +	// Originally, The above macro was all that was required, but because boolean
  +	// can have any of the following values '0', '1', 'false' or 'true', special,
  +	// non-standard processing is required.  Thus the standard macro has had to be
  +	// expanded and extended to cover the additional tests, unique to this type.
  +		      Array.m_Array = new long[INITIAL_ARRAY_SIZE];
  +	
  +		    if (!Array.m_Array)
   		    {
  -			/* if there is an unprocessed node that may be one left */
  -			/* from last array deserialization */
  -			m_pNode = m_pParser->next ();
  -		    }
  -
  -		    /* wrapper node without type info Ex: <phonenumbers> */
  -		    if (!m_pNode)
  -		    {
  -			m_nStatus = AXIS_FAIL;
  -			delete[](long *) Array.m_Array;
  -			Array.m_Array = 0;
  -			Array.m_Size = 0;
   			return Array;
   		    }
  -
  -		    if (0 == strcmp (pName, m_pNode->m_pchNameOrValue))
  +	
  +		    Array.m_Size = INITIAL_ARRAY_SIZE;
  +	
  +		    while (true)
   		    {
  -			m_pNode = m_pParser->next (true);	/* charactor node */
  -
  -			if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
  +			for (; nIndex < Array.m_Size; nIndex++)
   			{
  -			    if (!strcmp ("false", m_pNode->m_pchNameOrValue)
  -				|| !strcmp ("FALSE",
  -					    m_pNode->m_pchNameOrValue))
  +			    if (!m_pNode)
  +			    {
  +				/* if there is an unprocessed node that may be one left */
  +				/* from last array deserialization */
  +				m_pNode = m_pParser->next ();
  +			    }
  +	
  +			    /* wrapper node without type info Ex: <phonenumbers> */
  +			    if (!m_pNode)
   			    {
  -				((long *) Array.m_Array)[nIndex] = 0;
  +				m_nStatus = AXIS_FAIL;
  +				delete[](long *) Array.m_Array;
  +				Array.m_Array = 0;
  +				Array.m_Size = 0;
  +				return Array;
   			    }
  -			    else if (!strcmp
  -				     ("true", m_pNode->m_pchNameOrValue)
  -				     || !strcmp ("TRUE",
  -						 m_pNode->m_pchNameOrValue))
  +	
  +			    if (0 == strcmp (pName, m_pNode->m_pchNameOrValue))
   			    {
  -				((long *) Array.m_Array)[nIndex] = 1;
  +				m_pNode = m_pParser->next (true);	/* charactor node */
  +	
  +				if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
  +				{
  +				    Boolean booleanDeserializer;
  +				    ((long *) Array.m_Array)[nIndex] =
  +				   		booleanDeserializer.deserializeBoolean(m_pNode->m_pchNameOrValue);
  +	
  +				    m_pNode = m_pParser->next ();
  +				    /* skip end element node too */
  +				    m_pNode = NULL;
  +				    /* this is important in doc/lit style when */
  +				    /* deserializing arrays */
  +				    continue;
  +				}
  +				/* error : unexpected element type or */
  +				/* end of the stream */
   			    }
   			    else
   			    {
  -				((long *) Array.m_Array)[nIndex] =
  -				    (long) (strtol
  -					    (m_pNode->m_pchNameOrValue,
  -					     &m_pEndptr, 10) & 1);
  +				if (nIndex > 0)
  +				{
  +				    Array.m_Size = nIndex;
  +				    /* put the actual deserialized item size */
  +				    /* note we do not make m_pNode = NULL because */
  +				    /* this node doesnot belong to this array */
  +				    return Array;
  +				}
  +				/* error : no elements deserialized */
   			    }
  -
  -			    m_pNode = m_pParser->next ();
  -			    /* skip end element node too */
  +			    /* if we come here it is an error situation */
  +			    m_nStatus = AXIS_FAIL;
   			    m_pNode = NULL;
  -			    /* this is important in doc/lit style when */
  -			    /* deserializing arrays */
  -			    continue;
  +			    delete[](long *) Array.m_Array;
  +			    Array.m_Array = 0;
  +			    Array.m_Size = 0;
  +			    return Array;
   			}
  -			/* error : unexpected element type or */
  -			/* end of the stream */
  -		    }
  -		    else
  -		    {
  -			if (nIndex > 0)
  +			/* if we come here that means the array allocated is */
  +			/* not enough. So double it */
  +			void *tmp = Array.m_Array;
  +			Array.m_Array = new long[Array.m_Size * 2];
  +	
  +			if (!Array.m_Array)
   			{
  -			    Array.m_Size = nIndex;
  -			    /* put the actual deserialized item size */
  -			    /* note we do not make m_pNode = NULL because */
  -			    /* this node doesnot belong to this array */
  +			    Array.m_Size = 0;
   			    return Array;
   			}
  -			/* error : no elements deserialized */
  +	
  +			memcpy (Array.m_Array, tmp, Array.m_Size * sizeof (long));
  +			delete[](long *) tmp;
  +			Array.m_Size *= 2;
  +			/*Array.m_RealSize = Array.m_Size; */
   		    }
  -		    /* if we come here it is an error situation */
  -		    m_nStatus = AXIS_FAIL;
  -		    m_pNode = NULL;
  -		    delete[](long *) Array.m_Array;
  -		    Array.m_Array = 0;
  -		    Array.m_Size = 0;
  -		    return Array;
  -		}
  -		/* if we come here that means the array allocated is */
  -		/* not enough. So double it */
  -		void *tmp = Array.m_Array;
  -		Array.m_Array = new long[Array.m_Size * 2];
  -
  -		if (!Array.m_Array)
  -		{
  -		    Array.m_Size = 0;
  -		    return Array;
  +		    break;
  +	
  +		default:;
   		}
  -
  -		memcpy (Array.m_Array, tmp, Array.m_Size * sizeof (long));
  -		delete[](long *) tmp;
  -		Array.m_Size *= 2;
  -		/*Array.m_RealSize = Array.m_Size; */
   	    }
  -	    break;
  -
  -	default:;
  -	}
  -    }
       m_nStatus = AXIS_FAIL;
       m_pNode = NULL;
   
  @@ -2003,11 +2069,8 @@
   	{
   	    if (0 == strcmp (m_pCurrNode->m_pchAttributes[i], pName))
   	    {
  -		ret =
  -		    (0 ==
  -		     strcmp (m_pCurrNode->m_pchAttributes[i + 2],
  -			     "true")) ? true_ : false_;
  -		return ret;
  +	    	Boolean booleanDeserializer;
  +			return booleanDeserializer.deserializeBoolean(m_pCurrNode->m_pchAttributes[i + 2]);
   	    }
   	}
       }
  @@ -2070,34 +2133,34 @@
   SoapDeSerializer::getAttributeAsFloat (const AxisChar * pName, const
   				       AxisChar * pNamespace)
   {
  -DESERIALIZE_GET_ATTRIBUTE_AS (float, CONV_STRTOD, INIT_VALUE_NUMBER)}
  +DESERIALIZE_GET_ATTRIBUTE_AS (float, CONV_STRTOFLOAT, INIT_VALUE_NUMBER)}
   double
   SoapDeSerializer::getAttributeAsDouble (const AxisChar * pName, const
   					AxisChar * pNamespace)
   {
  -DESERIALIZE_GET_ATTRIBUTE_AS (double, CONV_STRTOD, INIT_VALUE_NUMBER)}
  +DESERIALIZE_GET_ATTRIBUTE_AS (double, CONV_STRTODOUBLE, INIT_VALUE_NUMBER)}
   double
   SoapDeSerializer::getAttributeAsDecimal (const AxisChar * pName, const
   					 AxisChar * pNamespace)
   {
  -DESERIALIZE_GET_ATTRIBUTE_AS (double, CONV_STRTOD, INIT_VALUE_NUMBER)}
  +DESERIALIZE_GET_ATTRIBUTE_AS (double, CONV_STRTODECIMAL, INIT_VALUE_NUMBER)}
   AxisChar *
   SoapDeSerializer::getAttributeAsString (const AxisChar * pName, const
   					AxisChar * pNamespace)
   {
  -DESERIALIZE_GET_ATTRIBUTE_AS (AxisChar *, CONV_STRINGCOPY,
  +DESERIALIZE_GET_ATTRIBUTE_AS (AxisChar *, CONV_STRTOSTRING,
   				  INIT_VALUE_NUMBER)}
   AxisChar *
   SoapDeSerializer::getAttributeAsAnyURI (const AxisChar * pName, const
   					AxisChar * pNamespace)
   {
  -DESERIALIZE_GET_ATTRIBUTE_AS (AxisChar *, CONV_STRINGCOPY,
  +DESERIALIZE_GET_ATTRIBUTE_AS (AxisChar *, CONV_STRTOANYURI,
   				  INIT_VALUE_NUMBER)}
   AxisChar *
   SoapDeSerializer::getAttributeAsQName (const AxisChar * pName, const
   				       AxisChar * pNamespace)
   {
  -DESERIALIZE_GET_ATTRIBUTE_AS (AxisChar *, CONV_STRINGCOPY,
  +DESERIALIZE_GET_ATTRIBUTE_AS (AxisChar *, CONV_STRTOQNAME,
   				  INIT_VALUE_NUMBER)}
   xsd__hexBinary
       SoapDeSerializer::getAttributeAsHexBinary (const AxisChar * pName,
  @@ -2116,28 +2179,24 @@
   SoapDeSerializer::getAttributeAsDateTime (const AxisChar * pName,
   					  const AxisChar * pNamespace)
   {
  -    XSDTYPE nType = XSD_DATETIME;
   DESERIALIZE_GET_ATTRIBUTE_AS (struct tm, CONV_STRTODATETIME,
   				  INIT_VALUE_DATETIME)}
   struct tm
   SoapDeSerializer::getAttributeAsDate (const AxisChar * pName, const
   				      AxisChar * pNamespace)
   {
  -    XSDTYPE nType = XSD_DATE;
  -DESERIALIZE_GET_ATTRIBUTE_AS (struct tm, CONV_STRTODATETIME,
  +DESERIALIZE_GET_ATTRIBUTE_AS (struct tm, CONV_STRTODATE,
   				  INIT_VALUE_DATETIME)}
   struct tm
   SoapDeSerializer::getAttributeAsTime (const AxisChar * pName, const
   				      AxisChar * pNamespace)
   {
  -    XSDTYPE nType = XSD_DATE;
  -DESERIALIZE_GET_ATTRIBUTE_AS (struct tm, CONV_STRTODATETIME,
  +DESERIALIZE_GET_ATTRIBUTE_AS (struct tm, CONV_STRTOTIME,
   				  INIT_VALUE_DATETIME)}
   long
   SoapDeSerializer::getAttributeAsDuration (const AxisChar * pName, const
   					  AxisChar * pNamespace)
   {
  -    XSDTYPE nType = XSD_DURATION;
   DESERIALIZE_GET_ATTRIBUTE_AS (long, CONV_STRTODURATION, INIT_VALUE_NUMBER)}
   
   /*
  @@ -2161,10 +2220,10 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret = (0 == strcmp (m_pNode->m_pchNameOrValue, "true"))
  -		    ? true_ : false_;
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		return ret;
  +	    	Boolean booleanDeserializer;
  +	    	ret = booleanDeserializer.deserializeBoolean(m_pNode->m_pchNameOrValue);
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			return ret;
   	    }
   	}
   	else
  @@ -2187,16 +2246,14 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		/* Some web services server returns 1 */
  -		ret = (0 == strcmp (m_pNode->m_pchNameOrValue, "false") ||
  -		       0 == strcmp (m_pNode->m_pchNameOrValue, "0"))
  -		    ? false_ : true_;
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		m_pNode = NULL;
  -		/* this is important in doc/lit style when deserializing 
  -		 * arrays
  -		 */
  -		return ret;
  +	    	Boolean booleanDeserializer;
  +	    	ret = booleanDeserializer.deserializeBoolean(m_pNode->m_pchNameOrValue);
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			m_pNode = NULL;
  +			/* this is important in doc/lit style when deserializing 
  +			 * arrays
  +			 */
  +			return ret;
   	    }
   	    else
   	    {
  @@ -2893,9 +2950,10 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret = strtod (m_pNode->m_pchNameOrValue, &m_pEndptr);
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		return ret;
  +	    	Float floatDeserializer;
  +			ret = *(floatDeserializer.deserializeFloat(m_pNode->m_pchNameOrValue));
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			return ret;
   	    }
   	}
   	else
  @@ -2918,13 +2976,14 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret = strtod (m_pNode->m_pchNameOrValue, &m_pEndptr);
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		m_pNode = NULL;
  -		/* this is important in doc/lit style when deserializing 
  -		 * arrays 
  -		 */
  -		return ret;
  +	    	Float floatDeserializer;
  +			ret = *(floatDeserializer.deserializeFloat(m_pNode->m_pchNameOrValue));
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			m_pNode = NULL;
  +			/* this is important in doc/lit style when deserializing 
  +			 * arrays 
  +			 */
  +			return ret;
   	    }
   	    else
   	    {
  @@ -2965,9 +3024,10 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret = strtod (m_pNode->m_pchNameOrValue, &m_pEndptr);
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		return ret;
  +	    	Double doubleDeserializer;
  +			ret = *( doubleDeserializer.deserializeDouble(m_pNode->m_pchNameOrValue) );
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			return ret;
   	    }
   	}
   	else
  @@ -2990,13 +3050,14 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret = strtod (m_pNode->m_pchNameOrValue, &m_pEndptr);
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		m_pNode = NULL;
  -		/* this is important in doc/lit style when deserializing 
  -		 * arrays 
  -		 */
  -		return ret;
  +	    	Double doubleDeserializer;
  +			ret = *( doubleDeserializer.deserializeDouble(m_pNode->m_pchNameOrValue) );
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			m_pNode = NULL;
  +			/* this is important in doc/lit style when deserializing 
  +			 * arrays 
  +			 */
  +			return ret;
   	    }
   	    else
   	    {
  @@ -3037,9 +3098,11 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret = strtod (m_pNode->m_pchNameOrValue, &m_pEndptr);
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		return ret;
  +	    	Decimal decimalDeserializer;
  +	    	ret = *( decimalDeserializer.deserializeDecimal(m_pNode->m_pchNameOrValue));
  +
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			return ret;
   	    }
   	}
   	else
  @@ -3062,13 +3125,14 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret = strtod (m_pNode->m_pchNameOrValue, &m_pEndptr);
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		m_pNode = NULL;
  -		/* this is important in doc/lit style when deserializing 
  -		 * arrays 
  -		 */
  -		return ret;
  +			Decimal decimalDeserializer;
  +	    	ret = *( decimalDeserializer.deserializeDecimal(m_pNode->m_pchNameOrValue));
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			m_pNode = NULL;
  +			/* this is important in doc/lit style when deserializing 
  +			 * arrays 
  +			 */
  +			return ret;
   	    }
   	    else
   	    {
  @@ -3111,8 +3175,9 @@
   	    {
   		if ((CHARACTER_ELEMENT == m_pNode->m_type))
   		{
  -		    ret = new char[strlen (m_pNode->m_pchNameOrValue) + 1];
  -		    strcpy (ret, m_pNode->m_pchNameOrValue);
  +			String stringDeserializer;
  +			ret = stringDeserializer.deserializeString(m_pNode->m_pchNameOrValue);
  +
   		    /* this is because the string may not be available later */
   		    m_pNode = m_pParser->next ();	/* skip end element node too */
   		    return ret;
  @@ -3145,9 +3210,8 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret = new char[strlen (m_pNode->m_pchNameOrValue) + 1];
  -		strcpy (ret, m_pNode->m_pchNameOrValue);
  -		/* this is because the string may not be available later */
  +	    	String stringDeserializer;
  +	    	ret = stringDeserializer.deserializeString(m_pNode->m_pchNameOrValue);
   
   		// FJP Added this code for fault finding.  If detail is
   		//     followed by CR/LF or CR/LF then CR/LF then assume that
  @@ -3231,11 +3295,10 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret = new char[strlen (m_pNode->m_pchNameOrValue) + 1];
  -		strcpy (ret, m_pNode->m_pchNameOrValue);
  -		/* this is because the string may not be available later */
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		return ret;
  +	    	AnyURI anyURIDeserializer;
  +	    	ret = anyURIDeserializer.deserializeAnyURI(m_pNode->m_pchNameOrValue);
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			return ret;
   	    }
   	}
   	else
  @@ -3258,15 +3321,15 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret = new char[strlen (m_pNode->m_pchNameOrValue) + 1];
  -		strcpy (ret, m_pNode->m_pchNameOrValue);
  -		/* this is because the string may not be available later */
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		m_pNode = NULL;
  -		/* this is important in doc/lit style when deserializing 
  -		 * arrays 
  -		 */
  -		return ret;
  +			AnyURI anyURIDeserializer;
  +	    	ret = anyURIDeserializer.deserializeAnyURI(m_pNode->m_pchNameOrValue);
  +			/* this is because the string may not be available later */
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			m_pNode = NULL;
  +			/* this is important in doc/lit style when deserializing 
  +			 * arrays 
  +			 */
  +			return ret;
   	    }
   	}
   	else
  @@ -3298,11 +3361,11 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret = new char[strlen (m_pNode->m_pchNameOrValue) + 1];
  -		strcpy (ret, m_pNode->m_pchNameOrValue);
  -		/* this is because the string may not be available later */
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		return ret;
  +	    	XSD_QName qnameDeserializer;
  +	    	ret = qnameDeserializer.deserializeQName(m_pNode->m_pchNameOrValue);
  +			/* this is because the string may not be available later */
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			return ret;
   	    }
   	}
   	else
  @@ -3325,15 +3388,15 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret = new char[strlen (m_pNode->m_pchNameOrValue) + 1];
  -		strcpy (ret, m_pNode->m_pchNameOrValue);
  -		/* this is because the string may not be available later */
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		m_pNode = NULL;
  -		/* this is important in doc/lit style when deserializing 
  -		 * arrays 
  -		 */
  -		return ret;
  +	    	XSD_QName qnameDeserializer;
  +	    	ret = qnameDeserializer.deserializeQName(m_pNode->m_pchNameOrValue);
  +
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			m_pNode = NULL;
  +			/* this is important in doc/lit style when deserializing 
  +			 * arrays 
  +			 */
  +			return ret;
   	    }
   	}
   	else
  @@ -3365,10 +3428,11 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret = decodeFromHexBinary (m_pNode->m_pchNameOrValue);
  -		/* this is because the string may not be available later */
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		return ret;
  +	    	HexBinary hexBinaryDeserializer;
  +	    	ret = *( hexBinaryDeserializer.deserializeHexBinary(m_pNode->m_pchNameOrValue) );
  +
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			return ret;
   	    }
   	}
   	else
  @@ -3391,14 +3455,15 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret = decodeFromHexBinary (m_pNode->m_pchNameOrValue);
  -		/* this is because the string may not be available later */
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		m_pNode = NULL;
  -		/* this is important in doc/lit style when deserializing 
  -		 * arrays 
  -		 */
  -		return ret;
  +			HexBinary hexBinaryDeserializer;
  +	    	ret = *( hexBinaryDeserializer.deserializeHexBinary(m_pNode->m_pchNameOrValue) );
  +
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			m_pNode = NULL;
  +			/* this is important in doc/lit style when deserializing 
  +			 * arrays 
  +			 */
  +			return ret;
   	    }
   	}
   	else
  @@ -3459,10 +3524,10 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret = decodeFromBase64Binary (m_pNode->m_pchNameOrValue);
  -		/* this is because the string may not be available later */
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		return ret;
  +	    	Base64Binary base64BinaryDeserializer;
  +	    	ret = *(base64BinaryDeserializer.deserializeBase64Binary(m_pNode->m_pchNameOrValue));
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			return ret;
   	    }
   	}
   	else
  @@ -3485,14 +3550,15 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret = decodeFromBase64Binary (m_pNode->m_pchNameOrValue);
  -		/* this is because the string may not be available later */
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		m_pNode = NULL;
  -		/* this is important in doc/lit style when deserializing 
  -		 * arrays 
  -		 */
  -		return ret;
  +			Base64Binary base64BinaryDeserializer;
  +	    	ret = *(base64BinaryDeserializer.deserializeBase64Binary(m_pNode->m_pchNameOrValue));
  +
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			m_pNode = NULL;
  +			/* this is important in doc/lit style when deserializing 
  +			 * arrays 
  +			 */
  +			return ret;
   	    }
   	}
   	else
  @@ -3524,11 +3590,11 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret =
  -		    AxisTime::deserialize (m_pNode->m_pchNameOrValue,
  -					   XSD_DATETIME);
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		return ret;
  +	    	DateTime dateTimeDeSerializer;
  +			ret = *(dateTimeDeSerializer.deserializeDateTime (m_pNode->m_pchNameOrValue));
  +
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			return ret;
   	    }
   	}
   	else
  @@ -3564,14 +3630,15 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret = AxisTime::deserialize (m_pNode->m_pchNameOrValue,
  -					     XSD_DATETIME);
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		m_pNode = NULL;
  -		/* this is important in doc/lit style when deserializing 
  -		 * arrays 
  -		 */
  -		return ret;
  +	    	DateTime dateTimeDeserializer;
  +	    	ret = *(dateTimeDeserializer.deserializeDateTime(m_pNode->m_pchNameOrValue));
  +    
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			m_pNode = NULL;
  +			/* this is important in doc/lit style when deserializing 
  +			 * arrays 
  +			 */
  +			return ret;
   	    }
   	}
   	else
  @@ -3603,10 +3670,10 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret = AxisTime::deserialize (m_pNode->m_pchNameOrValue,
  -					     XSD_DATE);
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		return ret;
  +	    	Date dateDeserializer;
  +	    	ret = *(dateDeserializer.deserializeDate (m_pNode->m_pchNameOrValue));
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			return ret;
   	    }
   	}
   	else
  @@ -3642,14 +3709,14 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret = AxisTime::deserialize (m_pNode->m_pchNameOrValue,
  -					     XSD_DATE);
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		m_pNode = NULL;
  -		/* this is important in doc/lit style when deserializing
  -		 * arrays 
  -		 */
  -		return ret;
  +	    	Date dateDeserializer;
  +	    	ret = *(dateDeserializer.deserializeDate (m_pNode->m_pchNameOrValue));
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			m_pNode = NULL;
  +			/* this is important in doc/lit style when deserializing
  +			 * arrays 
  +			 */
  +			return ret;
   	    }
   	}
   	else
  @@ -3681,10 +3748,11 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret = AxisTime::deserialize (m_pNode->m_pchNameOrValue,
  -					     XSD_TIME);
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		return ret;
  +	    	Time timeDeserializer;
  +	    	ret = *( timeDeserializer.deserializeTime(m_pNode->m_pchNameOrValue) );
  +	    	
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			return ret;
   	    }
   	}
   	else
  @@ -3720,14 +3788,15 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret = AxisTime::deserialize (m_pNode->m_pchNameOrValue,
  -					     XSD_TIME);
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		m_pNode = NULL;
  -		/* this is important in doc/lit style when deserializing 
  -		 * arrays 
  -		 */
  -		return ret;
  +	    	Time timeDeserializer;
  +			ret = *( timeDeserializer.deserializeTime(m_pNode->m_pchNameOrValue) );
  +	
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			m_pNode = NULL;
  +			/* this is important in doc/lit style when deserializing 
  +			 * arrays 
  +			 */
  +			return ret;
   	    }
   	}
   	else
  @@ -3759,11 +3828,11 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret =
  -		    AxisTime::deserializeDuration (m_pNode->m_pchNameOrValue,
  -						   XSD_DURATION);
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		return ret;
  +			Duration durationDeserializer;
  +	    	ret = *(durationDeserializer.deserializeDuration(m_pNode->m_pchNameOrValue));
  +
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			return ret;
   	    }
   	}
   	else
  @@ -3786,15 +3855,15 @@
   	    m_pNode = m_pParser->next (true);	/* charactor node */
   	    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   	    {
  -		ret =
  -		    AxisTime::deserializeDuration (m_pNode->m_pchNameOrValue,
  -						   XSD_DURATION);
  -		m_pNode = m_pParser->next ();	/* skip end element node too */
  -		m_pNode = NULL;
  -		/* this is important in doc/lit style when deserializing 
  -		 * arrays 
  -		 */
  -		return ret;
  +	    	Duration durationDeserializer;
  +	    	ret = *(durationDeserializer.deserializeDuration(m_pNode->m_pchNameOrValue));
  +
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			m_pNode = NULL;
  +			/* this is important in doc/lit style when deserializing 
  +			 * arrays 
  +			 */
  +			return ret;
   	    }
   	}
   	else
  @@ -4266,9 +4335,10 @@
   		(int) strtod (m_pNode->m_pchNameOrValue, &m_pEndptr);
   	    break;
   	case XSD_BOOLEAN:
  -	    *((int *) (pValue)) =
  -		(strcmp (m_pNode->m_pchNameOrValue, "true") ==
  -		 0) ? false_ : true_;
  +		{
  +			Boolean booleanDeserializer;
  +			pValue = booleanDeserializer.deserialize(m_pNode->m_pchNameOrValue);
  +		}
   	    break;
   	case XSD_UNSIGNEDINT:
   	    *((unsigned int *) (pValue)) =
  @@ -4299,44 +4369,86 @@
   		strtol (m_pNode->m_pchNameOrValue, &m_pEndptr, 10);
   	    break;
   	case XSD_DURATION:
  -	    *((long *) (pValue)) =
  -		AxisTime::deserializeDuration (m_pNode->m_pchNameOrValue,
  -					       XSD_DURATION);
  +		{
  +			Duration durationDeserializer;
  +			pValue = durationDeserializer.deserialize(m_pNode->m_pchNameOrValue);
  +		}
   	    break;
   	case XSD_UNSIGNEDLONG:
   	    *((unsigned long *) (pValue)) =
   		strtoul (m_pNode->m_pchNameOrValue, &m_pEndptr, 10);
   	    break;
   	case XSD_FLOAT:
  -	    *((float *) (pValue)) =
  -		strtod (m_pNode->m_pchNameOrValue, &m_pEndptr);
  +		{
  +			Float floatDeserializer;
  +			pValue = floatDeserializer.deserialize(m_pNode->m_pchNameOrValue);
  +		}
   	    break;
   	case XSD_DOUBLE:
  +		{
  +			Double doubleDeserializer;
  +			pValue = doubleDeserializer.deserialize(m_pNode->m_pchNameOrValue);
  +		}
  +		break;
   	case XSD_DECIMAL:
  -	    *((double *) (pValue)) =
  -		strtod (m_pNode->m_pchNameOrValue, &m_pEndptr);
  +		{
  +			Decimal decimalDeserializer;
  +	    	pValue = decimalDeserializer.deserializeDecimal(m_pNode->m_pchNameOrValue);
  +		}
   	    break;
   	case XSD_STRING:
  +		{
  +			String stringDeserializer;
  +			pValue = stringDeserializer.deserialize(m_pNode->m_pchNameOrValue);
  +		}
  +		break;
   	case XSD_ANYURI:
  +		{
  +			AnyURI anyURIDeserializer;
  +			pValue = anyURIDeserializer.deserialize(m_pNode->m_pchNameOrValue);
  +		}
  +		break;
   	case XSD_QNAME:
  +		{
  +			XSD_QName qnameDeserializer;
  +			pValue = qnameDeserializer.deserialize(m_pNode->m_pchNameOrValue);
  +		}
  +		break;
   	case XSD_NOTATION:
  -	    *((char **) (pValue)) =
  -		new char[strlen (m_pNode->m_pchNameOrValue) + 1];
  -	    strcpy (*((char **) (pValue)), m_pNode->m_pchNameOrValue);
  -	    break;
  +		{
  +			NOTATION notationDeserializer;
  +			pValue = notationDeserializer.deserialize(m_pNode->m_pchNameOrValue);
  +		}
  +		break;
   	case XSD_HEXBINARY:
  -	    *(xsd__hexBinary *) (pValue) =
  -		decodeFromHexBinary (m_pNode->m_pchNameOrValue);
  +		{
  +			HexBinary hexBinaryDeserializer;
  +			pValue = hexBinaryDeserializer.deserialize(m_pNode->m_pchNameOrValue);
  +		}
   	    break;
   	case XSD_BASE64BINARY:
  -	    *(xsd__base64Binary *) (pValue) =
  -		decodeFromBase64Binary (m_pNode->m_pchNameOrValue);
  +		{
  +			Base64Binary base64BinaryDeserializer;
  +			pValue = base64BinaryDeserializer.deserialize(m_pNode->m_pchNameOrValue);
  +		}
   	    break;
   	case XSD_DATETIME:
  +		{
  +			DateTime dateTimeDeserializer;
  +			pValue = dateTimeDeserializer.deserialize(m_pNode->m_pchNameOrValue);
  +		}
  +		break;
   	case XSD_DATE:
  +		{
  +			Date dateDeserializer;
  +			pValue = dateDeserializer.deserialize(m_pNode->m_pchNameOrValue);
  +		}
  +		break;
   	case XSD_TIME:
  -	    *((struct tm *) (pValue)) =
  -		AxisTime::deserialize (m_pNode->m_pchNameOrValue, type);
  +		{
  +			Time timeDeserializer;
  +			pValue = timeDeserializer.deserialize(m_pNode->m_pchNameOrValue);
  +		}
   	    break;
   	default:;
   	}
  
  
  
  1.24      +14 -0     ws-axis/c/src/soap/SoapDeSerializer.h
  
  Index: SoapDeSerializer.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapDeSerializer.h,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- SoapDeSerializer.h	30 Nov 2004 03:08:13 -0000	1.23
  +++ SoapDeSerializer.h	12 Jan 2005 16:43:47 -0000	1.24
  @@ -20,6 +20,20 @@
   #include <axis/IHandlerSoapDeSerializer.hpp>
   #include "HeaderBlock.h"
   #include "../xml/XMLParser.h"
  +#include "xsd/Boolean.hpp"
  +#include "xsd/AnyURI.hpp"
  +#include "xsd/String.hpp"
  +#include "xsd/XSD_QName.hpp"
  +#include "xsd/NOTATION.hpp"
  +#include "xsd/Base64Binary.hpp"
  +#include "xsd/HexBinary.hpp"
  +#include "xsd/Duration.hpp"
  +#include "xsd/DateTime.hpp"
  +#include "xsd/Date.hpp"
  +#include "xsd/Time.hpp"
  +#include "xsd/Float.hpp"
  +#include "xsd/Double.hpp"
  +#include "xsd/Decimal.hpp"
   
   AXIS_CPP_NAMESPACE_START