/* Technically, we are supposed to use Axis's EngineConfigurationFactory
* but it is a big PITA and seems uneccessary. This can be changed
* in the future if more flexible mechanisms of loading the
* configuration are needed.
*/
FileProvider fileProvider = null;
if ( serverConfig.equals("") )
{
getLogger().debug( "Using default server-config.wsdd." );
InputStream is = this.getClass().getResourceAsStream( DEFAULT_SERVER_CONFIG );
if ( is == null )
throw new RuntimeException( "Configuration is null!" );
fileProvider = new FileProvider( DEFAULT_SERVER_CONFIG );
fileProvider.setInputStream( is );
}
else
{
getLogger().debug( "Using server-config " + serverConfig + "." );
File configFile = null;
try
{
configFile = AvalonContextUtilities.getFile(context, serverConfig);
}
catch (Exception e)
{
e.printStackTrace();
}
getLogger().info( "Found AXIS configuration at " + configFile.getAbsolutePath() );
fileProvider = new FileProvider( new FileInputStream(configFile) );
}
/* Wrap the FileProvider with a SimpleProvider. This needs to be done
* because the only way to expose services with the FileProvider is to
* use WSDD deployment descriptors. SimpleProvider allows us to deploy