Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

WSDDDocumentXerces.h

00001 /*
00002  *   Copyright 2003-2004 The Apache Software Foundation.
00003  *
00004  *   Licensed under the Apache License, Version 2.0 (the "License");
00005  *   you may not use this file except in compliance with the License.
00006  *   You may obtain a copy of the License at
00007  *
00008  *       http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  *   Unless required by applicable law or agreed to in writing, software
00011  *   distributed under the License is distributed on an "AS IS" BASIS,
00012  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  *   See the License for the specific language governing permissions and
00014  *   limitations under the License.
00015  */
00016 
00017 #ifdef WIN32
00018 #pragma warning(disable : 4786)
00019 #endif
00020 
00021 #if !defined(__WSDDDOCUMENTXERCES_H_INCLUDED__)
00022 #define __WSDDDOCUMENTXERCES_H_INCLUDED__
00023 
00024 #include "WSDDDocument.h"
00025 #include <xercesc/sax2/DefaultHandler.hpp>
00026 #include <xercesc/sax2/SAX2XMLReader.hpp>
00027 #include <xercesc/sax2/XMLReaderFactory.hpp>
00028 #include <xercesc/util/PlatformUtils.hpp>
00029 #include <string>
00030 #include <map>
00031 
00032 using namespace std;
00033 
00034 XERCES_CPP_NAMESPACE_USE;
00035 
00036 /*
00037  *  @class WSDDDocumentXerces
00038  *  @brief
00039  *  @author sanjaya sinharage(sanjaya@opensource.lk)
00040  *  @author Suasntha Kumara (skumara@virtusa.com, susantha@opensource.lk)
00041  */
00042 class WSDDDocumentXerces : public WSDDDocument, public DefaultHandler
00043 {
00044 private:
00045     const AxisChar* __XTRC(const XMLCh* pChar);
00046     void ProcessAttributes(WSDDLevels ElementType, const Attributes &attrs);
00047     void GetParameters(WSDDLevels ElementType, const Attributes &attrs);
00048     void AddAllowedRolesToService(const AxisXMLCh* value);
00049     void AddAllowedMethodsToService(const AxisXMLCh* value);
00050     int ParseDocument(const AxisChar* sWSDD);
00051 
00052 public:
00053     WSDDDocumentXerces(map<AxisString, int>* pLibNameIdMap);
00054     ~WSDDDocumentXerces();
00055     int GetDeployment(const AxisChar* sWSDD, WSDDDeployment* pDeployment);
00056     int UpdateDeployment(const AxisChar* sWSDD, WSDDDeployment* pDeployment);
00057 
00058     
00059     /*  Implementations of the SAX DocumentHandler interface */
00060     
00061     void startElement(const XMLCh *const uri, const XMLCh *const localname, 
00062         const XMLCh *const qname, const Attributes &attrs);
00063     void characters (const XMLCh *const chars, const unsigned int length);
00064     void endElement (const XMLCh *const uri, const XMLCh *const localname, 
00065         const XMLCh *const qname);
00066     void startPrefixMapping(const XMLCh* const prefix, const XMLCh* const uri);
00067     void endPrefixMapping(const XMLCh* const prefix);
00068 
00069     
00070     /*  Implementations of the SAX ErrorHandler interface */
00071     
00072     void warning(const SAXParseException& exception);
00073     void error(const SAXParseException& exception);
00074     void fatalError(const SAXParseException& exception);
00075 };
00076 
00077 #endif 
00078 

Generated on Fri Apr 9 12:21:29 2004 for axiscpp by doxygen1.2.18