Search in sources :

Example 1 with AxisConfigBuilder

use of org.apache.axis2.deployment.AxisConfigBuilder in project pentaho-platform by pentaho.

the class AbstractAxisConfigurator method getAxisConfiguration.

/**
 * Creates the AxisConfiguration object using an XML document. Subclasses of this class must provide the XML via an
 * input stream. The concrete implementation can store the XML file wherever it wants as we only need an InputStream
 */
public AxisConfiguration getAxisConfiguration() throws AxisFault {
    if (axisConfig != null) {
        // we have already initialized
        return axisConfig;
    }
    try {
        // create a new AxisConfiguration
        axisConfig = new AxisConfiguration();
        // get the config XML input stream
        InputStream in = getConfigXml();
        // build the configuration
        AxisConfigBuilder builder = new AxisConfigBuilder(in, axisConfig, null);
        builder.populateConfig();
    } catch (Exception e) {
        e.printStackTrace();
        throw AxisFault.makeFault(e);
    }
    // set this object as the Axis configurator. Axis will call loadServices().
    axisConfig.setConfigurator(this);
    return axisConfig;
}
Also used : AxisConfiguration(org.apache.axis2.engine.AxisConfiguration) InputStream(java.io.InputStream) AxisConfigBuilder(org.apache.axis2.deployment.AxisConfigBuilder)

Aggregations

InputStream (java.io.InputStream)1 AxisConfigBuilder (org.apache.axis2.deployment.AxisConfigBuilder)1 AxisConfiguration (org.apache.axis2.engine.AxisConfiguration)1