}
muleContext.registerListener(this);
}
catch (Exception e)
{
throw new InitialisationException(e, this);
}
// TODO DO: call registerSupportedProtocol if axisTransportProtocols are set from external?
if (clientProvider == null)
{
clientProvider = createAxisProvider(clientConfig);
}
else
{
if (!DEFAULT_MULE_AXIS_CLIENT_CONFIG.equals(clientConfig))
{
logger.warn(AxisMessages.clientProviderAndClientConfigConfigured());
}
}
if (axis == null)
{
if (serverProvider == null)
{
serverProvider = this.createAxisProvider(serverConfig);
}
else
{
if (!DEFAULT_MULE_AXIS_SERVER_CONFIG.equals(serverConfig))
{
logger.warn(AxisMessages.serverProviderAndServerConfigConfigured());
}
}
// Create the AxisServer
axis = new AxisServer(serverProvider);
// principle of least surprise: doAutoTypes only has effect on our self-configured AxisServer
axis.setOption("axis.doAutoTypes", Boolean.valueOf(doAutoTypes));
}
// Register the Mule service serverProvider
WSDDProvider.registerProvider(QNAME_MULE_PROVIDER, new WSDDJavaMuleProvider(this));
try
{
registerTransportTypes();
}
catch (ClassNotFoundException e)
{
throw new InitialisationException(
CoreMessages.cannotLoadFromClasspath(e.getMessage()), e, this);
}
// Register all our UrlStreamHandlers here so they can be resolved. This is necessary
// to make Mule work in situations where modification of system properties at runtime
// is not reliable, e.g. when running in maven's surefire test executor.
MuleUrlStreamHandlerFactory.registerHandler("jms", new org.mule.transport.soap.axis.transport.jms.Handler());
MuleUrlStreamHandlerFactory.registerHandler("pop3", new org.mule.transport.soap.axis.transport.pop3.Handler());
MuleUrlStreamHandlerFactory.registerHandler("smtp", new org.mule.transport.soap.axis.transport.smtp.Handler());
MuleUrlStreamHandlerFactory.registerHandler("vm", new org.mule.transport.soap.axis.transport.vm.Handler());
try
{
registerTypes((TypeMappingRegistryImpl) axis.getTypeMappingRegistry(), beanTypes);
}
catch (ClassNotFoundException e)
{
throw new InitialisationException(e, this);
}
}