Back to index

nordugrid-arc-nox  1.1.0~rc6
MCCMsgValidator.h
Go to the documentation of this file.
00001 #ifndef __ARC_MCCMSGVALIDATOR_H__
00002 #define __ARC_MCCMSGVALIDATOR_H__
00003 
00004 #include <arc/message/MCC.h>
00005 
00006 namespace Arc {
00007 
00008   // This is a base class for Message Validator client and service MCCs. 
00009 
00010   class MCC_MsgValidator : public MCC {
00011   public:
00012     MCC_MsgValidator(Config *cfg);
00013   protected:
00014     static Logger logger;
00015     std::map<std::string,std::string> schemas;
00016 
00017     bool validateMessage(Message&,std::string);
00018     std::string getSchemaPath(std::string serviceName);
00019   };
00020 
00021 /* This MCC validates messages against XML schemas. 
00022    It accepts and produces (i.e. inmsg/outmsg) PayloadSOAP 
00023    kind of payloads in it's process() method. */
00024 class MCC_MsgValidator_Service: public MCC_MsgValidator
00025 {
00026     public:
00027         /* Constructor takes configuration of MCC. */
00028         MCC_MsgValidator_Service(Config *cfg);
00029         virtual ~MCC_MsgValidator_Service(void);
00030         virtual MCC_Status process(Message&,Message&);
00031     private:
00032         static std::string getPath(std::string url);
00033 };
00034 
00035 } // namespace Arc
00036 
00037 #endif /* __ARC_MCCMSGVALIDATOR_H__ */