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 wh...@apache.org on 2004/10/25 15:30:34 UTC

cvs commit: ws-axis/c/include/axis AxisGenException.hpp IAttribute.hpp ISoapFault.hpp

whitlock    2004/10/25 06:30:34

  Added:       c/include/axis AxisGenException.hpp IAttribute.hpp
                        ISoapFault.hpp
  Log:
  Rename external C++ headers to .hpp
  
  Revision  Changes    Path
  1.1                  ws-axis/c/include/axis/AxisGenException.hpp
  
  Index: AxisGenException.hpp
  ===================================================================
  /*
   *   Copyright 2003-2004 The Apache Software Foundation.
   *
   *   Licensed under the Apache License, Version 2.0 (the "License");
   *   you may not use this file except in compliance with the License.
   *   You may obtain a copy of the License at
   *
   *       http://www.apache.org/licenses/LICENSE-2.0
   *
   *   Unless required by applicable law or agreed to in writing, software
   *   distributed under the License is distributed on an "AS IS" BASIS,
   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *   See the License for the specific language governing permissions and
   *   limitations under the License.
   *
   *
   *   @author Damitha Kumarage (damitha@opensource.lk, damitha@jkcsworld.com)
   *
   */
   
  #ifndef __AXISGENEXCEPTION_H_OF_AXIS_INCLUDED_
  #define __AXISGENEXCEPTION_H_OF_AXIS_INCLUDED_
  
  #include <string>
  #include <exception>
  #include <axis/server/AxisException.h>
  
  AXIS_CPP_NAMESPACE_START
  
  using namespace std;
  
  class STORAGE_CLASS_INFO AxisGenException :public AxisException
  {
  
  public:
      AxisGenException();
  
      /** This can be used to throw an exception with the exception code
        * which is defined in the AxisException.h file, under AXISC_EXCEPTIONS
        * type. Axis C++ exception model heavily use this.
        *
        * @param Exception code which is defined in the AxisException.h file,
        * under AXISC_EXCEPTIONS type.
        *
        * @example throw AxisGenException(AXISC_NODE_VALUE_MISMATCH_EXCEPTION);
        */
      AxisGenException(const int iExceptionCode);
      /** This can be used to throw an exception with exception code which is
        * is defined in the AxisException.h file, under AXISC_EXCEPTIONS type.
        * An additional description of the exception could be appended.
        *
        * @param Exception code which is defined in the AxisException.h file,
        *  under AXISC_EXCEPTIONS type.
        * @param A char pointer that will point to an exception message.
        *
        * @example throw AxisGenException(AXISC_NODE_VALUE_MISMATCH_EXCEPTION,
              "Some additional exception info");
        */
  
      AxisGenException(const int iExceptionCode, char* pcMessage);
  
      /** This can be used to throw an exception with another exception as a
        * parameter. One situation in which this can be used is when we catch
        * a standard exception like std::bad_alloc
        *
        * @param An exception class derived from std::exception
        *
        * @example throw AxisGenException(std::bad_alloc);
        */
      AxisGenException(const exception* e);
  
      /** This accept two parameters, both an exception code an exception object
        * derived from std::exception
        *
        * @param An exception class derived from std::exception
        * @param An exception code
        */
      AxisGenException(const exception* e, const int iExceptionCode);
  
      /** This accept an exception message
        *
        * @param An exception message
        */
      AxisGenException(const char* pcMessage);
      virtual ~AxisGenException() throw();
      const char* what() throw();
      const int getExceptionCode();
  
  private:
      const string getMessage(const exception* e);
      const string getMessage(const int iExceptionCode);
      void processException(const exception* e);
      void processException(const exception* e, const int iExceptionCode);
      void processException (const exception* e, char* pcMessage);
      void processException(const int iExceptionCode);
      void processException(const int iExceptionCode, char* pcMessage); 
      string m_sMessage;
      int m_iExceptionCode;
  };
  
  AXIS_CPP_NAMESPACE_END
  
  #endif
  
  
  
  
  1.1                  ws-axis/c/include/axis/IAttribute.hpp
  
  Index: IAttribute.hpp
  ===================================================================
  /*
   *   Copyright 2003-2004 The Apache Software Foundation.
   *
   *   Licensed under the Apache License, Version 2.0 (the "License");
   *   you may not use this file except in compliance with the License.
   *   You may obtain a copy of the License at
   *
   *       http://www.apache.org/licenses/LICENSE-2.0
   *
   *   Unless required by applicable law or agreed to in writing, software
   *   distributed under the License is distributed on an "AS IS" BASIS,
   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *   See the License for the specific language governing permissions and
   *   limitations under the License.
   */
  
   /**
   * @file IAttribute.h
   *
   *
   */
   
  #if !defined(_IATTRIBUTE_H____OF_AXIS_INCLUDED_)
  #define _IATTRIBUTE_H____OF_AXIS_INCLUDED_
  
  #include <axis/server/GDefine.h>
  
  /**
   *   @class IAttribute
   *   @brief interface for the IAttribute class.
   *
   *   @author Roshan Weerasuriya (roshan@opensource.lk, roshanw@jkcsworld.com)
   *
   */
  
  #ifdef __cplusplus
  
  class IAttribute
  {
  public:        
  
      virtual ~IAttribute() {};
  
      virtual void setValue(const AxisChar* value) = 0;
      virtual void setUri(const AxisChar* uri) = 0;
      virtual void setPrefix(const AxisChar* prefix) = 0;
      virtual void setLocalName(const AxisChar* localname) = 0;    
      virtual const AxisChar* getValue() = 0;
      virtual const AxisChar* getUri() = 0;
      virtual const AxisChar* getPrefix() = 0;
      virtual const AxisChar* getLocalName() = 0;
  
  };
  
  #endif
  
  
  #endif
  
  
  
  1.1                  ws-axis/c/include/axis/ISoapFault.hpp
  
  Index: ISoapFault.hpp
  ===================================================================
  /*
   *   Copyright 2003-2004 The Apache Software Foundation.
   *
   *   Licensed under the Apache License, Version 2.0 (the "License");
   *   you may not use this file except in compliance with the License.
   *   You may obtain a copy of the License at
   *
   *       http://www.apache.org/licenses/LICENSE-2.0
   *
   *   Unless required by applicable law or agreed to in writing, software
   *   distributed under the License is distributed on an "AS IS" BASIS,
   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *   See the License for the specific language governing permissions and
   *   limitations under the License.
   */
  
  /**
   * @file ISoapFault.h
   *
   * @author Damitha Kumarage (damitha@opensource.lk, damitha@jkcsworld.com)
   *
   */
  
  #ifdef WIN32
  #pragma warning (disable : 4786)
  #endif
  
  #if !defined(_ISOAPFAULT_H____OF_AXIS_INCLUDED_)
  #define _ISOAPFAULT_H____OF_AXIS_INCLUDED_
  
  AXIS_CPP_NAMESPACE_START
  
  using namespace std;
  
  /**
   *  @class ISoapFault
   *  @brief Interface to represent SoapFault
   *
   *
   *  @author damitha kumarage (damitha@jkcsworld.com, damitha@opensource.lk)
   */
  
  
  class ISoapFault  
  {
  
  public:
  
      virtual ~ISoapFault(){};
  
      /** When a complex fault arrives this method can be used to
        * get the name of that fault. This is useful because once 
        * we have the fault name we can pass the information necessary
        * to deserialize it, back to the SoapFault class.
        * 
        * @return name of the complex fault
        */
      virtual string getCmplxFaultObjectName() = 0;
      
      /** Once we know the complex fault name we can pass the information such as the
        * knowledge to deserialize the complex fault by calling this method.
        *
        * @param deserialize callback function pointer
        * @param create callback function
        * @param delete callback function
        * @param name
        * @param url
        */
      virtual void* getCmplxFaultObject(void* pDZFunct, void* pCreFunct, void* pDelFunct, 
          const AxisChar* pName, const AxisChar* pNamespace) = 0;
  
  
      virtual const void* getCmplxFaultObject() = 0;
      
      /** To retrive a simple fault detail string
        *
        * @return Simple fault detail
        */
      virtual string getSimpleFaultDetail() = 0;
  
      /** To retrive the soap fault code
        *
        * @return fault code
        */
      virtual string getFaultcode() = 0;
  
      /** To retrive the soap fault string
        *
        * @return fault string
        */
      virtual string getFaultstring() = 0;
  
      /** To retrive the soap fault actor
        *
        * @return fault actor
        */
      virtual string getFaultactor() = 0;
  
      virtual int setFaultcode(const string& sFaultcode) = 0;
  
      virtual int setFaultstring(const string& sFaultstring) = 0;
  
      virtual int setFaultactor(const string& sFaultactor) = 0;
  
      virtual int setFaultDetail(const string& sFaultdetail) = 0;
  
      virtual int setCmplxFaultObject(const void* pCmplxFaultObject) = 0;
  
  };
  
  AXIS_CPP_NAMESPACE_END
  
  #endif