axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From susan...@apache.org
Subject cvs commit: ws-axis/c/vc/server/samples/interoptests/groupB groupB.dsp
Date Fri, 24 Oct 2003 05:37:46 GMT
susantha    2003/10/23 22:37:46

  Modified:    c/include/axis/common AxisTime.h BasicTypeSerializer.h
                        Param.h
               c/include/axis/soap SoapSerializer.h
               c/src/client/samples/interoptests/base InteropBaseClient.cpp
                        InteropTestPortType.cpp
               c/src/common AxisTime.cpp BasicTypeSerializer.cpp Param.cpp
               c/src/soap SoapSerializer.cpp
               c/vc/server/samples/interoptests/base base.dsp
               c/vc/server/samples/interoptests/groupB groupB.dsp
  Log:
  Fixed date time serialization/deserialization bug. Also removed the ineffiency in the Param
class
  
  Revision  Changes    Path
  1.3       +6 -4      ws-axis/c/include/axis/common/AxisTime.h
  
  Index: AxisTime.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/common/AxisTime.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AxisTime.h	23 Oct 2003 04:31:49 -0000	1.2
  +++ AxisTime.h	24 Oct 2003 05:37:46 -0000	1.3
  @@ -68,7 +68,7 @@
   
   using namespace std;
   
  -typedef struct uDuration
  +typedef struct
   {
       int years;
       int months;
  @@ -76,7 +76,7 @@
       int hours;
       int mins;
       double secs;
  -};
  +} uDuration;
   
   class AxisTime
   {
  @@ -89,13 +89,15 @@
           void setValue(XSDTYPE type, uParamValue Value);
           void setType(XSDTYPE m_Type);
           AxisString getValue();
  -        AxisString& serialize(const AxisString& sName, struct tm tValue);
  -        AxisString& serialize(const AxisString& sName, long lDuration);
  +        AxisString& serialize(const AxisChar* sName, struct tm tValue, XSDTYPE nType);
  +        AxisString& serialize(const AxisChar* sName, long lDuration, XSDTYPE nType);
           long getDuration();
           struct tm getDateTime();
           struct tm getDate();
           struct tm getTime();
           void mkCTime();
  +		static struct tm Deserialize(const AxisChar* strValue, XSDTYPE type);
  +		static long DeserializeDuration(const AxisChar* strValue, XSDTYPE type);
   
       private:
           void processValue();
  
  
  
  1.3       +3 -2      ws-axis/c/include/axis/common/BasicTypeSerializer.h
  
  Index: BasicTypeSerializer.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/common/BasicTypeSerializer.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BasicTypeSerializer.h	21 Oct 2003 15:09:42 -0000	1.2
  +++ BasicTypeSerializer.h	24 Oct 2003 05:37:46 -0000	1.3
  @@ -68,7 +68,7 @@
   #define AFX_BASICTYPESERIALIZER_H__7ECDFED3_F3D5_48A1_A7EF_1E30B93BDB2C__INCLUDED_
   
   #include "TypeMapping.h"
  -
  +#include "AxisTime.h"
   #include <string>
   using namespace std;
   
  @@ -96,7 +96,7 @@
       const AxisChar* serialize(const AxisChar* sName, long lValue, XSDTYPE type);
       const AxisChar* serialize(const AxisChar* sName, unsigned long ulValue, XSDTYPE type);
       const AxisChar* serialize(const AxisChar* sName, tm datetime, XSDTYPE type);
  -	const AxisChar* BasicTypeStr(XSDTYPE type);
  +	static const AxisChar* BasicTypeStr(XSDTYPE type);
   
   	BasicTypeSerializer();
   	virtual ~BasicTypeSerializer();
  @@ -117,6 +117,7 @@
   	AxisString m_strReturnVal;
   	AxisChar m_Buf[BTS_BUFFSIZE]; //used for numeric to string conversions with sprintf
   	XSDTYPE m_Type; //used to temporarily set the type of item being serialized.
  +	AxisTime m_AxisTime;
   };
   
   #endif // !defined(AFX_BASICTYPESERIALIZER_H__7ECDFED3_F3D5_48A1_A7EF_1E30B93BDB2C__INCLUDED_)
  
  
  
  1.2       +0 -4      ws-axis/c/include/axis/common/Param.h
  
  Index: Param.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/common/Param.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Param.h	20 Oct 2003 03:18:19 -0000	1.1
  +++ Param.h	24 Oct 2003 05:37:46 -0000	1.2
  @@ -152,10 +152,6 @@
   	int SetUserType(void* pObject, AXIS_DESERIALIZE_FUNCT pDZFunct, AXIS_OBJECT_DELETE_FUNCT
pDelFunct);
   	void SetName(const AxisChar* sName);
   	uParamValue GetValue(){ return m_Value;};
  -private:
  -	BasicTypeSerializer m_BTSZ;
  -    AxisTime m_uAxisTime;
  -    //uDuration duration;
   };
   
   #endif // !defined(AFX_PARAM_H__351B13BB_5D03_40C5_93F5_56D17295A8BD__INCLUDED_)
  
  
  
  1.3       +0 -1      ws-axis/c/include/axis/soap/SoapSerializer.h
  
  Index: SoapSerializer.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/soap/SoapSerializer.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SoapSerializer.h	21 Oct 2003 15:09:42 -0000	1.2
  +++ SoapSerializer.h	24 Oct 2003 05:37:46 -0000	1.3
  @@ -161,7 +161,6 @@
   private:
   	BasicTypeSerializer m_BTSZ;
   	const Ax_soapstream* m_pOutputStream;
  -    AxisTime m_uAxisTime;
   };
   
   #endif // !defined(AFX_SOAPSERIALIZER_H__C37229AD_BD54_430D_9619_E4574CF95334__INCLUDED_)
  
  
  
  1.3       +3 -3      ws-axis/c/src/client/samples/interoptests/base/InteropBaseClient.cpp
  
  Index: InteropBaseClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/client/samples/interoptests/base/InteropBaseClient.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InteropBaseClient.cpp	23 Oct 2003 08:24:59 -0000	1.2
  +++ InteropBaseClient.cpp	24 Oct 2003 05:37:46 -0000	1.3
  @@ -68,9 +68,9 @@
   	ws.echoVoid();
   	//testing echo base 64 binary
   	ws.echoBase64("BCDF675E234242WHRTKMJDGKGUEJ898636JFJFHEJDGWTDHFJRURYGBCDHTWRSG");
  -//	time_t tim;
  -//	time(&tim);
  -//	ws.echoDate(*gmtime(&tim));
  +	time_t tim;
  +	time(&tim);
  +	ws.echoDate(*gmtime(&tim));
   	//testing echo hex binary
   	ws.echoHexBinary("CCCFFA46552BC7D5A09BC5F23DE9E0FE7862AD45BC87D02FE");
   	//testing echo decimal
  
  
  
  1.3       +1 -1      ws-axis/c/src/client/samples/interoptests/base/InteropTestPortType.cpp
  
  Index: InteropTestPortType.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/client/samples/interoptests/base/InteropTestPortType.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InteropTestPortType.cpp	23 Oct 2003 08:24:59 -0000	1.2
  +++ InteropTestPortType.cpp	24 Oct 2003 05:37:46 -0000	1.3
  @@ -20,7 +20,7 @@
   	m_pCall = new Call();
   	m_pCall->SetProtocol(APTHTTP);
   	m_pCall->SetHeader("SOAPAction", "InteropBase");
  -	m_pCall->SetEndpointURI("http://localhost/axis/InteropBase");
  +	m_pCall->SetEndpointURI("http://localhost:5555/axis/InteropBase");
   }
   
   InteropTestPortType::~InteropTestPortType()
  
  
  
  1.9       +87 -67    ws-axis/c/src/common/AxisTime.cpp
  
  Index: AxisTime.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/common/AxisTime.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- AxisTime.cpp	23 Oct 2003 04:31:49 -0000	1.8
  +++ AxisTime.cpp	24 Oct 2003 05:37:46 -0000	1.9
  @@ -75,8 +75,8 @@
   
   AxisTime::AxisTime(time_t pTime)
   {
  -		tm* pTMUTC = gmtime(&pTime);
  -		memcpy(&m_TMUTC, pTMUTC, sizeof(tm));
  +	tm* pTMUTC = gmtime(&pTime);
  +	memcpy(&m_TMUTC, pTMUTC, sizeof(tm));
   }
   
   AxisTime::~AxisTime()
  @@ -117,82 +117,82 @@
   * Serialize the duration in seconds into a xml duration string
   * of the format PnYnMnDTnHnMnS
   */
  -AxisString& AxisTime::serialize(const AxisString& sName, long lDuration)
  +AxisString& AxisTime::serialize(const AxisChar* sName, long lDuration, XSDTYPE nType)
   {
  -        AxisChar buff[4];
  -        strXSDDuration = "P";
  -        int x = 365 * 24 * 3600;
  -        int intYears = lDuration / x;
  -        //sprintf((char*)buff,"%d", intYears);
  -        AxisSprintf(buff, 4, "%d", intYears);
  -        strXSDDuration.append(buff);
  -        strXSDDuration.append("Y");
  -        lDuration = lDuration - (intYears * x);
  -        x = 30 * 24 * 3600;
  -        int intMonths = lDuration / x;
  -        //sprintf((char*)buff,"%d", intMonths);
  -        AxisSprintf(buff, 4, "%d", intMonths);
  -        strXSDDuration.append(buff);
  -        strXSDDuration.append("M");
  -        lDuration = lDuration - (intMonths * x);
  -        x = 24 * 3600;
  -        int intDays = lDuration / x;
  -        //sprintf((char*)buff,"%d", intDays);
  -        AxisSprintf(buff, 4, "%d", intDays);
  -        strXSDDuration.append(buff);
  -        strXSDDuration.append("DT");
  -        lDuration = lDuration - (intDays * x);
  -        x = 3600;
  -        int intHours = lDuration / x;
  -        //sprintf((char*)buff,"%d", intHours);
  -        AxisSprintf(buff, 4, "%d", intHours);
  -        strXSDDuration.append(buff);
  -        strXSDDuration.append("H");
  -        lDuration = lDuration - (intHours * x);
  -        x = 60;
  -        int intMins = lDuration / x;
  -        //sprintf((char*)buff,"%d", intMins);
  -        AxisSprintf(buff, 4, "%d", intMins);
  -        strXSDDuration.append(buff);
  -        strXSDDuration.append("M");
  -        int intSecs = lDuration - (intMins * x);
  -        //sprintf((char*)buff,"%d", intSecs);
  -        AxisSprintf(buff, 4, "%d", intSecs);
  -        strXSDDuration.append(buff);
  -        strXSDDuration.append("S");
  +	AxisChar buff[4];
  +	strXSDDuration = "P";
  +	int x = 365 * 24 * 3600;
  +	int intYears = lDuration / x;
  +	//sprintf((char*)buff,"%d", intYears);
  +	AxisSprintf(buff, 4, "%d", intYears);
  +	strXSDDuration.append(buff);
  +	strXSDDuration.append("Y");
  +	lDuration = lDuration - (intYears * x);
  +	x = 30 * 24 * 3600;
  +	int intMonths = lDuration / x;
  +	//sprintf((char*)buff,"%d", intMonths);
  +	AxisSprintf(buff, 4, "%d", intMonths);
  +	strXSDDuration.append(buff);
  +	strXSDDuration.append("M");
  +	lDuration = lDuration - (intMonths * x);
  +	x = 24 * 3600;
  +	int intDays = lDuration / x;
  +	//sprintf((char*)buff,"%d", intDays);
  +	AxisSprintf(buff, 4, "%d", intDays);
  +	strXSDDuration.append(buff);
  +	strXSDDuration.append("DT");
  +	lDuration = lDuration - (intDays * x);
  +	x = 3600;
  +	int intHours = lDuration / x;
  +	//sprintf((char*)buff,"%d", intHours);
  +	AxisSprintf(buff, 4, "%d", intHours);
  +	strXSDDuration.append(buff);
  +	strXSDDuration.append("H");
  +	lDuration = lDuration - (intHours * x);
  +	x = 60;
  +	int intMins = lDuration / x;
  +	//sprintf((char*)buff,"%d", intMins);
  +	AxisSprintf(buff, 4, "%d", intMins);
  +	strXSDDuration.append(buff);
  +	strXSDDuration.append("M");
  +	int intSecs = lDuration - (intMins * x);
  +	//sprintf((char*)buff,"%d", intSecs);
  +	AxisSprintf(buff, 4, "%d", intSecs);
  +	strXSDDuration.append(buff);
  +	strXSDDuration.append("S");
   
  -        return strXSDDuration;
  +	return strXSDDuration;
   }
   
   /**
   * Serialize the c type tm struct into a xml date string.
   * The serialized date will represent UTC time
   */
  -AxisString& AxisTime::serialize(const AxisString& sName, struct tm tValue)
  +AxisString& AxisTime::serialize(const AxisChar* sName, struct tm tValue, XSDTYPE nType)
   {
  -        /*formats the output date in the format CCYY-MM-DDThh:mm:ssZ*/
  -        switch(m_Type)
  -        {
  -            case XSD_DATETIME:
  -                strftime(buf1, 80, "%Y-%m-%dT%H:%M:%SZ", &tValue);
  -                strXSDDate = buf1;
  -                //AxisUtils::convert(strXSDDate, buf1);
  -                break;
  -            case XSD_DATE:
  -                strftime(buf1, 80, "%Y-%m-%dZ", &tValue);
  -                strXSDDate = buf1;
  -                //AxisUtils::convert(strXSDDate, buf1);
  -                break;
  -            case XSD_TIME:
  -                strftime(buf1, 80, "%H:%M:%SZ", &tValue);
  -                strXSDDate = buf1;
  -                //AxisUtils::convert(strXSDDate, buf1);
  -                break;
  -            default:;
  +    /*formats the output date in the format CCYY-MM-DDThh:mm:ssZ*/
  +    switch(nType)
  +    {
  +        case XSD_DATETIME:
  +            strftime(buf1, 80, "%Y-%m-%dT%H:%M:%SZ", &tValue);
  +            strXSDDate = buf1;
  +            //AxisUtils::convert(strXSDDate, buf1);
  +            break;
  +        case XSD_DATE:
  +            strftime(buf1, 80, "%Y-%m-%dZ", &tValue);
  +            strXSDDate = buf1;
  +            //AxisUtils::convert(strXSDDate, buf1);
  +            break;
  +        case XSD_TIME:
  +            strftime(buf1, 80, "%H:%M:%SZ", &tValue);
  +            strXSDDate = buf1;
  +            //AxisUtils::convert(strXSDDate, buf1);
  +            break;
  +        default:;
   
  -        }
  +    }
   
  -        return strXSDDate;
  +    return strXSDDate;
   }
   
   /**
  @@ -530,3 +530,23 @@
   {
       return m_TMUTC;
   }
  +
  +//following function is written with no consideration of the efficiency.
  +//should be changed later - Susantha 23-10-2003
  +struct tm AxisTime::Deserialize(const AxisChar* strValue, XSDTYPE type)
  +{
  +	AxisTime at;
  +	at.setType(type);
  +	at.setValue(strValue);
  +	return at.getDateTime();
  +}
  +
  +long AxisTime::DeserializeDuration(const AxisChar* strValue, XSDTYPE type)
  +{
  +	AxisTime at;
  +	at.setType(type);
  +	at.setValue(strValue);
  +	return at.getDuration();
  +}
  +
  +
  
  
  
  1.16      +18 -3     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.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- BasicTypeSerializer.cpp	22 Oct 2003 03:40:04 -0000	1.15
  +++ BasicTypeSerializer.cpp	24 Oct 2003 05:37:46 -0000	1.16
  @@ -134,7 +134,15 @@
   const AxisChar* BasicTypeSerializer::serialize(const AxisChar* sName, long lValue, XSDTYPE
type)
   {
   	m_Type = type;
  -	AxisSprintf(m_Buf, BTS_BUFFSIZE, "%d", lValue);
  +	if (XSD_DURATION == type)
  +	{
  +		const AxisChar* pChar = m_AxisTime.serialize(sName, lValue, type).c_str();
  +		strcpy(m_Buf, pChar);
  +	}
  +	else
  +	{
  +		AxisSprintf(m_Buf, BTS_BUFFSIZE, "%d", lValue);
  +	}
   	HelpSerialize(sName, sName);
   	return m_sSZ.c_str();
   }
  @@ -171,10 +179,17 @@
   	return m_sSZ.c_str();
   }
   
  -const AxisChar* BasicTypeSerializer::serialize(const AxisChar* sName, tm datetime, XSDTYPE
type)
  +const AxisChar* BasicTypeSerializer::serialize(const AxisChar* sName, tm tValue, XSDTYPE
type)
   {
   	m_Type = type;
  -	return ""; //TODO: Damitha could you please look in to this.
  +	const AxisChar* pChar = m_AxisTime.serialize(sName, tValue, type).c_str();
  +	if (pChar && (strlen(pChar) < BTS_BUFFSIZE))
  +	{
  +		strcpy(m_Buf, pChar);
  +		HelpSerialize(sName, sName);
  +		return m_sSZ.c_str();
  +	}
  +	return "";
   }
   
   void BasicTypeSerializer::HelpSerialize(const AxisChar* sName, const AxisChar* sValue)
  
  
  
  1.24      +55 -51    ws-axis/c/src/common/Param.cpp
  
  Index: Param.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/common/Param.cpp,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- Param.cpp	22 Oct 2003 03:40:04 -0000	1.23
  +++ Param.cpp	24 Oct 2003 05:37:46 -0000	1.24
  @@ -83,31 +83,30 @@
   {
   	m_sName = param.m_sName.c_str();
   	m_sValue = param.m_sValue.c_str();
  -	m_Type = param.m_Type;	
  -	if (m_Type == USER_TYPE) 
  +	m_Type = param.m_Type;
  +	switch(m_Type)
   	{
  -		m_Value.pCplxObj = new ComplexObjectHandler();
  -		m_Value.pCplxObj->m_TypeName = param.m_Value.pCplxObj->m_TypeName.c_str();
  -		m_Value.pCplxObj->m_URI = param.m_Value.pCplxObj->m_URI.c_str();
  -	}
  -	else if(m_Type == XSD_ARRAY)
  -	{
  -		m_Value.pArray = new ArrayBean();
  -		m_Value.pArray->m_TypeName = param.m_Value.pArray->m_TypeName.c_str();
  -		m_Value.pArray->m_URI = param.m_Value.pArray->m_URI.c_str();
  -		m_Value.pArray->m_type = param.m_Value.pArray->m_type;
  -		m_Value.pArray->m_size = param.m_Value.pArray->m_size;
  -		m_Value.pArray->m_ItemName = param.m_Value.pArray->m_ItemName.c_str();
  -		//copy constructor is not intended to use to copy the array in
  -		//union v
  -	}
  -    else if (m_Type == XSD_DURATION || m_Type == XSD_DATETIME)
  -	{
  -        m_uAxisTime.setType(m_Type);
  -	}	
  -	else 
  -	{
  -		m_Value = param.m_Value;
  +	case USER_TYPE: 
  +		{
  +			m_Value.pCplxObj = new ComplexObjectHandler();
  +			m_Value.pCplxObj->m_TypeName = param.m_Value.pCplxObj->m_TypeName.c_str();
  +			m_Value.pCplxObj->m_URI = param.m_Value.pCplxObj->m_URI.c_str();
  +		}
  +		break;
  +	case XSD_ARRAY:
  +		{
  +			m_Value.pArray = new ArrayBean();
  +			m_Value.pArray->m_TypeName = param.m_Value.pArray->m_TypeName.c_str();
  +			m_Value.pArray->m_URI = param.m_Value.pArray->m_URI.c_str();
  +			m_Value.pArray->m_type = param.m_Value.pArray->m_type;
  +			m_Value.pArray->m_size = param.m_Value.pArray->m_size;
  +			m_Value.pArray->m_ItemName = param.m_Value.pArray->m_ItemName.c_str();
  +			//copy constructor is not intended to use to copy the array in
  +			//union v
  +		}
  +		break;
  +	default: 
  +			m_Value = param.m_Value;
   	}
   }
   
  @@ -137,12 +136,15 @@
   
   Param::Param(time_t time)
   {
  -    m_uAxisTime = AxisTime(time);
  +    //m_uAxisTime = AxisTime(time);
   }
   
  -Param::Param(struct tm timeStruct)
  +Param::Param(struct tm tValue)
   {
  -    m_uAxisTime = AxisTime(timeStruct);
  +	m_sName = "DateTime";
  +	m_Value.tValue = tValue;
  +	m_Type = XSD_DATETIME;
  +    //m_uAxisTime = AxisTime(timeStruct);
   }
   
   Param::Param(int nValue)
  @@ -352,7 +354,7 @@
   	{
   		//exception
   	}
  -	return m_uAxisTime.getDateTime();
  +	return m_Value.tValue;
   }
   
   struct tm Param::GetDate()
  @@ -371,7 +373,7 @@
   	{
   		//exception
   	}
  -	return m_uAxisTime.getDate();
  +	return m_Value.tValue;
   }
   
   struct tm Param::GetTime()
  @@ -390,7 +392,7 @@
   	{
   		//exception
   	}
  -	return m_uAxisTime.getTime();
  +	return m_Value.tValue;
   }
   
   long Param::GetDuration()
  @@ -409,7 +411,7 @@
   	{
   		//exception
   	}
  -	return m_uAxisTime.getDuration();
  +	return m_Value.lDuration;
   }
   
   unsigned int Param::GetUnsignedInt()
  @@ -620,53 +622,53 @@
   	switch (m_Type){
   	case XSD_INT:
   	case XSD_BOOLEAN:
  -        pSZ << m_BTSZ.serialize(m_sName.c_str(), m_Value.nValue, m_Type);
  +        pSZ << pSZ.SerializeBasicType(m_sName.c_str(), m_Value.nValue, m_Type);
   		break; 
       case XSD_UNSIGNEDINT:
  -        pSZ << m_BTSZ.serialize(m_sName.c_str(), m_Value.unValue, m_Type);
  +        pSZ << pSZ.SerializeBasicType(m_sName.c_str(), m_Value.unValue, m_Type);
   		break;           
       case XSD_SHORT:
  -        pSZ << m_BTSZ.serialize(m_sName.c_str(), m_Value.sValue, m_Type);
  +        pSZ << pSZ.SerializeBasicType(m_sName.c_str(), m_Value.sValue, m_Type);
   		break; 
       case XSD_UNSIGNEDSHORT:
  -        pSZ << m_BTSZ.serialize(m_sName.c_str(), m_Value.usValue, m_Type);
  +        pSZ << pSZ.SerializeBasicType(m_sName.c_str(), m_Value.usValue, m_Type);
   		break;         
       case XSD_BYTE:
  -        pSZ << m_BTSZ.serialize(m_sName.c_str(), m_Value.cValue, m_Type);
  +        pSZ << pSZ.SerializeBasicType(m_sName.c_str(), m_Value.cValue, m_Type);
   		break; 
       case XSD_UNSIGNEDBYTE:
  -        pSZ << m_BTSZ.serialize(m_sName.c_str(), m_Value.ucValue, m_Type);
  +        pSZ << pSZ.SerializeBasicType(m_sName.c_str(), m_Value.ucValue, m_Type);
   		break;
       case XSD_LONG:
       case XSD_INTEGER:
  -        pSZ << m_BTSZ.serialize(m_sName.c_str(), m_Value.lValue, m_Type);
  +        pSZ << pSZ.SerializeBasicType(m_sName.c_str(), m_Value.lValue, m_Type);
   		break;        
       case XSD_UNSIGNEDLONG:
  -        pSZ << m_BTSZ.serialize(m_sName.c_str(), m_Value.ulValue, m_Type);
  +        pSZ << pSZ.SerializeBasicType(m_sName.c_str(), m_Value.ulValue, m_Type);
   		break;
   	case XSD_FLOAT:
  -		pSZ << m_BTSZ.serialize(m_sName.c_str(), m_Value.fValue, m_Type);
  +		pSZ << pSZ.SerializeBasicType(m_sName.c_str(), m_Value.fValue, m_Type);
   		break;
       case XSD_DOUBLE:
       case XSD_DECIMAL:
  -		pSZ << m_BTSZ.serialize(m_sName.c_str(), m_Value.dValue, m_Type);
  +		pSZ << pSZ.SerializeBasicType(m_sName.c_str(), m_Value.dValue, m_Type);
   		break;              
   	case XSD_STRING:
  -		pSZ << m_BTSZ.serialize(m_sName.c_str(), m_sValue.c_str(), m_Type);
  +		pSZ << pSZ.SerializeBasicType(m_sName.c_str(), m_sValue.c_str(), m_Type);
   		break;
   	case XSD_HEXBINARY:
  -		pSZ << m_BTSZ.serialize(m_sName.c_str(), m_sValue.c_str(), XSD_HEXBINARY);
  +		pSZ << pSZ.SerializeBasicType(m_sName.c_str(), m_sValue.c_str(), m_Type);
   		break;
   	case XSD_BASE64BINARY:
  -		pSZ << m_BTSZ.serialize(m_sName.c_str(), m_sValue.c_str(), XSD_BASE64BINARY);
  +		pSZ << pSZ.SerializeBasicType(m_sName.c_str(), m_sValue.c_str(), m_Type);
   		break;
   	case XSD_DURATION:
  -        pSZ << m_uAxisTime.serialize(m_sName, m_Value.lDuration).c_str();
  +        pSZ << pSZ.SerializeBasicType(m_sName.c_str(), m_Value.lDuration, m_Type);
           break;
       case XSD_DATETIME:
       case XSD_DATE:
       case XSD_TIME:
  -            pSZ << m_uAxisTime.serialize(m_sName, m_Value.tValue).c_str();      
     
  +            pSZ << pSZ.SerializeBasicType(m_sName.c_str(), m_Value.tValue, m_Type);
           break;        
   	case XSD_ARRAY:
   		//pSZ << "<abc:ArrayOfPhoneNumbers xmlns:abc="http://example.org/2001/06/numbers"
  @@ -699,7 +701,7 @@
   		else //basic type array
   		{
   			pSZ << "xsd:";
  -			pSZ << m_BTSZ.BasicTypeStr(m_Value.pArray->m_type);
  +			pSZ << BasicTypeSerializer::BasicTypeStr(m_Value.pArray->m_type);
   		}
   		{
   			char Buf[10]; //maximum array dimension is 99999999
  @@ -779,13 +781,15 @@
   	case XSD_NOTATION:			
   		m_sValue = sValue;
   		break;
  -    case XSD_DURATION:
       case XSD_DATETIME:
       case XSD_DATE:
       case XSD_TIME:
  -		m_uAxisTime.setValue(sValue);
  +		m_Value.tValue = AxisTime::Deserialize(sValue, m_Type);
   		break;        
  -	//Continue this for all basic types
  +    case XSD_DURATION:
  +		m_Value.lDuration = AxisTime::DeserializeDuration(sValue, m_Type);
  +		break;
  +		//Continue this for all basic types
   	case XSD_ARRAY:
   	case USER_TYPE:
   		//this is an error situation - probably something wrong with the soap
  @@ -845,7 +849,7 @@
       case XSD_DATE:
       case XSD_TIME:
           m_Value.tValue = Value.tValue;
  -        m_uAxisTime.setValue(nType, m_Value);
  +    //    m_uAxisTime.setValue(nType, m_Value);
   	//Continue this for all basic types
   	case XSD_ARRAY:
   		m_Value.pArray = Value.pArray;
  
  
  
  1.30      +1 -2      ws-axis/c/src/soap/SoapSerializer.cpp
  
  Index: SoapSerializer.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapSerializer.cpp,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- SoapSerializer.cpp	22 Oct 2003 03:40:05 -0000	1.29
  +++ SoapSerializer.cpp	24 Oct 2003 05:37:46 -0000	1.30
  @@ -448,8 +448,7 @@
   
   const AxisChar* SoapSerializer::SerializeBasicType(const AxisChar* sName, struct tm tValue,
XSDTYPE type)
   {
  -    return m_uAxisTime.serialize(sName, tValue).c_str();
  -    //return NULL;
  +    return m_BTSZ.serialize(sName, tValue, type);
   }
   
   const AxisChar* SoapSerializer::SerializeBasicType(const AxisChar* sName, unsigned int
unValue, XSDTYPE type)
  
  
  
  1.2       +4 -3      ws-axis/c/vc/server/samples/interoptests/base/base.dsp
  
  Index: base.dsp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/vc/server/samples/interoptests/base/base.dsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- base.dsp	22 Oct 2003 12:45:47 -0000	1.1
  +++ base.dsp	24 Oct 2003 05:37:46 -0000	1.2
  @@ -40,6 +40,7 @@
   # PROP Use_Debug_Libraries 0
   # PROP Output_Dir "../../../../../release/win32"
   # PROP Intermediate_Dir "Release"
  +# PROP Ignore_Export_Lib 0
   # PROP Target_Dir ""
   # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS"
/D "_USRDLL" /D "BASE_EXPORTS" /YX /FD /c
   # ADD CPP /nologo /MT /W3 /GX /O2 /I "../../../../../include" /D "WIN32" /D "NDEBUG" /D
"_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "BASE_EXPORTS" /FD /c
  @@ -53,7 +54,7 @@
   # ADD BSC32 /nologo
   LINK32=link.exe
   # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
  -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
  +# ADD LINK32 /nologo /dll /machine:I386 /out:"../../../../../release/win32/interopbase.dll"
   
   !ELSEIF  "$(CFG)" == "base - Win32 Debug"
   
  @@ -68,8 +69,8 @@
   # PROP Intermediate_Dir "Debug"
   # PROP Ignore_Export_Lib 0
   # PROP Target_Dir ""
  -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D
"_MBCS" /D "_USRDLL" /D "BASE_EXPORTS" /YX /FD /GZ  /c
  -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../../../include" /D "WIN32" /D "_DEBUG"
/D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "BASE_EXPORTS" /FD /GZ  /c
  +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D
"_MBCS" /D "_USRDLL" /D "BASE_EXPORTS" /YX /FD /GZ /c
  +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../../../include" /D "WIN32" /D "_DEBUG"
/D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "BASE_EXPORTS" /FD /GZ /c
   # SUBTRACT CPP /YX
   # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
   # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
  
  
  
  1.2       +4 -3      ws-axis/c/vc/server/samples/interoptests/groupB/groupB.dsp
  
  Index: groupB.dsp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/vc/server/samples/interoptests/groupB/groupB.dsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- groupB.dsp	22 Oct 2003 12:45:47 -0000	1.1
  +++ groupB.dsp	24 Oct 2003 05:37:46 -0000	1.2
  @@ -40,6 +40,7 @@
   # PROP Use_Debug_Libraries 0
   # PROP Output_Dir "../../../../../release/win32"
   # PROP Intermediate_Dir "Release"
  +# PROP Ignore_Export_Lib 0
   # PROP Target_Dir ""
   # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS"
/D "_USRDLL" /D "GROUPB_EXPORTS" /YX /FD /c
   # ADD CPP /nologo /MT /W3 /GX /O2 /I "../../../../../include" /D "WIN32" /D "NDEBUG" /D
"_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GROUPB_EXPORTS" /FD /c
  @@ -53,7 +54,7 @@
   # ADD BSC32 /nologo
   LINK32=link.exe
   # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
  -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
  +# ADD LINK32 /nologo /dll /machine:I386 /out:"../../../../../release/win32/interopGroupB.dll"
   
   !ELSEIF  "$(CFG)" == "groupB - Win32 Debug"
   
  @@ -68,8 +69,8 @@
   # PROP Intermediate_Dir "Debug"
   # PROP Ignore_Export_Lib 0
   # PROP Target_Dir ""
  -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D
"_MBCS" /D "_USRDLL" /D "GROUPB_EXPORTS" /YX /FD /GZ  /c
  -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../../../include" /D "WIN32" /D "_DEBUG"
/D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GROUPB_EXPORTS" /FD /GZ  /c
  +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D
"_MBCS" /D "_USRDLL" /D "GROUPB_EXPORTS" /YX /FD /GZ /c
  +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../../../include" /D "WIN32" /D "_DEBUG"
/D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GROUPB_EXPORTS" /FD /GZ /c
   # SUBTRACT CPP /YX
   # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
   # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
  
  
  

Mime
View raw message