You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by pr...@apache.org on 2006/03/24 00:23:42 UTC

svn commit: r388294 - in /webservices/axis/trunk/c: build/ src/configuration/

Author: prestonf
Date: Thu Mar 23 15:23:39 2006
New Revision: 388294

URL: http://svn.apache.org/viewcvs?rev=388294&view=rev
Log:
Changes to make test.xml use AxisConfiguration executable to configure the axiscpp.conf file.

Modified:
    webservices/axis/trunk/c/build/executeTest.xml
    webservices/axis/trunk/c/src/configuration/AxisConfiguration.cpp
    webservices/axis/trunk/c/src/configuration/AxisConfiguration.hpp
    webservices/axis/trunk/c/src/configuration/AxisConfigurationLibraries.cpp
    webservices/axis/trunk/c/src/configuration/FileFunctions.cpp
    webservices/axis/trunk/c/src/configuration/FileFunctions.hpp

Modified: webservices/axis/trunk/c/build/executeTest.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/build/executeTest.xml?rev=388294&r1=388293&r2=388294&view=diff
==============================================================================
--- webservices/axis/trunk/c/build/executeTest.xml (original)
+++ webservices/axis/trunk/c/build/executeTest.xml Thu Mar 23 15:23:39 2006
@@ -316,6 +316,33 @@
 			<istrue value="${testconf.client.parser.xerces}"/>
 		</condition>
 
+		<exec dir="${dir.bin}" executable="${axisConfigurationExecutableName}${executableSuffix}">
+			<arg line="Client -acd  ${confFileDirectory}
+						-th ${dir.libraries}/${libraryPrefix}${transportLibraryName}${librarySuffix}
+						-c  ${dir.libraries}/${libraryPrefix}${HTTP.ChannelLibraryName}${librarySuffix}
+						-cs ${dir.libraries}/${libraryPrefix}${HTTP.SecureChannelLibraryName}${librarySuffix}
+						-x  ${dir.libraries}/${ClientParserLib}
+						-cl ignore
+						-so ${env.SSL_KEYS_HOME}/myKeyRing.kdb,axis4all,AXIS,NONE,05,NONE,false
+						-b  false
+						-v  quiet"
+			/>
+		</exec>
+	</target>
+
+	<target name="createConfigurationFileOld" depends="checkIfDebug" if="successfulClientCompilation">
+		<dirname file="${axiscpp.conf}" property="confFileDirectory"/>
+
+		<mkdir dir="${confFileDirectory}"/>
+
+		<!-- Select which parser library to use -->
+		<condition property="ClientParserLib" value="${libraryPrefix}${xml4c.xmlParserLibraryName}${librarySuffix}">
+			<istrue value="${testconf.client.parser.xml4c}"/>
+		</condition>
+		<condition property="ClientParserLib" value="${libraryPrefix}${xerces.xmlParserLibraryName}${librarySuffix}">
+			<istrue value="${testconf.client.parser.xerces}"/>
+		</condition>
+
 		<echo file="${axiscpp.conf}">#Available directives are as follows:
 #
 # ClientLogPath:	 The path to the client log

Modified: webservices/axis/trunk/c/src/configuration/AxisConfiguration.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/configuration/AxisConfiguration.cpp?rev=388294&r1=388293&r2=388294&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/configuration/AxisConfiguration.cpp (original)
+++ webservices/axis/trunk/c/src/configuration/AxisConfiguration.cpp Thu Mar 23 15:23:39 2006
@@ -24,9 +24,10 @@
 									  {"WSDD",						"server WSDD path",													AXCONF_WSDDFILEPATH_TAGNAME,		eServerWSDD,		eServer},
 									  {"",							"",																	AXCONF_NODENAME_TAGNAME,			eUnknown,			eServer},
 									  {"",							"",																	AXCONF_LISTENPORT_TAGNAME,			eUnknown,			eServer},
-									  {"",							"",																	AXCONF_SECUREINFO_TAGNAME,			eUnknown,			eClientAndServer},
+									  {"",							"SSL Options",														AXCONF_SECUREINFO_TAGNAME,			eSSLOptions,		eClientAndServer},
 									  {"",							"Root directory",													0,									eUnknown,			eEmpty},
-									  {"",							"library offset directory",											0,									eUnknown,			eEmpty}};
+									  {"",							"library offset directory",											0,									eUnknown,			eEmpty},
+									  {"",							"volume of output",													0,									eUnknown,			eClientAndServer}};
 	bool			bSuccess = false;
 	LIST			sFileNameList;
 	char *			psDefaultParamList[eConfigMax];
