Package org.apache.axis2.deployment

Examples of org.apache.axis2.deployment.AxisConfigBuilder


        try {
            URL url = resourceLoader.getResource("org/apache/tuscany/binding/axis2/engine/config/axis2.xml");

            InputStream serviceInputStream = url.openStream();
            AxisConfigBuilder axisConfigBuilder = new AxisConfigBuilder(serviceInputStream, new DeploymentEngine(), axisConfiguration);
            axisConfigBuilder.populateConfig();
            serviceInputStream.close();
            return ConfigurationContextFactory.createConfigurationContext(this);
        } catch (IOException e) {

            throw new ServiceRuntimeException(e);
View Full Code Here


        axisConfig.addObservers(interceptor);

        setHostName(axisConfig);

        //TCCL will be based on OSGi
        AxisConfigBuilder builder = new AxisConfigBuilder(in, axisConfig, this);
        builder.populateConfig();
        try {
            if (in != null) {
                in.close();
            }
        } catch (IOException e) {
View Full Code Here

                    "AxisConfiguration";
            log.error(msg, e);
            throw new DeploymentException(msg, e);
        }
        //TCCL will be based on OSGi
        AxisConfigBuilder builder =
                new AxisConfigBuilder(in, axisConfig, this);
        builder.populateConfig();
        /* if user is starting multiple instances change the default port numbers before starting Transports */
        if(CarbonUtils.isChildNode()){
            try{
                OMElement element = (OMElement) XMLUtils.toOM(getAxis2XmlInputStream());
                Iterator trs_Reivers =
                        element.getChildrenWithName(new QName(TAG_TRANSPORT_RECEIVER));
                while(trs_Reivers.hasNext()){
                    OMElement transport = (OMElement) trs_Reivers.next();
                    String transportType = transport.getAttributeValue(new QName(ATTRIBUTE_NAME));
                    Iterator itr = transport.getChildrenWithName(new QName(TAG_PARAMETER));
                    while (itr.hasNext()) {
                        OMElement parameterElement = (OMElement) itr.next();
                        OMAttribute paramName = parameterElement.getAttribute(new QName(ATTRIBUTE_NAME));
                        if("port".equals(paramName.getAttributeValue())){
                            if("http".equals(transportType)){
                                parameterElement.setText(System.getProperty("niohttpPort"));
                            }else if("https".equals(transportType)){
                                parameterElement.setText(System.getProperty("niohttpsPort"));                               
                            }
                        }
                    }
                }
                builder.processTransportReceivers(element.getChildrenWithName(new QName(TAG_TRANSPORT_RECEIVER)));
            }catch(Exception e){
                log.error("Error Reading axis2.xml",e);
            }
        }
        try {
View Full Code Here

     */
    public static ConfigurationContext createBasicConfigurationContext(String resourceName) throws Exception {
        InputStream in = Loader.getResourceAsStream(resourceName);

        AxisConfiguration axisConfig = new AxisConfiguration();
        AxisConfigBuilder builder = new AxisConfigBuilder(in, axisConfig, null);
        builder.populateConfig();
        axisConfig.validateSystemPredefinedPhases();
        ConfigurationContext configContext = new ConfigurationContext(axisConfig);

        if (axisConfig.getClusterManager() != null) {
            configContext.initCluster();
View Full Code Here

      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().
View Full Code Here

        //TODO; TBD
    }

    public AxisConfiguration populateAxisConfiguration(InputStream in) throws DeploymentException {
        axisConfig = new AxisConfiguration();
        AxisConfigBuilder builder =
                new AxisConfigBuilder(in, axisConfig, this);
        builder.populateConfig();
        try {
            if (in != null) {
                in.close();
            }
        } catch (IOException e) {
View Full Code Here

        Thread currentThread = Thread.currentThread();
        ClassLoader savedTCCL = currentThread.getContextClassLoader();
        currentThread.setContextClassLoader(OSGiServerConfigurator.class.getClassLoader());
        try {
            axisConfig = new AxisConfiguration();
            AxisConfigBuilder builder =
                    new AxisConfigBuilder(in, axisConfig, this);
            builder.populateConfig();
            try {
                if (in != null) {
                    in.close();
                }
            } catch (IOException e) {
View Full Code Here

            deploymentFileData.setClassLoader(isDirectory, getClass().getClassLoader(),
                    (File) cfgCtx.getAxisConfiguration().getParameterValue(
                            Constants.Configuration.ARTIFACTS_TEMP_DIR),
                    cfgCtx.getAxisConfiguration().isChildFirstClassLoading());

            DeploymentClassLoader urlCl
                = (DeploymentClassLoader)deploymentFileData.getClassLoader();
            Thread.currentThread().setContextClassLoader(urlCl);

            // StartupFactory registration
            for (StartupFactory factory : getProviders(StartupFactory.class, urlCl)) {
View Full Code Here

    private void handleException(String message, Exception e) throws DeploymentException {
        if (log.isDebugEnabled()) {
            log.debug(message, e);
        }
        throw new DeploymentException(message, e);
    }
View Full Code Here

    private void handleException(String message, Throwable t) throws DeploymentException {
        if (log.isDebugEnabled()) {
            log.debug(message, t);
        }
        throw new DeploymentException(message, t);
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.deployment.AxisConfigBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.