axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sanj...@apache.org
Subject cvs commit: ws-axis/c/src/wsdd WSDDDocument.cpp
Date Thu, 06 Nov 2003 07:24:06 GMT
sanjaya     2003/11/05 23:24:06

  Modified:    c/src/wsdd Tag: Release-2003_10_26-bugfixes_branch
                        WSDDDocument.cpp
  Log:
  fix for bug 23556
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.23.2.1  +40 -4     ws-axis/c/src/wsdd/WSDDDocument.cpp
  
  Index: WSDDDocument.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdd/WSDDDocument.cpp,v
  retrieving revision 1.23
  retrieving revision 1.23.2.1
  diff -u -r1.23 -r1.23.2.1
  --- WSDDDocument.cpp	26 Oct 2003 07:28:44 -0000	1.23
  +++ WSDDDocument.cpp	6 Nov 2003 07:24:06 -0000	1.23.2.1
  @@ -386,16 +386,52 @@
   void WSDDDocument::AddAllowedMethodsToService(const AxisXMLCh* value)
   {
   	AxisString sValue = value;
  -	int prepos = 0, pos = 0;
  +	int prepos = 0, pos = 0, len = 0;
  +	/*
  +	Fix for bug 23556.
  +	This routine makes sure that the value of allowedMethods (a list
  +	of method names separated by spaces) in the WSDD file is immune 
  +	to having trailing and leading spaces, and multiple spaces 
  +	between items.
  +	*/
   	if (sValue.find('*') == AxisString::npos)
   	{
  +		len = sValue.length();
   		do 
   		{
   			pos = sValue.find(METHODNAME_SEPARATOR, prepos);
  -			if (AxisString::npos == pos) break;
  -			m_pService->AddAllowedMethod(sValue.substr(prepos, pos-prepos).c_str());
  -			prepos = pos + 1;
  +
  +			if((AxisString::npos != pos) && (pos!=prepos))
  +			{
  +				m_pService->AddAllowedMethod(sValue.substr(prepos, pos-prepos).c_str());
  +			}
  +			else if (AxisString::npos != pos)
  +			{
  +				prepos = pos+1;
  +			}
  +			else if (strchr(sValue.substr(prepos, len-(prepos+1)).c_str(), METHODNAME_SEPARATOR)==NULL
&& (len!=prepos))
  +			{
  +				m_pService->AddAllowedMethod(sValue.substr(prepos, len-(prepos-1)).c_str());
  +				break;
  +			}
  +			else
  +			{
  +				break;
  +			}
  +
  +			prepos = pos+1;
  +
   		} while (true);
  +
  +			list<string>::iterator iter;
  +			list<string> xxx = m_pService->getAllowedMethods();
  +			printf("comes here");
  +			for(iter=xxx.begin();iter!=xxx.end();iter++)
  +			{
  +				printf("xxxxxxxxxxxxxx%sYYYYYYY\n",(*iter).c_str());
  +			}
  +
  +
   	}
   }
   
  
  
  

Mime
View raw message