@@ -130,8 +131,8 @@
 			cout << "    if -a has been defined, then only the filename is required." << endl;
 			cout << "    Otherwise the fully qualified path will be required." << endl;
 			cout << "    (NB: You can still override the -a and -o definitions by using" << endl;
-			cout << "    a fully qulified path)." << endl;
-			cout << "    example (with -a defined): " << endl;
+			cout << "    a fully qulified path).  To ignore the client log, using 'ignore'" << endl;
+			cout << "    instead of a filename.  Example (with -a defined): " << endl;
 			cout << "    -cl client.log" << endl;
 			cout << "    example (without -a defined): " << endl;
 #if WIN32
@@ -235,13 +236,19 @@
 							cin >> szLog;
 						}
 
+						if( StringCompare( "IGNORE", szLog))
+						{
+							iConfigInfoArray[sChoiceList[iChoiceCount].eConfigType] = PopulateNewDLLNameInfo( &sDLLNames, NULL, NULL, true);
+						}
+						else
+						{
 #if WIN32
-						sprintf( szFilename, "%s\\%s", szAxisCpp_Deploy, szLog);
+							sprintf( szFilename, "%s\\%s", szAxisCpp_Deploy, szLog);
 #else
-						sprintf( szFilename, "%s/%s", szAxisCpp_Deploy, szLog);
+							sprintf( szFilename, "%s/%s", szAxisCpp_Deploy, szLog);
 #endif
-
-						iConfigInfoArray[sChoiceList[iChoiceCount].eConfigType] = PopulateNewDLLNameInfo( &sDLLNames, szLog, szFilename, true);
+							iConfigInfoArray[sChoiceList[iChoiceCount].eConfigType] = PopulateNewDLLNameInfo( &sDLLNames, szLog, szFilename, true);
+						}
 					}
 					else
 					{
@@ -252,6 +259,16 @@
 				iChoiceCount++;
 			}
 
+			if( psDefaultParamList[eSSLOptions] != NULL)
+			{
+				iConfigInfoArray[eSSLOptions] = PopulateNewDLLNameInfo( &sDLLNames, NULL, psDefaultParamList[eSSLOptions], true);
+			}
+
+			if( psDefaultParamList[eAxisConfigDir] != NULL)
+			{
+				iConfigInfoArray[eAxisConfigDir] = PopulateNewDLLNameInfo( &sDLLNames, NULL, psDefaultParamList[eAxisConfigDir], true);
+			}
+
 			bSuccess = true;
 
 			break;
@@ -283,7 +300,14 @@
 
 	if( bSuccess)
 	{
-		WriteAxisConfigFile( &sDLLNames, iConfigInfoArray, sChoiceList, StringCompare( psDefaultParamList[eMerge], "on"), szAxisCpp_Deploy, cSlash);
+		if( psDefaultParamList[eAxisConfigDir] == NULL)
+		{
+			WriteAxisConfigFile( &sDLLNames, iConfigInfoArray, sChoiceList, StringCompare( psDefaultParamList[eMerge], "on"), szAxisCpp_Deploy, cSlash, StringCompare( psDefaultParamList[eBackup], "true"));
+		}
+		else
+		{
+			WriteAxisConfigFile( &sDLLNames, iConfigInfoArray, sChoiceList, StringCompare( psDefaultParamList[eMerge], "on"), psDefaultParamList[eAxisConfigDir], cSlash, StringCompare( psDefaultParamList[eBackup], "true"));
+		}
 	}
 
 	Destroy( &sDLLNames, &sFileNameList, (char **) psDefaultParamList);
@@ -305,11 +329,19 @@
 							  {eRootDirectory,	"A"},
 							  {eOffsetToLibs,	"O"},
 							  {eServerWSDD,		"SW"},
+							  {eSSLOptions,		"SO"},
+							  {eVolume,			"V"},
+							  {eAxisConfigDir,	"ACD"},
+							  {eBackup,			"B"},
 							  {eMerge,			"M"}};
 
 	ppsDefaultParamList[eMerge] = (char *) malloc( strlen( "off "));
+	ppsDefaultParamList[eVolume] = (char *) malloc( strlen( "normal "));
+	ppsDefaultParamList[eBackup] = (char *) malloc( strlen( "true "));
 
 	strcpy( ppsDefaultParamList[eMerge], "off");
