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/src/server/handlers/transport/testhandler2 Makefile TestTransport.cpp TestTransport.h runconfig
Date Fri, 17 Oct 2003 10:01:52 GMT
damitha     2003/10/17 03:01:52

  Modified:    c/src/server/handlers/custom/loghandler LogHandler.cpp
               c/src/server/handlers/global/testhandler1 Makefile
                        TestGlobal.cpp TestGlobal.h runconfig
               c/src/server/handlers/transport/testhandler2 Makefile
                        TestTransport.cpp TestTransport.h runconfig
  Log:
  updated demo transport handler and global handler with the new code. now they are working.
  
  Revision  Changes    Path
  1.11      +6 -6      ws-axis/c/src/server/handlers/custom/loghandler/LogHandler.cpp
  
  Index: LogHandler.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/server/handlers/custom/loghandler/LogHandler.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- LogHandler.cpp	16 Oct 2003 13:12:46 -0000	1.10
  +++ LogHandler.cpp	17 Oct 2003 10:01:52 -0000	1.11
  @@ -68,7 +68,7 @@
   #include <stdio.h>
   #include <string>
   
  -#define linesize 16
  +#define linesize 100
   using namespace std;
   
   LogHandler::LogHandler()
  @@ -101,11 +101,10 @@
           int nLineCount = 0;
           AXISTRACE1("file opened for read");
           while(fgets(line, linesize, fileLogCount) != NULL)
  -        {
  -            AXISTRACE1("LINE IS:");    
  +        {   
               nLineCount++;
           }
  -        nLineCount = (nLineCount/6);
  +        nLineCount = nLineCount/2;
           nLineCount++;
           fclose(fileLogCount);
           
  @@ -120,10 +119,11 @@
               fputs("time : ", fileLogCount);
               fputs(ctime(&ltime), fileLogCount);
               fputs(": service ", fileLogCount);
  -            fputs(md->GetService()->GetServiceName(), fileLogCount);            
  +            fputs(md->GetService()->GetServiceName(), fileLogCount);
  +            AXISTRACE1("came here2");
               fputs(" is accessed ", fileLogCount);
               sprintf(printcount,"%d", nLineCount);
  -            fputs(printcount, fileLogCount);
  +            fputs(printcount, fileLogCount);      
               fputs(" times.\n", fileLogCount);
           }
           fclose(fileLogCount);
  
  
  
  1.4       +1 -1      ws-axis/c/src/server/handlers/global/testhandler1/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/server/handlers/global/testhandler1/Makefile,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile	6 Oct 2003 12:36:16 -0000	1.3
  +++ Makefile	17 Oct 2003 10:01:52 -0000	1.4
  @@ -28,7 +28,7 @@
   sysconfdir = ${prefix}/etc
   sharedstatedir = ${prefix}/com
   localstatedir = ${prefix}/var
  -libdir = /home/damitha/projects/axiscpp/c/src/server/handlers/global/testhandler1/lib
  +libdir = /usr/local/apache/Axis/handlers/global/testhandler1
   infodir = ${prefix}/info
   mandir = ${prefix}/man
   includedir = ${prefix}/include
  
  
  
  1.8       +14 -17    ws-axis/c/src/server/handlers/global/testhandler1/TestGlobal.cpp
  
  Index: TestGlobal.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/server/handlers/global/testhandler1/TestGlobal.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TestGlobal.cpp	2 Oct 2003 06:06:16 -0000	1.7
  +++ TestGlobal.cpp	17 Oct 2003 10:01:52 -0000	1.8
  @@ -61,8 +61,7 @@
   
   
   #include "TestGlobal.h"
  -#include <fstream>
  -//#include <string>
  +#include <string>
   #include <AxisTrace.h>
   #include <AxisException.h>
   
  @@ -70,22 +69,19 @@
   
   TestGlobal::TestGlobal()
   {
  -  m_Option = new map<string, string>;
  -
  +    m_pOption = NULL;
  +    m_sEmpty = "";
   }
   
   TestGlobal::~TestGlobal()
   {
  -  delete(m_Option);
  -  m_Option = NULL;
  -
   }
   // Implementation of BasicHandler interface.
   int TestGlobal::Invoke(IMessageData* md)
   {
   
     AXIS_TRY
  -//		AXISTRACE1("Hi, you successfully invoked TestGlobal handler");
  +      AXISTRACE1("Hi, you successfully invoked TestGlobal handler");
   
       return SUCCESS;
   
  @@ -102,19 +98,20 @@
   }
   
   
  -string TestGlobal::GetOption(string sArg)
  -{
  -  return (*m_Option)[sArg];
  -}
  -
  -void TestGlobal::SetOption(string sOption, string sValue)
  +const string& TestGlobal::GetOption(const string& sArg)
   {
  -  (*m_Option)[sOption] = sValue;
  +    map<string, string>::const_iterator it = m_pOption->find(sArg);
  +    if (it != m_pOption->end())
  +    {
  +        return (*it).second;
  +    }
  +    
  +    return m_sEmpty;
   }
   
  -void TestGlobal::SetOptionList(map<string, string>* OptionList)
  +void TestGlobal::SetOptionList(const map<string, string>* OptionList)
   {
  -   m_Option = OptionList;
  +   m_pOption = OptionList;
   }
   
   int TestGlobal::Init()
  
  
  
  1.6       +5 -5      ws-axis/c/src/server/handlers/global/testhandler1/TestGlobal.h
  
  Index: TestGlobal.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/server/handlers/global/testhandler1/TestGlobal.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestGlobal.h	15 Oct 2003 06:11:29 -0000	1.5
  +++ TestGlobal.h	17 Oct 2003 10:01:52 -0000	1.6
  @@ -72,8 +72,6 @@
   
   #include "../../../../common/Handler.h"
   
  -//#include <list>
  -
   class TestGlobal : public Handler
   {
   public:
  @@ -83,9 +81,11 @@
   	virtual ~TestGlobal();
   	int Invoke(IMessageData* pMsg);
   	void OnFault(IMessageData* pMsg);
  -	string GetOption(string sArg);
  -	void SetOption(string sOption, string Value);
  -	void SetOptionList(map<string, string>* OptionList);
  +	const string& GetOption(const string& sArg);
  +	void SetOptionList(const map<string, string>* OptionList);
  +
  +protected:
  +    string m_sEmpty;    
   
   };
   
  
  
  
  1.2       +1 -1      ws-axis/c/src/server/handlers/global/testhandler1/runconfig
  
  Index: runconfig
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/server/handlers/global/testhandler1/runconfig,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- runconfig	2 Oct 2003 06:06:16 -0000	1.1
  +++ runconfig	17 Oct 2003 10:01:52 -0000	1.2
  @@ -1,2 +1,2 @@
   #!/bin/bash
  -configure --libdir=$AXISCPP_HOME/src/server/handlers/global/testhandler1/lib
  +configure --libdir=$AXIS_HOME/handlers/global/testhandler1
  
  
  
  1.5       +1 -1      ws-axis/c/src/server/handlers/transport/testhandler2/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/server/handlers/transport/testhandler2/Makefile,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Makefile	6 Oct 2003 12:36:16 -0000	1.4
  +++ Makefile	17 Oct 2003 10:01:52 -0000	1.5
  @@ -28,7 +28,7 @@
   sysconfdir = ${prefix}/etc
   sharedstatedir = ${prefix}/com
   localstatedir = ${prefix}/var
  -libdir = /home/damitha/projects/axiscpp/c/src/server/handlers/transport/testhandler2/lib
  +libdir = /usr/local/apache/Axis/handlers/transport/testhandler2
   infodir = ${prefix}/info
   mandir = ${prefix}/man
   includedir = ${prefix}/include
  
  
  
  1.8       +12 -14    ws-axis/c/src/server/handlers/transport/testhandler2/TestTransport.cpp
  
  Index: TestTransport.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/server/handlers/transport/testhandler2/TestTransport.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TestTransport.cpp	15 Oct 2003 06:11:29 -0000	1.7
  +++ TestTransport.cpp	17 Oct 2003 10:01:52 -0000	1.8
  @@ -63,7 +63,6 @@
   #include "TestTransport.h"
   #include "../../../../soap/SoapDeSerializer.h"
   #include "../../../../soap/SoapSerializer.h"
  -#include <fstream>
   #include <string>
   #include <AxisTrace.h>
   #include <AxisException.h>
  @@ -72,21 +71,20 @@
   
   TestTransport::TestTransport()
   {
  -  m_Option = new map<string, string>;
  +    m_pOption = NULL;
  +    m_sEmpty = "";
   
   }
   
   TestTransport::~TestTransport()
   {
  -  delete(m_Option);
  -  m_Option = NULL;
   
   }
   // Implementation of BasicHandler interface.
   int TestTransport::Invoke(IMessageData* md)
   {
     AXIS_TRY
  -//    AXISTRACE1("Hi, you have successfully invoked the TestTransport handler");
  +    AXISTRACE1("Hi, you have successfully invoked the TestTransport handler");
       return SUCCESS;
     AXIS_CATCH(...)
   		return FAIL;
  @@ -99,19 +97,19 @@
   }
   
   
  -string TestTransport::GetOption(string sArg)
  +const string& TestTransport::GetOption(const string& sArg)
   {
  -  return (*m_Option)[sArg];
  +  map<string, string>::const_iterator it = m_pOption->find(sArg);
  +  if (it != m_pOption->end())
  +  {
  +      return (*it).second;
  +  }
  +  return m_sEmpty;
   }
   
  -void TestTransport::SetOption(string sOption, string sValue)
  +void TestTransport::SetOptionList(const map<string, string>* OptionList)
   {
  -  (*m_Option)[sOption] = sValue;
  -}
  -
  -void TestTransport::SetOptionList(map<string, string>* OptionList)
  -{
  -   m_Option = OptionList;
  +   m_pOption = OptionList;
   }
   
   int TestTransport::Init()
  
  
  
  1.5       +3 -4      ws-axis/c/src/server/handlers/transport/testhandler2/TestTransport.h
  
  Index: TestTransport.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/server/handlers/transport/testhandler2/TestTransport.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestTransport.h	2 Oct 2003 06:06:16 -0000	1.4
  +++ TestTransport.h	17 Oct 2003 10:01:52 -0000	1.5
  @@ -75,11 +75,10 @@
     int Init();
     int Fini();
   
  -  string GetOption(string sArg);
  -  void SetOption(string sOption, string Value);
  -  void SetOptionList(map<string, string>* OptionList);
  +  const string& GetOption(const string& sArg);
  +  void SetOptionList(const map<string, string>* OptionList);
   
   protected:
  -  int m_iNumAccess;
  +    string m_sEmpty;
   
   };
  
  
  
  1.2       +1 -1      ws-axis/c/src/server/handlers/transport/testhandler2/runconfig
  
  Index: runconfig
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/server/handlers/transport/testhandler2/runconfig,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- runconfig	2 Oct 2003 06:06:16 -0000	1.1
  +++ runconfig	17 Oct 2003 10:01:52 -0000	1.2
  @@ -1,2 +1,2 @@
   #!/bin/bash
  -configure --libdir=$AXISCPP_HOME/src/server/handlers/transport/testhandler2/lib
  +configure --libdir=$AXIS_HOME/handlers/transport/testhandler2
  
  
  

Mime
View raw message