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 su...@apache.org on 2003/08/13 16:07:20 UTC

cvs commit: xml-axis/c/src/common WrapperClassHandler.h TypeMapping.h TypeMapping.cpp Packet.h Packet.cpp MessageData.h MessageData.cpp BasicHandler.h

susantha    2003/08/13 07:07:20

  Modified:    c/src/common WrapperClassHandler.h TypeMapping.h
                        TypeMapping.cpp Packet.h Packet.cpp MessageData.h
                        MessageData.cpp BasicHandler.h
  Log:
  After making code base thread safe. Also changed Module writing API accordingly. WSDD module too improved.
  
  Revision  Changes    Path
  1.3       +0 -2      xml-axis/c/src/common/WrapperClassHandler.h
  
  Index: WrapperClassHandler.h
  ===================================================================
  RCS file: /home/cvs/xml-axis/c/src/common/WrapperClassHandler.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WrapperClassHandler.h	4 Aug 2003 06:30:06 -0000	1.2
  +++ WrapperClassHandler.h	13 Aug 2003 14:07:19 -0000	1.3
  @@ -69,8 +69,6 @@
   class WrapperClassHandler : public BasicHandler 
   {
   public:
  -	virtual int Init() = 0;
  -	virtual int Fini() = 0;	
   	int GetType(){return WEBSERVICE_HANDLER;};
   };
   
  
  
  
  1.2       +1 -1      xml-axis/c/src/common/TypeMapping.h
  
  Index: TypeMapping.h
  ===================================================================
  RCS file: /home/cvs/xml-axis/c/src/common/TypeMapping.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TypeMapping.h	23 Jul 2003 09:30:47 -0000	1.1
  +++ TypeMapping.h	13 Aug 2003 14:07:19 -0000	1.2
  @@ -90,7 +90,7 @@
   	static XSDTYPE Map(string& sType);
   	static void Initialize();
   	static map<string, XSDTYPE> m_sTypeMap;
  -	static bool m_bInit;
  +	static volatile bool m_bInit;
   	TypeMapping();
   	virtual ~TypeMapping();
   
  
  
  
  1.2       +1 -1      xml-axis/c/src/common/TypeMapping.cpp
  
  Index: TypeMapping.cpp
  ===================================================================
  RCS file: /home/cvs/xml-axis/c/src/common/TypeMapping.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TypeMapping.cpp	23 Jul 2003 09:30:47 -0000	1.1
  +++ TypeMapping.cpp	13 Aug 2003 14:07:19 -0000	1.2
  @@ -71,7 +71,7 @@
   // Construction/Destruction
   //////////////////////////////////////////////////////////////////////
   map<string, XSDTYPE> TypeMapping::m_sTypeMap;
  -bool TypeMapping::m_bInit = false;
  +volatile bool TypeMapping::m_bInit = false;
   //map<string, XSDTYPE> TypeMapping::m_sTypeMap["xsd:int"] = XSD_INT;
   //map<string, XSDTYPE> TypeMapping::m_sTypeMap["xsd:string"] = XSD_STRING;
   
  
  
  
  1.4       +47 -39    xml-axis/c/src/common/Packet.h
  
  Index: Packet.h
  ===================================================================
  RCS file: /home/cvs/xml-axis/c/src/common/Packet.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Packet.h	27 Jul 2003 07:30:44 -0000	1.3
  +++ Packet.h	13 Aug 2003 14:07:19 -0000	1.4
  @@ -7,11 +7,9 @@
   
   typedef struct 
   {
  -	unsigned char* ip_soap;
  -	unsigned char* op_soap;
  -	char* service;
  -	int byte_count;
  -} stream;
  +	void* ip_stream;
  +	void* op_stream;
  +} Ax_iostream;
   /*
   typedef enum
   {
  @@ -21,49 +19,49 @@
   */
   typedef enum
   {
  -	GET,
  -	POST,
  -	UNSUPPORTED
  -} http_method;
  +	AXIS_HTTP_GET,
  +	AXIS_HTTP_POST,
  +	AXIS_HTTP_UNSUPPORTED
  +} AXIS_HTTP_METHOD;
   
   typedef struct
   {
  -	char * headername;
  -	char * headervalue;
  -} header;
  +	char* headername;
  +	char* headervalue;
  +} Ax_header;
   
   typedef struct
   {
  -	char * uri_path;
  -	header * ip_headers;
  +	char* uri_path;
  +	Ax_header* ip_headers;
   	int ip_headercount;
  -	header * op_headers;
  +	Ax_header* op_headers;
   	int op_headercount;
  -	http_method ip_method;
  -	http_method op_method;
  -} stream_http;
  +	AXIS_HTTP_METHOD ip_method;
  +	AXIS_HTTP_METHOD op_method;
  +} Ax_stream_http;
   
   typedef struct
   {
   	int dummy;  
  -} stream_smtp;
  +} Ax_stream_smtp;
   
   typedef union
   {
  -	stream_http http;
  -	stream_smtp smtp;
  -} soapcontent;
  +	Ax_stream_http http;
  +	Ax_stream_smtp smtp;
  +} Ax_soapcontent;
   
   typedef struct
   {
  -	soapcontent so;
  +	Ax_soapcontent so;
  +	Ax_iostream str;
  +	char* sessionid;
   	AXIS_PROTOCOL_TYPE trtype;
  -} soapstream;
  +} Ax_soapstream;
   
  -char* getheader(soapstream* soap, char* pchkey);
  +char* getheader(Ax_soapstream* soap, char* pchkey);
   
  -//This function is implemented in axis
  -//int initialize_module();
   
   //This function is implemented in axis
   //int initialize_process();
  @@ -75,24 +73,34 @@
   #ifdef __cplusplus
   extern "C"
   {
  -  //This function should be implemented by module authors
  -  //Allows to send pieces of soap response the transport handler
  -  int send_response_bytes(char * res);
  -
  -  //This function should be implemented by module authors
  -  //Allows axis to get pieces of the request as they come to the transport listener
  -  int get_request_bytes(char * req, int reqsize, int* retsize);
  +	//This function is implemented in axis
  +	int initialize_module();
  +
  +	//This function is implemented in axis
  +	int process_request(Ax_soapstream* str);
  +
  +	//This function should be implemented by module authors
  +	//Allows to send pieces of soap response the transport handler
  +	int send_response_bytes(char* res, void* opstream);
  +
  +	//This function should be implemented by module authors
  +	//Allows axis to get pieces of the request as they come to the transport listener
  +	int get_request_bytes(char* req, int reqsize, int* retsize, void* ipstream);
   
  -  //This fucntion should be implemented by module authors
  -  int send_transport_information(soapstream *);
  +	//This fucntion should be implemented by module authors
  +	int send_transport_information(Ax_soapstream *str);
   }
   
   #else
  -  int send_response_bytes(char * res);
  +	int initialize_module();
  +
  +	int process_request(Ax_soapstream *str);
  +
  +	int send_response_bytes(char * res, void* opsteam);
   
  -  int get_request_bytes(char * req, int reqsize, int* retsize);
  +	int get_request_bytes(char * req, int reqsize, int* retsize, void* ipstream);
   
  -  int send_transport_information(soapstream *);
  +	int send_transport_information(Ax_soapstream *str);
   #endif
   
   #endif
  
  
  
  1.3       +2 -2      xml-axis/c/src/common/Packet.cpp
  
  Index: Packet.cpp
  ===================================================================
  RCS file: /home/cvs/xml-axis/c/src/common/Packet.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Packet.cpp	31 Jul 2003 11:50:19 -0000	1.2
  +++ Packet.cpp	13 Aug 2003 14:07:19 -0000	1.3
  @@ -3,9 +3,9 @@
   
   #include <stdio.h>
   
  -char* getheader(soapstream* soap, char* pchkey)
  +char* getheader(Ax_soapstream* soap, char* pchkey)
   {
  -	header* hdrs = NULL;
  +	Ax_header* hdrs = NULL;
   	int count = 0;
   	switch (soap->trtype)
   	{
  
  
  
  1.9       +3 -3      xml-axis/c/src/common/MessageData.h
  
  Index: MessageData.h
  ===================================================================
  RCS file: /home/cvs/xml-axis/c/src/common/MessageData.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- MessageData.h	5 Aug 2003 08:18:54 -0000	1.8
  +++ MessageData.h	13 Aug 2003 14:07:19 -0000	1.9
  @@ -111,13 +111,13 @@
   	void SetSerializer(SoapSerializer* pSZ);
   	void SetUserName(string& m_sUserName);
   	string& GetUserName();
  -	void SetService(WSDDService* argService);
  -	WSDDService* GetService();  
  +	void SetService(const WSDDService* argService);
  +	const WSDDService* GetService();  
   	AXIS_PROTOCOL_TYPE m_Protocol;
   	
   protected:
     string m_sUserName;
  -  WSDDService* m_Service;
  +  const WSDDService* m_Service;
   
   private:
   	bool m_bPastPivotState;
  
  
  
  1.9       +2 -2      xml-axis/c/src/common/MessageData.cpp
  
  Index: MessageData.cpp
  ===================================================================
  RCS file: /home/cvs/xml-axis/c/src/common/MessageData.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- MessageData.cpp	5 Aug 2003 08:18:54 -0000	1.8
  +++ MessageData.cpp	13 Aug 2003 14:07:19 -0000	1.9
  @@ -103,12 +103,12 @@
    // return "damitha kumarage"; 
   }
   
  -void MessageData::SetService(WSDDService* argService)
  +void MessageData::SetService(const WSDDService* argService)
   {
     m_Service = argService;
   }
   
  -WSDDService* MessageData::GetService()
  +const WSDDService* MessageData::GetService()
   {
     return m_Service;
   
  
  
  
  1.5       +3 -0      xml-axis/c/src/common/BasicHandler.h
  
  Index: BasicHandler.h
  ===================================================================
  RCS file: /home/cvs/xml-axis/c/src/common/BasicHandler.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- BasicHandler.h	4 Aug 2003 06:36:33 -0000	1.4
  +++ BasicHandler.h	13 Aug 2003 14:07:19 -0000	1.5
  @@ -73,6 +73,7 @@
   #endif // _MSC_VER > 1000
   
   #include "IMessageData.h"
  +#include "GDefine.h"
   
   enum HANDLER_TYPE { NORMAL_HANDLER, WEBSERVICE_HANDLER, CHAIN_HANDLER };
   
  @@ -84,6 +85,8 @@
   	virtual int Invoke(IMessageData* pMsg) = 0;
   	virtual void OnFault(IMessageData* pMsg) = 0;
   	virtual int GetType() = 0;
  +	virtual int Init() = 0;
  +	virtual int Fini() = 0;	
   };
   
   #endif // !defined(AFX_BASICHANDLER_H__FFF77AB5_015C_4B48_9BAC_D84A7C493015__INCLUDED_)