+	strcpy( ppsDefaultParamList[eVolume], "normal");
+	strcpy( ppsDefaultParamList[eBackup], "true");
 
 	for( int iCount = 0; iCount < iParamCount; iCount++)
 	{
@@ -353,7 +385,9 @@
 					if( ppsDefaultParamList[eOffsetToLibs] != NULL &&
 						ppsDefaultParamList[eRootDirectory] != NULL &&
 						!(sOptions[iIndex].eConfType == eClientLog || 
-						  sOptions[iIndex].eConfType == eServerLog) &&
+						  sOptions[iIndex].eConfType == eServerLog ||
+						  sOptions[iIndex].eConfType == eBackup ||
+						  sOptions[iIndex].eConfType == eSSLOptions) &&
 						strchr( pParamArray[iCount], cSlash) == NULL)
 					{
 						char	szLocation[512];
@@ -387,95 +421,89 @@
 {
 	char *	pszCurrentAxisCppDeployEnv = getenv( "AXISCPP_DEPLOY");
 
-	if( ppsDefaultParamList[eRootDirectory] == NULL)
+	if( ppsDefaultParamList[eAxisConfigDir] == NULL)
 	{
+		if( ppsDefaultParamList[eRootDirectory] == NULL)
+		{
 #if WIN32
-		cout << "Type in the Axis fully qualified directory path (e.g. C:\\Axis)" << endl
-			<< "used when Axis was unzipped (NB: this directory must also contain the" << endl
-			<< "axiscpp.conf file).";
+			cout << "Type in the Axis fully qualified directory path (e.g. C:\\Axis)" << endl
+				<< "used when Axis was unzipped (NB: this directory must also contain the" << endl
+				<< "axiscpp.conf file).";
 #else
-		cout << "Type in the Axis fully qualified directory path (e.g. /home/Axis)" << endl
-			<< "used when Axis was unzipped (NB: this directory must also contain the" << endl
-			<< "etc/axiscpp.conf file).";
+			cout << "Type in the Axis fully qualified directory path (e.g. /home/Axis)" << endl
+				<< "used when Axis was unzipped (NB: this directory must also contain the" << endl
+				<< "etc/axiscpp.conf file).";
 #endif
-		if( pszCurrentAxisCppDeployEnv != NULL)
-		{
-			cout << "  Type '*' to used the existing value of the environment" << endl;
-			cout << "variable (i.e. '" << pszCurrentAxisCppDeployEnv << "').";
-		}
+			if( pszCurrentAxisCppDeployEnv != NULL)
+			{
+				cout << "  Type '*' to used the existing value of the environment" << endl;
+				cout << "variable (i.e. '" << pszCurrentAxisCppDeployEnv << "').";
+			}
 
-		cout << endl << "AXISCPP_DEPLOY = ";
-		cin >> pszAxisCpp_Deploy;
+			cout << endl << "AXISCPP_DEPLOY = ";
+			cin >> pszAxisCpp_Deploy;
 
-		if( *pszAxisCpp_Deploy == '*' && pszCurrentAxisCppDeployEnv != NULL)
+			if( *pszAxisCpp_Deploy == '*' && pszCurrentAxisCppDeployEnv != NULL)
+			{
+				strcpy( pszAxisCpp_Deploy, pszCurrentAxisCppDeployEnv);
+			}
+		}
+		else
 		{
-			strcpy( pszAxisCpp_Deploy, pszCurrentAxisCppDeployEnv);
+			strcpy( pszAxisCpp_Deploy, ppsDefaultParamList[eRootDirectory]);
 		}
-	}
-	else
-	{
-		strcpy( pszAxisCpp_Deploy, ppsDefaultParamList[eRootDirectory]);
-	}
 
-	if( ppsDefaultParamList[eOffsetToLibs] != NULL)
-	{
-		strcpy( pszAxis_Bin, ppsDefaultParamList[eOffsetToLibs]);
-
-		if( !CheckAxisBinDirectoryExists( pszAxisCpp_Deploy, pszAxis_Bin, pszAxis_Bin_Default, psDLLNames, psFileNameList))
+		if( ppsDefaultParamList[eOffsetToLibs] != NULL)
 		{
-			cout << "Axis binaries directory not found." << endl;
+			strcpy( pszAxis_Bin, ppsDefaultParamList[eOffsetToLibs]);
+
+			if( !CheckAxisBinDirectoryExists( pszAxisCpp_Deploy, pszAxis_Bin, pszAxis_Bin_Default, psDLLNames, psFileNameList))
+			{
+				cout << "Axis binaries directory not found." << endl;
 
-			free( (void *) ppsDefaultParamList[eOffsetToLibs]);
+				free( (void *) ppsDefaultParamList[eOffsetToLibs]);
 
-			ppsDefaultParamList[eOffsetToLibs] = NULL;
+				ppsDefaultParamList[eOffsetToLibs] = NULL;
+			}
 		}
-	}
 
-//	strcpy( pszAxis_Bin_Default, pszAxisCpp_Deploy);
-//
-//#if WIN32
-//	strcat( pszAxis_Bin_Default, "\\");
-//#else
-//	strcat( pszAxis_Bin_Default, "/");
-//#endif
-//
-	strcpy( pszAxis_Bin_Default, pszPackageName);
+		strcpy( pszAxis_Bin_Default, pszPackageName);
 
-	if( ppsDefaultParamList[eOffsetToLibs] == NULL)
-	{
-		if( pszCurrentAxisCppDeployEnv == NULL)
+		if( ppsDefaultParamList[eOffsetToLibs] == NULL)
 		{
-			cout << endl << "Instruction:" << endl
-				 << "You will need to create an environment variable called " << endl
-				 << "\"AXISCPP_DEPLOY\" and set it to " << pszAxisCpp_Deploy << "." << endl
-				 << "On the command line this would be:-" << endl
+			if( pszCurrentAxisCppDeployEnv == NULL)
+			{
+				cout << endl << "Instruction:" << endl
+					 << "You will need to create an environment variable called " << endl
+					 << "\"AXISCPP_DEPLOY\" and set it to " << pszAxisCpp_Deploy << "." << endl
+					 << "On the command line this would be:-" << endl
 #if WIN32
-				 << "SET AXISCPP_DEPLOY=" << pszAxisCpp_Deploy << endl;
+					 << "SET AXISCPP_DEPLOY=" << pszAxisCpp_Deploy << endl;
 #else
-				 << "EXPORT AXISCPP_DEPLOY=" << pszAxisCpp_Deploy << endl;
+					 << "EXPORT AXISCPP_DEPLOY=" << pszAxisCpp_Deploy << endl;
 #endif
-		}
+			}
 
-		cout << endl;
+			cout << endl;
 
-		do
-		{
+			do
+			{
 #if WIN32
-			cout << "Type in the directory where the Axis libraries (e.g. axis_client.dll) can be" << endl
+				cout << "Type in the directory where the Axis libraries (e.g. axis_client.dll) can be" << endl
 					<< "found.  (If you type '*', it will use the default '" << pszAxis_Bin_Default << "')." << endl;
 #else
-			cout << "Type in the directory where the Axis libraries (e.g. axis_client.so) can be" << endl
+				cout << "Type in the directory where the Axis libraries (e.g. axis_client.so) can be" << endl
 					<< "found.  (If you type '*', it will use the default '" << pszAxis_Bin_Default << "')." << endl;
 #endif
-			cout << "Axis binaries directory = ";
-			cin >> pszAxis_Bin;
+				cout << "Axis binaries directory = ";
+				cin >> pszAxis_Bin;
 
-			if( !strcmp( pszAxis_Bin, "*"))
-			{
-				strcpy( pszAxis_Bin, pszAxis_Bin_Default);
-			}
+				if( !strcmp( pszAxis_Bin, "*"))
+				{
+					strcpy( pszAxis_Bin, pszAxis_Bin_Default);
+				}
+			} while( !CheckAxisBinDirectoryExists( pszAxisCpp_Deploy, pszAxis_Bin, pszAxis_Bin_Default, psDLLNames, psFileNameList));
 		}
-		while( !CheckAxisBinDirectoryExists( pszAxisCpp_Deploy, pszAxis_Bin, pszAxis_Bin_Default, psDLLNames, psFileNameList));
 	}
 
 	cout << endl << "Begin to configure the AXISCPP.CONF file." << endl;

Modified: webservices/axis/trunk/c/src/configuration/AxisConfiguration.hpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/configuration/AxisConfiguration.hpp?rev=388294&r1=388293&r2=388294&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/configuration/AxisConfiguration.hpp (original)
+++ webservices/axis/trunk/c/src/configuration/AxisConfiguration.hpp Thu Mar 23 15:23:39 2006
@@ -33,7 +33,11 @@
 	eServerWSDD,
 	eRootDirectory,
 	eOffsetToLibs,
+	eSSLOptions,
+	eVolume,
 	eMerge,
+	eAxisConfigDir,
+	eBackup,
 	eConfigMax
 } ECONFIGTYPE;
 

Modified: webservices/axis/trunk/c/src/configuration/AxisConfigurationLibraries.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/configuration/AxisConfigurationLibraries.cpp?rev=388294&r1=388293&r2=388294&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/configuration/AxisConfigurationLibraries.cpp (original)
+++ webservices/axis/trunk/c/src/configuration/AxisConfigurationLibraries.cpp Thu Mar 23 15:23:39 2006
@@ -23,13 +23,22 @@
 
 	if( bFound)
 	{
-		sReturn = "#Path to ";
-		sReturn += psChoiceList[iIndex].pszElementDescription;
-		sReturn += "\n";
+		if( eConfigType == eSSLOptions)
+		{
+			sReturn = "# ";
+			sReturn += psChoiceList[iIndex].pszElementDescription;
+			sReturn += "\n";
+		}
+		else
+		{
+			sReturn = "# Path to ";
+			sReturn += psChoiceList[iIndex].pszElementDescription;
+			sReturn += "\n";
+		}
 	}
 	else
 	{
-		sReturn = "#Path to an unknown element\n";
+		sReturn = "# Path to an unknown element\n";
 	}
 
 	char	szReturn[256];

Modified: webservices/axis/trunk/c/src/configuration/FileFunctions.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/configuration/FileFunctions.cpp?rev=388294&r1=388293&r2=388294&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/configuration/FileFunctions.cpp (original)
+++ webservices/axis/trunk/c/src/configuration/FileFunctions.cpp Thu Mar 23 15:23:39 2006
@@ -131,7 +131,7 @@
 	return bFound;
 }
 
