axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From baud...@apache.org
Subject cvs commit: ws-axis/c/src/soap SoapSerializer.cpp
Date Mon, 19 Apr 2004 09:53:56 GMT
baudyjy     2004/04/19 02:53:56

  Modified:    c/include/axis/server IWrapperSoapSerializer.h
                        IWrapperSoapDeSerializer.h MessageData.h
                        SoapDeSerializer.h AxisEngine.h
               c/src/engine DeserializerPool.cpp SerializerPool.cpp
                        SerializerPool.h DeserializerPool.h
               c/src/common MessageData.cpp
               c/src/soap SoapSerializer.cpp
  Log:
  First review of IWrapperSoap[De]Serializer Interface.
  
  Revision  Changes    Path
  1.9       +18 -0     ws-axis/c/include/axis/server/IWrapperSoapSerializer.h
  
  Index: IWrapperSoapSerializer.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/server/IWrapperSoapSerializer.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- IWrapperSoapSerializer.h	3 Feb 2004 13:04:45 -0000	1.8
  +++ IWrapperSoapSerializer.h	19 Apr 2004 09:53:55 -0000	1.9
  @@ -68,6 +68,10 @@
   #include "AxisUserAPI.h"
   #include "TypeMapping.h"
   #include "ISoapSerializer.h"
  +#include "SoapHeader.h"
  +#include "IHeaderBlock.h"
  +#include "WSDDDefines.h"
  +#include "Packet.h"
   
   #endif
   
  @@ -134,6 +138,20 @@
   	/* following two functions are needed by serializer functions of complex types for RPC
style web services */
   	virtual void AXISCALL SerializeStartElementOfType(const AxisChar* pName, const AxisChar*
pNamespace, const AxisChar* pPrefix)=0;
   	virtual void AXISCALL SerializeEndElementOfType(const AxisChar* pName)=0;
  +
  +	/* Externalization of serializer API */
  +	virtual int AXISCALL SetOutputStream(const Ax_soapstream* pStream)=0;
  +	virtual void AXISCALL MarkEndOfStream()=0;	
  +	virtual	int AXISCALL Init()=0;	
  +	virtual IHeaderBlock* AXISCALL createHeaderBlock()=0;
  +	virtual	int AXISCALL setSoapVersion(SOAP_VERSION)=0;
  +	virtual int AXISCALL setSoapHeader(SoapHeader* pSoapHeader)=0;
  +	virtual IHeaderBlock* AXISCALL createHeaderBlock(AxisChar *pachLocalName, AxisChar *pachPrefix,
AxisChar *pachUri)=0;	
  +	virtual PROVIDERTYPE AXISCALL GetCurrentProviderType()=0;
  +	virtual void AXISCALL SetCurrentProviderType(PROVIDERTYPE nType)=0;	
  +	virtual void AXISCALL SetStyle(AXIS_BINDING_STYLE nStyle)=0;
  +	virtual AXIS_BINDING_STYLE AXISCALL GetStyle()=0;
  +
   	/* following stuff is needed to provide the interface for C web services */
   public:
   	static IWrapperSoapSerializerFunctions ms_VFtable;
  
  
  
  1.10      +13 -0     ws-axis/c/include/axis/server/IWrapperSoapDeSerializer.h
  
  Index: IWrapperSoapDeSerializer.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/server/IWrapperSoapDeSerializer.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- IWrapperSoapDeSerializer.h	3 Feb 2004 13:04:45 -0000	1.9
  +++ IWrapperSoapDeSerializer.h	19 Apr 2004 09:53:55 -0000	1.10
  @@ -65,6 +65,8 @@
   #include "GDefine.h"
   #include "AxisUserAPI.h"
   #include "TypeMapping.h"
  +#include "WSDDDefines.h"
  +#include "Packet.h"
   
   #ifdef __cplusplus
   
  @@ -207,6 +209,17 @@
       virtual struct tm AXISCALL GetAttributeAsTime(const AxisChar* pName, const AxisChar*
pNamespace)=0;
       virtual long AXISCALL GetAttributeAsDuration(const AxisChar* pName, const AxisChar*
pNamespace)=0;
   	virtual int AXISCALL GetStatus()=0;
  +	
  +	/* Externalization of deserializer API */
  +	virtual int AXISCALL SetInputStream(const Ax_soapstream* pInputStream)=0;
  +	virtual int AXISCALL GetVersion()=0;
  +	virtual int AXISCALL GetHeader()=0;
  +	virtual	int AXISCALL Init()=0;
  +	virtual PROVIDERTYPE AXISCALL GetCurrentProviderType()=0;
  +	virtual void AXISCALL SetCurrentProviderType(PROVIDERTYPE nType)=0;	
  +	virtual void AXISCALL SetStyle(AXIS_BINDING_STYLE nStyle)=0;
  +	virtual AXIS_BINDING_STYLE AXISCALL GetStyle()=0;	
  +	    	
   
   	/* following stuff is needed to provide the interface for C web services */
   public:
  
  
  
  1.7       +4 -4      ws-axis/c/include/axis/server/MessageData.h
  
  Index: MessageData.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/server/MessageData.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- MessageData.h	30 Mar 2004 10:47:48 -0000	1.6
  +++ MessageData.h	19 Apr 2004 09:53:55 -0000	1.7
  @@ -99,8 +99,8 @@
   	MessageData();
   	virtual ~MessageData();
   public:
  -	SoapSerializer* m_pSZ;
  -	SoapDeSerializer* m_pDZ;
  +	IWrapperSoapSerializer* m_pSZ;
  +	IWrapperSoapDeSerializer* m_pDZ;
   private:
   	void GetAdminUtils(IAdminUtils** pIAdminUtils);
   public:
  @@ -115,8 +115,8 @@
   	IWrapperSoapDeSerializer* getSoapDeserializer();
   	int setPastPivotState(bool bState);
   	bool isPastPivot();
  -	void SetDeSerializer(SoapDeSerializer* pDZ);
  -	void SetSerializer(SoapSerializer* pSZ);
  +	void SetDeSerializer(IWrapperSoapDeSerializer* pDZ);
  +	void SetSerializer(IWrapperSoapSerializer* pSZ);
   	void SetUserName(string& m_sUserName);
   	string& GetUserName();
   	void SetService(const WSDDService* argService);
  
  
  
  1.10      +1 -0      ws-axis/c/include/axis/server/SoapDeSerializer.h
  
  Index: SoapDeSerializer.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/server/SoapDeSerializer.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SoapDeSerializer.h	24 Mar 2004 06:57:29 -0000	1.9
  +++ SoapDeSerializer.h	19 Apr 2004 09:53:55 -0000	1.10
  @@ -186,6 +186,7 @@
   //	void* CreateArray(XSDTYPE nType, int nSize);
   //	void DeleteArray(Axis_Array* pArray , XSDTYPE nType);
   	void SetStyle(AXIS_BINDING_STYLE nStyle){ m_nStyle = nStyle;};
  +	AXIS_BINDING_STYLE GetStyle(){return m_nStyle;};	
   	XSDTYPE GetXSDType(const AnyElement* pElement);
   	int AXISCALL GetStatus(){return m_nStatus;};
   
  
  
  
  1.6       +2 -2      ws-axis/c/include/axis/server/AxisEngine.h
  
  Index: AxisEngine.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/server/AxisEngine.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AxisEngine.h	24 Mar 2004 06:57:29 -0000	1.5
  +++ AxisEngine.h	19 Apr 2004 09:53:55 -0000	1.6
  @@ -81,8 +81,8 @@
   class AxisEngine 
   {
   protected:	
  -	SoapSerializer* m_pSZ;
  -	SoapDeSerializer* m_pDZ;
  +	IWrapperSoapSerializer* m_pSZ;
  +	IWrapperSoapDeSerializer* m_pDZ;
   	HandlerChain* m_pGReqFChain;
   	HandlerChain* m_pGResFChain;
   	HandlerChain* m_pTReqFChain;
  
  
  
  1.11      +7 -3      ws-axis/c/src/engine/DeserializerPool.cpp
  
  Index: DeserializerPool.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/DeserializerPool.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- DeserializerPool.cpp	8 Apr 2004 12:25:13 -0000	1.10
  +++ DeserializerPool.cpp	19 Apr 2004 09:53:56 -0000	1.11
  @@ -30,14 +30,14 @@
   
   DeserializerPool::~DeserializerPool ()
   {
  -    for (list < SoapDeSerializer* >::iterator it = m_DZList.begin ();
  +    for (list < IWrapperSoapDeSerializer* >::iterator it = m_DZList.begin ();
           it != m_DZList.end (); it++)
       {
           delete (*it);
       }
   }
   
  -int DeserializerPool::GetInstance (SoapDeSerializer** ppDZ)
  +int DeserializerPool::GetInstance (IWrapperSoapDeSerializer** ppDZ)
   {
       lock ();
       if (!m_DZList.empty ())
  @@ -47,7 +47,11 @@
       }
       else
       {
  +#ifdef USER_DESERIALIZER
  +        *ppDZ = (IWrapperSoapDeSerializer*)GetUserDeSerializer();
  +#else
           *ppDZ = new SoapDeSerializer ();
  +#endif                
           if (AXIS_SUCCESS != (*ppDZ)->Init ())
           {
               delete* ppDZ;
  @@ -61,7 +65,7 @@
       return AXIS_SUCCESS;
   }
   
  -int DeserializerPool::PutInstance (SoapDeSerializer* pDZ)
  +int DeserializerPool::PutInstance (IWrapperSoapDeSerializer* pDZ)
   {
       if (AXIS_SUCCESS != pDZ->Init ())
       {
  
  
  
  1.12      +8 -3      ws-axis/c/src/engine/SerializerPool.cpp
  
  Index: SerializerPool.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/SerializerPool.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SerializerPool.cpp	9 Apr 2004 04:16:03 -0000	1.11
  +++ SerializerPool.cpp	19 Apr 2004 09:53:56 -0000	1.12
  @@ -30,7 +30,7 @@
   
   SerializerPool::~SerializerPool ()
   {
  -    for (list <SoapSerializer*>::iterator it = m_SZList.begin ();
  +    for (list <IWrapperSoapSerializer*>::iterator it = m_SZList.begin ();
            it != m_SZList.end (); it++)
       {
           delete (*it);
  @@ -38,7 +38,7 @@
   }
   
   // Pooling should be implemented
  -int SerializerPool::GetInstance (SoapSerializer** ppSZ)
  +int SerializerPool::GetInstance (IWrapperSoapSerializer** ppSZ)
   {
       lock ();
       if (!m_SZList.empty ())
  @@ -48,7 +48,12 @@
       }
       else
       {
  +#ifdef USER_SERIALIZER
  +        *ppSZ = (IWrapperSoapSerializer*)GetUserSerializer();
  +#else
           *ppSZ = new SoapSerializer ();
  +#endif
  +        
       }
       if (AXIS_SUCCESS != (*ppSZ)->Init ())
       {
  @@ -62,7 +67,7 @@
       return AXIS_SUCCESS;
   }
   
  -int SerializerPool::PutInstance (SoapSerializer* pSZ)
  +int SerializerPool::PutInstance (IWrapperSoapSerializer* pSZ)
   {
       lock ();
       m_SZList.push_back (pSZ);
  
  
  
  1.8       +8 -3      ws-axis/c/src/engine/SerializerPool.h
  
  Index: SerializerPool.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/SerializerPool.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SerializerPool.h	9 Apr 2004 04:41:42 -0000	1.7
  +++ SerializerPool.h	19 Apr 2004 09:53:56 -0000	1.8
  @@ -20,7 +20,12 @@
   #define AXIS_SERIALIZERPOOL_H__INCLUDED_
   
   #include "SharedObject.h"
  +#ifdef USER_SERIALIZER
  +#include <axis/server/IWrapperSoapSerializer.h>
  +extern void* GetUserSerializer();
  +#else
   #include <axis/server/SoapSerializer.h>
  +#endif 
   #include <axis/server/GDefine.h>
   #include <list>
   
  @@ -39,10 +44,10 @@
           SerializerPool ();
           virtual ~ SerializerPool ();
       private:
  -        list <SoapSerializer*>m_SZList;
  +        list <IWrapperSoapSerializer*>m_SZList;
       public:
  -        int GetInstance (SoapSerializer** ppSZ);
  -        int PutInstance (SoapSerializer* pSZ);
  +        int GetInstance (IWrapperSoapSerializer** ppSZ);
  +        int PutInstance (IWrapperSoapSerializer* pSZ);
   };
   
   #endif 
  
  
  
  1.8       +8 -3      ws-axis/c/src/engine/DeserializerPool.h
  
  Index: DeserializerPool.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/DeserializerPool.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DeserializerPool.h	8 Apr 2004 12:30:09 -0000	1.7
  +++ DeserializerPool.h	19 Apr 2004 09:53:56 -0000	1.8
  @@ -20,7 +20,12 @@
   #define AXIS_DESERIALIZERPOOL_H__INCLUDED_
   
   #include "SharedObject.h"
  +#ifdef USER_DESERIALIZER
  +#include <axis/server/IWrapperSoapDeSerializer.h>
  +extern void* GetUserDeSerializer();
  +#else
   #include <axis/server/SoapDeSerializer.h>
  +#endif
   #include <axis/server/GDefine.h>
   #include <list>
   
  @@ -38,10 +43,10 @@
           DeserializerPool ();
           virtual ~ DeserializerPool ();
       private:
  -        list <SoapDeSerializer*>m_DZList;
  +        list <IWrapperSoapDeSerializer*>m_DZList;
       public:
  -        int GetInstance (SoapDeSerializer** ppDZ);
  -        int PutInstance (SoapDeSerializer* pDZ);
  +        int GetInstance (IWrapperSoapDeSerializer** ppDZ);
  +        int PutInstance (IWrapperSoapDeSerializer* pDZ);
   };
   
   #endif 
  
  
  
  1.22      +2 -2      ws-axis/c/src/common/MessageData.cpp
  
  Index: MessageData.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/common/MessageData.cpp,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- MessageData.cpp	8 Apr 2004 06:17:05 -0000	1.21
  +++ MessageData.cpp	19 Apr 2004 09:53:56 -0000	1.22
  @@ -52,12 +52,12 @@
       m_Properties.clear ();
   }
   
  -void MessageData::SetSerializer (SoapSerializer* pSZ)
  +void MessageData::SetSerializer (IWrapperSoapSerializer* pSZ)
   {
       m_pSZ = pSZ;
   }
   
  -void MessageData::SetDeSerializer (SoapDeSerializer* pDZ)
  +void MessageData::SetDeSerializer (IWrapperSoapDeSerializer* pDZ)
   {
       m_pDZ = pDZ;
   }
  
  
  
  1.42      +3 -0      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.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- SoapSerializer.cpp	8 Apr 2004 12:24:45 -0000	1.41
  +++ SoapSerializer.cpp	19 Apr 2004 09:53:56 -0000	1.42
  @@ -776,6 +776,8 @@
    *                 transport's AXIS_MODULE_CALLBACK_SEND_MESSAGE_BYTES 
    *                 callback
    */
  + 
  +#ifndef USER_SERIALIZER 
   void axis_buffer_release(const char* buffer, const void* bufferid, 
                            const void* stream)
   {
  @@ -784,6 +786,7 @@
       char *pChar = const_cast<char*>(buffer);
       pChar[0] = '\0'; /* set nul */ 
   }
  +#endif
   
   IHeaderBlock* SoapSerializer::createHeaderBlock(AxisChar *pachLocalName, 
                                                   AxisChar *pachPrefix, 
  
  
  

Mime
View raw message