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 su...@apache.org on 2003/08/04 08:36:43 UTC

cvs commit: xml-axis/c/src/engine HandlerPool.cpp HandlerLoaderTest.cpp HandlerLoader.cpp HandlerChain.h

susantha    2003/08/03 23:36:43

  Modified:    c/src/engine HandlerPool.cpp HandlerLoaderTest.cpp
                        HandlerLoader.cpp HandlerChain.h
  Log:
  some changes to exclude exceptions and RTTI
  
  Revision  Changes    Path
  1.4       +25 -23    xml-axis/c/src/engine/HandlerPool.cpp
  
  Index: HandlerPool.cpp
  ===================================================================
  RCS file: /home/cvs/xml-axis/c/src/engine/HandlerPool.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- HandlerPool.cpp	8 Jul 2003 12:22:01 -0000	1.3
  +++ HandlerPool.cpp	4 Aug 2003 06:36:43 -0000	1.4
  @@ -274,37 +274,39 @@
   
   HandlerChain* HandlerPool::LoadHandlerChain(WSDDHandlerList *pHandlerList)
   {
  -  DEBUG1("HandlerPool::LoadHandlerChain");
  +	DEBUG1("HandlerPool::LoadHandlerChain");
   	int nLoaded = 0;
   	HandlerChain* pHc = NULL;
   	if (pHandlerList && !pHandlerList->empty())
  -  {
  +	{
   		pHc = new HandlerChain();
   		//BasicHandler* pBh = NULL;;
  -    Handler* pH = NULL;
  -		for (WSDDHandlerList::iterator it=pHandlerList->begin();
  -		it != pHandlerList->end(); it++)
  +		Handler* pH = NULL;
  +		for (WSDDHandlerList::iterator it=pHandlerList->begin(); it != pHandlerList->end(); it++)
   		{
   			//if ((pBh = LoadHandler(*it)) != NULL)
  -      DEBUG1("BEFORE BasicHandler *pBh = LoadHandler(*it);");
  -      BasicHandler *pBh = LoadHandler(*it);
  -      DEBUG1("AFTER BasicHandler *pBh = LoadHandler(*it);");
  -      if (pBh)
  +			DEBUG1("BEFORE BasicHandler *pBh = LoadHandler(*it);");
  +			BasicHandler *pBh = LoadHandler(*it);
  +			DEBUG1("AFTER BasicHandler *pBh = LoadHandler(*it);");
  +			if (pBh)
   			{
  -        DEBUG1("BEFORE pH = dynamic_cast<Handler*>(pBh);");
  -        pH = dynamic_cast<Handler*>(pBh);
  -        DEBUG1("AFTER pH = dynamic_cast<Handler*>(pBh);");
  -        if (pH)
  -			  {          
  -          DEBUG1("if (pH)");
  -          pH->SetOptionList((*it)->GetOptionList());
  -				  nLoaded++;
  -				  pHc->AddHandler(pH);
  -        }
  -        else
  -        {
  -          return NULL;
  -        }
  +				DEBUG1("BEFORE pH = dynamic_cast<Handler*>(pBh);");
  +				if (pBh->GetType() == NORMAL_HANDLER)
  +					pH = static_cast<Handler*>(pBh);
  +				else
  +					pH = NULL;
  +				DEBUG1("AFTER pH = dynamic_cast<Handler*>(pBh);");
  +				if (pH)
  +				{          
  +					DEBUG1("if (pH)");
  +					pH->SetOptionList((*it)->GetOptionList());
  +					nLoaded++;
  +					pHc->AddHandler(pH);
  +				}
  +				else
  +				{
  +					return NULL;
  +				}
   			}
   		}
   		if (0!=nLoaded) 
  
  
  
  1.2       +2 -2      xml-axis/c/src/engine/HandlerLoaderTest.cpp
  
  Index: HandlerLoaderTest.cpp
  ===================================================================
  RCS file: /home/cvs/xml-axis/c/src/engine/HandlerLoaderTest.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HandlerLoaderTest.cpp	25 Jun 2003 05:13:45 -0000	1.1
  +++ HandlerLoaderTest.cpp	4 Aug 2003 06:36:43 -0000	1.2
  @@ -10,9 +10,9 @@
   	HandlerLoader* pDL = new HandlerLoader(sLib);
   	if (SUCCESS == pDL->Initialize())
   	{	
  -		printf("Loaded Library %s\n", sLib.c_str());
  +//		printf("Loaded Library %s\n", sLib.c_str());
   		pDL->Finalize();
  -		printf("Unloaded Library %s\n", sLib.c_str());
  +//		printf("Unloaded Library %s\n", sLib.c_str());
   	}
   	return 0;
   }
  
  
  
  1.3       +4 -4      xml-axis/c/src/engine/HandlerLoader.cpp
  
  Index: HandlerLoader.cpp
  ===================================================================
  RCS file: /home/cvs/xml-axis/c/src/engine/HandlerLoader.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HandlerLoader.cpp	2 Jul 2003 04:54:23 -0000	1.2
  +++ HandlerLoader.cpp	4 Aug 2003 06:36:43 -0000	1.3
  @@ -89,12 +89,12 @@
               
   		if (LoadLib())
   		{      
  -			printf("LoadLib success\n");
  +//			printf("LoadLib success\n");
   			m_Create = GetCreate();
   			m_Delete = GetDelete();
   			if (!m_Create || !m_Delete)
   			{
  -				printf("could not get function pointers\n");
  +//				printf("could not get function pointers\n");
   				UnloadLib();
   				m_Handler = 0;
   				return FAIL;
  @@ -104,7 +104,7 @@
   		}
   		else 
   		{
  -			printf("LoadLib failed\n");
  +//			printf("LoadLib failed\n");
   			return FAIL;
   		}
   	}
  @@ -146,7 +146,7 @@
         	if (!m_Handler)
   	{
       
  -		printf("Error is :%s\n",dlerror());
  +//		printf("Error is :%s\n",dlerror());
   	}
     
   #endif
  
  
  
  1.4       +1 -0      xml-axis/c/src/engine/HandlerChain.h
  
  Index: HandlerChain.h
  ===================================================================
  RCS file: /home/cvs/xml-axis/c/src/engine/HandlerChain.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- HandlerChain.h	15 Jul 2003 05:36:21 -0000	1.3
  +++ HandlerChain.h	4 Aug 2003 06:36:43 -0000	1.4
  @@ -87,6 +87,7 @@
   
   	int Invoke(IMessageData* pMsg);
   	void OnFault(IMessageData* pMsg);
  +	int GetType(){return CHAIN_HANDLER;};
   
   private:
   	list<Handler*> m_HandlerList;