-void WriteAxisConfigFile( LIST * psDLLNames, int * piConfigInfoArray, CHOICELIST * psChoiceList, bool bMerge, char * pszAxisCpp_Deploy, char cSlash)
+void WriteAxisConfigFile( LIST * psDLLNames, int * piConfigInfoArray, CHOICELIST * psChoiceList, bool bMerge, char * pszAxisCpp_Deploy, char cSlash, bool bBackup)
 {
 	char	szFilename[256];
 
@@ -139,7 +139,10 @@
 
 	cout << endl << "Configuration complete." << endl << endl;
 
-	BackUpExistingConfigFile( pszAxisCpp_Deploy, szFilename, cSlash);
+	if( bBackup)
+	{
+		BackUpExistingConfigFile( pszAxisCpp_Deploy, szFilename, cSlash);
+	}
 
 	if( bMerge)
 	{
@@ -286,6 +289,7 @@
 		WriteLineToFile( pFile, CreateConfigElement( psDLLNames, piConfigInfoArray, psChoiceList, eXMLParser));
 		WriteLineToFile( pFile, CreateConfigElement( psDLLNames, piConfigInfoArray, psChoiceList, eHTTPChannel));
 		WriteLineToFile( pFile, CreateConfigElement( psDLLNames, piConfigInfoArray, psChoiceList, eHTTPSSLChannel));
+		WriteLineToFile( pFile, CreateConfigElement( psDLLNames, piConfigInfoArray, psChoiceList, eSSLOptions));
 
 		fclose( pFile);
 	}

Modified: webservices/axis/trunk/c/src/configuration/FileFunctions.hpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/configuration/FileFunctions.hpp?rev=388294&r1=388293&r2=388294&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/configuration/FileFunctions.hpp (original)
+++ webservices/axis/trunk/c/src/configuration/FileFunctions.hpp Thu Mar 23 15:23:39 2006
@@ -9,7 +9,7 @@
 #include "AxisConfiguration.hpp"
 
 bool ReadFilenamesInaDirectory( char * pszDirName, LIST * psFileNameList);
-void WriteAxisConfigFile( LIST * psDLLNames, int * piConfigInfoArray, CHOICELIST * psChoiceList, bool bMerge, char * pszAxisCpp_Deploy, char cSlash);
+void WriteAxisConfigFile( LIST * psDLLNames, int * piConfigInfoArray, CHOICELIST * psChoiceList, bool bMerge, char * pszAxisCpp_Deploy, char cSlash, bool bBackup);
 bool BackUpExistingConfigFile( char * pszAxisCpp_Deploy, char * pszFilename, char cSlash);
 void WriteLineToFile( FILE * pFile, char * pszData);
 long GetFileLength( FILE * pFile);