in src/configuration/AxisConfiguration.cpp [8:220]
int main( int argc, char * argv[])
{
LIST sDLLNames;
int iConfigInfoArray[eConfigMax];
CHOICELIST sChoiceList[] = { {PLATFORM_TRANSPORTHTTP_PATH, "HTTP Transport library", AXCONF_TRANSPORTHTTP_TAGNAME, eHTTPTransport, eClient},
{PLATFORM_CHANNEL_PATH, "HTTP Channel library", AXCONF_CHANNEL_HTTP_TAGNAME, eHTTPChannel, eClient},
#if WIN32
{"HTTPSSLChannel.dll", "HTTP SSL Channel library", AXCONF_SSLCHANNEL_HTTP_TAGNAME, eHTTPSSLChannel, eClient},
#else
{"libhttp_channelssl.so", "HTTP SSL Channel library", AXCONF_SSLCHANNEL_HTTP_TAGNAME, eHTTPSSLChannel, eClient},
#endif
{PLATFORM_XMLPARSER_PATH, "Axis XML Parser library", AXCONF_XMLPARSER_TAGNAME, eXMLParser, eClientAndServer},
{"SMTPTRANSPORT", "SMTP Transport library", AXCONF_TRANSPORTSMTP_TAGNAME, eSMTPTransport, eClientAndServer},
{"LOG", "client trace log path (only required if you want client trace)", AXCONF_CLIENTLOGPATH_TAGNAME, eClientLog, eClient},
{"WSDD", "client WSDD path", AXCONF_CLIENTWSDDFILEPATH_TAGNAME, eClientWSDD, eClient},
{"LOG", "server trace log path (only required if you want server trace)", AXCONF_LOGPATH_TAGNAME, eServerLog, eServer},
{"WSDD", "server WSDD path", AXCONF_WSDDFILEPATH_TAGNAME, eServerWSDD, eServer},
{"", "root directory", AXCONF_NODENAME_TAGNAME, eUnknown, eServer},
{"", "offset to libraries", AXCONF_LISTENPORT_TAGNAME, eUnknown, eServer},
{"", "SSL Options", AXCONF_SECUREINFO_TAGNAME, eSSLOptions, eClientAndServer},
{"", "progress information", 0, eUnknown, eEmpty},
{"", "merge", 0, eUnknown, eEmpty},
{"", "Axis configuration directory", 0, eUnknown, eEmpty},
{"", "backup existing axiscpp.conf file", 0, eUnknown, eEmpty},
{"", "query missing files", 0, eUnknown, eEmpty}};
bool bSuccess = false;
LIST sFileNameList;
char * psDefaultParamList[eConfigMax];
#if WIN32
char cSlash = '\\';
char * pszPackageName = "axis-c-1.6-Win32-bin\\bin";
#else
char cSlash = '/';
char * pszPackageName = "axis-c-1.6-Linux-bin/bin";
#endif
char szAxisCpp_Deploy[256];
Initialise( &sDLLNames, iConfigInfoArray, &sFileNameList, (char **) psDefaultParamList, szAxisCpp_Deploy, (int) sizeof( szAxisCpp_Deploy));
switch( ReadConfigOptions( argc, argv, (char **) psDefaultParamList, cSlash))
{
case eEmpty:
{
Instructions( pszPackageName);
break;
}
case eClient:
{
char szAxis_Bin[256];
char szAxis_Bin_Default[256];
cout << "Axis Client Configuration" << endl;
cout << "=========================" << endl;
GetHomeAndLibrary( &sDLLNames, szAxisCpp_Deploy, szAxis_Bin, szAxis_Bin_Default, &sFileNameList, (char **) psDefaultParamList, pszPackageName);
int iChoiceCount = 0;
while( sChoiceList[iChoiceCount].eConfigType != eUnknown)
{
if( sChoiceList[iChoiceCount].eConfig & eClient)
{
if( (sChoiceList[iChoiceCount].eConfigType == eClientLog ||
sChoiceList[iChoiceCount].eConfigType == eServerLog))
{
char szLog[256];
bool bAskForFilename = false;
szLog[0] = '\0';
if( sChoiceList[iChoiceCount].eConfigType == eClientLog)
{
if( psDefaultParamList[eClientLog] == NULL)
{
if( StringCompare( psDefaultParamList[eQueryMissingFiles], "ON"))
{
cout << "Enter name of client trace/log file: ";
bAskForFilename = true;
}
}
else
{
if( psDefaultParamList[eClientLog] != NULL)
{
strcpy( szLog, psDefaultParamList[eClientLog]);
}
else
{
strcpy( szLog, "IGNORE");
}
}
}
else
{
if( psDefaultParamList[eServerLog] == NULL)
{
cout << "Enter name of server trace/log file: ";
bAskForFilename = true;
}
else
{
strcpy( szLog, psDefaultParamList[eServerLog]);
}
}
char szFilename[512];
if( szLog[0] == '\0')
{
cin >> szLog;
}
if( StringCompare( "IGNORE", szLog))
{
iConfigInfoArray[sChoiceList[iChoiceCount].eConfigType] = PopulateNewDLLNameInfo( &sDLLNames, NULL, NULL, true);
}
else
{
if( strlen( szAxisCpp_Deploy) > 0)
{
#if WIN32
sprintf( szFilename, "%s\\%s", szAxisCpp_Deploy, szLog);
#else
sprintf( szFilename, "%s/%s", szAxisCpp_Deploy, szLog);
#endif
}
else
{
sprintf( szFilename, "%s", szLog);
}
iConfigInfoArray[sChoiceList[iChoiceCount].eConfigType] = PopulateNewDLLNameInfo( &sDLLNames, szLog, szFilename, true);
}
}
else
{
SelectFileFromList( sChoiceList, iChoiceCount, &sDLLNames, iConfigInfoArray, (char **) psDefaultParamList, &sFileNameList, szAxisCpp_Deploy);
}
}
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;
}
case eServer:
{
char szAxis_Bin[256];
char szAxis_Bin_Default[256];
cout << "Axis Server Configuration" << endl;
cout << "=========================" << endl;
GetHomeAndLibrary( &sDLLNames, szAxisCpp_Deploy, szAxis_Bin, szAxis_Bin_Default, &sFileNameList, (char **) psDefaultParamList, pszPackageName);
bSuccess = true;
break;
}
case eClientAndServer:
{
cout << "Axis Client and Server Configuration" << endl;
bSuccess = true;
break;
}
}
if( bSuccess)
{
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);
return (int) bSuccess;
}