00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifdef WIN32
00018 #pragma warning (disable : 4786)
00019 #endif
00020
00021 #if !defined(AXIS_WSDDDEPLOYMENT_H__INCLUDED_)
00022 #define AXIS_WSDDDEPLOYMENT_H__INCLUDED_
00023
00024 #include <axis/server/WSDDService.h>
00025 #include <axis/server/WSDDHandler.h>
00026 #include "WSDDTransport.h"
00027
00028 #include <list>
00029
00030 using namespace std;
00031
00032 enum DEPLOYMENTTYPE {DT_DEPLOYMENT, DT_UNDEPLOYMENT};
00033
00034
00035
00036
00037
00038 class WSDDDeployment
00039 {
00040 friend class WSDDDocumentExpat;
00041 friend class WSDDDocumentXerces;
00042 public:
00043 int LoadWSDD(const AxisChar* sWSDD);
00044 int UpdateWSDD(const AxisChar* sWSDD);
00045 int SaveWSDD();
00046 const AxisChar* GetLibName(int nLibId);
00047 const WSDDService* GetService(const AxisChar* sServiceName);
00048 const WSDDHandlerList* GetGlobalRequestFlowHandlers();
00049 const WSDDHandlerList* GetGlobalResponseFlowHandlers();
00050 const WSDDHandlerList* GetTransportRequestFlowHandlers
00051 (AXIS_PROTOCOL_TYPE protocol);
00052 const WSDDHandlerList* GetTransportResponseFlowHandlers
00053 (AXIS_PROTOCOL_TYPE protocol);
00054 const WSDDServiceMap* GetWSDDServiceMap() const;
00055 DEPLOYMENTTYPE GetDeploymentType() const;
00056 WSDDDeployment();
00057 virtual ~WSDDDeployment();
00058 private:
00059 int AddService(WSDDService* pService);
00060 int AddHandler(bool bGlobal, bool bRequestFlow, WSDDHandler* pHandler,
00061 AXIS_PROTOCOL_TYPE protocol=APTHTTP);
00062 int RemoveService(WSDDService* pService);
00063 int RemoveHandler(bool bGlobal, bool bRequestFlow, WSDDHandler* pHandler,
00064 AXIS_PROTOCOL_TYPE protocol=APTHTTP);
00065 void SetDeploymentType(DEPLOYMENTTYPE nType);
00066 private:
00067 WSDDServiceMap* m_DeployedServices;
00068 WSDDHandlerList* m_GlobalRequestHandlers;
00069 WSDDHandlerList* m_GlobalResponseHandlers;
00070 WSDDTransport* m_pTransportHandlers;
00071 map<AxisString, int>* m_pLibNameIdMap;
00072 AxisString m_sAux;
00073 string m_sWSDDPath;
00074 DEPLOYMENTTYPE m_DeplType;
00075 };
00076
00077 #endif
00078