axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject cvs commit: ws-axis/c/include/axis/wsdd WSDDDocument.h
Date Tue, 02 Dec 2003 11:35:34 GMT
damitha     2003/12/02 03:35:34

  Modified:    c/include/axis/wsdd Tag: CWrapperSupport WSDDDocument.h
  Log:
  
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.2.4.2   +79 -15    ws-axis/c/include/axis/wsdd/WSDDDocument.h
  
  Index: WSDDDocument.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/wsdd/WSDDDocument.h,v
  retrieving revision 1.2.4.1
  retrieving revision 1.2.4.2
  diff -u -r1.2.4.1 -r1.2.4.2
  --- WSDDDocument.h	21 Nov 2003 12:48:07 -0000	1.2.4.1
  +++ WSDDDocument.h	2 Dec 2003 11:35:34 -0000	1.2.4.2
  @@ -72,10 +72,23 @@
   #include "WSDDService.h"
   #include "../common/GDefine.h"
   
  -#include <xercesc/sax2/DefaultHandler.hpp>
  +#include <axis/soap/XMLSimpleHandler.h>
  +#include <string>
  +#include <arabica/SAX/XMLReader.h>
  +#include <arabica/SAX/EntityResolver.h>
  +#include <arabica/SAX/DTDHandler.h>
  +#include <arabica/SAX/ContentHandler.h>
  +#include <arabica/SAX/ErrorHandler.h>
  +#include <arabica/SAX/Locator.h>
  +#include <arabica/SAX/Attributes.h>
  +#include <arabica/SAX/ext/LexicalHandler.h>
  +#include <arabica/SAX/ext/DeclHandler.h>
  +#include <arabica/SAX/SAXException.h>
  +
  +/*#include <xercesc/sax2/DefaultHandler.hpp>
   #include <xercesc/sax2/SAX2XMLReader.hpp>
   #include <xercesc/sax2/XMLReaderFactory.hpp>
  -#include <xercesc/util/PlatformUtils.hpp>
  +#include <xercesc/util/PlatformUtils.hpp>*/
   
   #include <string>
   #include <map>
  @@ -84,14 +97,19 @@
   
   enum WSDDLevels {WSDD_UNKNOWN=1, WSDD_DEPLOYMENT, WSDD_UNDEPLOYMENT, WSDD_GLOBCONF, WSDD_SERVICE,
WSDD_HANDLER, WSDD_CHAIN, WSDD_TRANSPORT, WSDD_REQFLOW, WSDD_RESFLOW, WSDD_PARAM };
   
  -XERCES_CPP_NAMESPACE_USE;
  +//XERCES_CPP_NAMESPACE_USE;
  +
   
   //wsdd file related defines
   #define METHODNAME_SEPARATOR ' '
   #define ROLENAME_SEPARATOR ','
   #define TRANSCODE_BUFFER_SIZE 256
   
  -class WSDDDocument:public DefaultHandler
  +class WSDDDocument:public SAX::EntityResolver, public SAX::DTDHandler,
  +							public SAX::ContentHandler,
  +							public SAX::ErrorHandler,
  +							public SAX::LexicalHandler,
  +							public SAX::DeclHandler
   {
   private:
   	bool m_bFatalError;
  @@ -110,9 +128,9 @@
   	AxisChar m_Buffer[TRANSCODE_BUFFER_SIZE]; //used to transcode XMLCh to AxisChar
   
   private:
  -	const AxisChar* __XTRC(const XMLCh* pChar);
  -	void ProcessAttributes(WSDDLevels ElementType, const Attributes &attrs);
  -	void GetParameters(WSDDLevels ElementType, const Attributes &attrs);
  +	//const AxisChar* __XTRC(const string& pChar);
  +	void ProcessAttributes(WSDDLevels ElementType, const AttributesT& attrs);
  +	void GetParameters(WSDDLevels ElementType, const AttributesT& attrs);
   	void AddAllowedRolesToService(const AxisXMLCh* value);
   	void AddAllowedMethodsToService(const AxisXMLCh* value);
   
  @@ -125,18 +143,64 @@
       // -----------------------------------------------------------------------
       //  Implementations of the SAX DocumentHandler interface
       // -----------------------------------------------------------------------
  -	void startElement(const XMLCh *const uri, const XMLCh *const localname,	const XMLCh *const
qname, const Attributes &attrs);
  -	void characters (const XMLCh *const chars, const unsigned int length);
  -	void endElement (const XMLCh *const uri, const XMLCh *const localname,	const XMLCh *const
qname);
  -	void startPrefixMapping(const XMLCh* const prefix, const XMLCh* const uri);
  -	void endPrefixMapping(const XMLCh* const prefix);
  +	void startElement(const string& uri, const string& localname,	const string&
qname, const AttributesT &attrs);
  +	void characters (const string& chars, const unsigned int length);
  +	void endElement (const string& uri, const string& localname,	const string&
qname);
  +	void startPrefixMapping(const string& prefix, const string& uri);
  +	void endPrefixMapping(const string& prefix);
  +
  +    /*void startElement(const string& uri,const string& localname,const string&
qname,const AttributesT &attrs);
  +	void characters (const string& chars,const unsigned int length);
  +	void endElement (const string& uri,const string& localname,const string& qname);
  +	void startPrefixMapping(const string& prefix, const string& uri);
  +	void endPrefixMapping(const string& prefix);*/
   
   	// -----------------------------------------------------------------------
       //  Implementations of the SAX ErrorHandler interface
       // -----------------------------------------------------------------------
  -    void warning(const SAXParseException& exception);
  -    void error(const SAXParseException& exception);
  -    void fatalError(const SAXParseException& exception);
  +    void warning(const SAX::SAXParseException& exception);
  +    void error(const SAX::SAXParseException& exception);
  +    void fatalError(const SAX::SAXParseException& exception);
  +
  +
  +    
  +    /*Following are not important for our purpose*/
  +    virtual void notationDecl(const std::string& name,
  +                            const std::string& publicId,
  +                            const std::string& systemId){}
  +    virtual void unparsedEntityDecl(const std::string& name,
  +                                        const std::string& publicId,
  +                                  const std::string& systemId,
  +                                  const std::string& notationName){ }
  +    virtual void setDocumentLocator(const LocatorT& locator){ }                   
              
  +
  +    virtual void startDocument(){ }
  +    virtual void endDocument(){ }
  +    virtual void characters(const std::string& ch){ }
  +    virtual void ignorableWhitespace(const std::string& ch){ }
  +    virtual void processingInstruction(const std::string& target, const std::string&
data){ }
  +    virtual void skippedEntity(const std::string& name){ }
  +      virtual void startDTD(const std::string& name,
  +                        const std::string& publicId,
  +                        const std::string& systemId){ }
  +    virtual void endDTD(){ }
  +    virtual void startEntity(const std::string& name){ }
  +    virtual void endEntity(const std::string& name){ }
  +    virtual void startCDATA(){ }
  +    virtual void endCDATA(){ }
  +    virtual void comment(const std::string& text){ }
  +    virtual void elementDecl(const std::string& name, const std::string& model){
}
  +    virtual void attributeDecl(const std::string& elementName,
  +                             const std::string& attributeName,
  +                             const std::string& type,
  +                             const std::string& valueDefault,
  +                             const std::string& value){ }
  +    virtual void internalEntityDecl(const std::string& name, const std::string&
value){ }
  +    virtual void externalEntityDecl(const std::string& name,
  +                                  const std::string& publicId,
  +                                  const std::string& systemId){ }
  +    virtual SAX::InputSource resolveEntity(const std::string& publicId, const std::string&
systemId){  return SAX::InputSource();}                                  
  +
   };
   
   #endif //__WSDDDOCUMENTS_H_INCLUDED__
  
  
  

Mime
View raw message