Package org.apache.axis2.deployment

Examples of org.apache.axis2.deployment.DeploymentException


            }
        } else {
            String msg = "Artifact representing the filename "
                    + fileName + " is not deployed on Synapse";
            log.error(msg);
            throw new DeploymentException(msg);
        }

        if (log.isDebugEnabled()) {
            log.debug("UnDeployment of the synapse artifact from file : "
                    + fileName + " : COMPLETED");
View Full Code Here


    protected SynapseConfiguration getSynapseConfiguration() throws DeploymentException {
        Parameter synCfgParam =
                cfgCtx.getAxisConfiguration().getParameter(SynapseConstants.SYNAPSE_CONFIG);
        if (synCfgParam == null) {
            throw new DeploymentException("SynapseConfiguration not found. " +
                    "Unable to continue the deployment operation.");
        }
        return (SynapseConfiguration) synCfgParam.getValue();
    }
View Full Code Here

    protected SynapseEnvironment getSynapseEnvironment() throws DeploymentException {
        Parameter synCfgParam =
                cfgCtx.getAxisConfiguration().getParameter(SynapseConstants.SYNAPSE_ENV);
        if (synCfgParam == null) {
            throw new DeploymentException("SynapseEnvironment not found. " +
                    "Unable to continue the deployment operation.");
        }
        return (SynapseEnvironment) synCfgParam.getValue();
    }
View Full Code Here

            throws DeploymentException {
        Parameter serverCfgParam =
                cfgCtx.getAxisConfiguration().getParameter(
                        SynapseConstants.SYNAPSE_SERVER_CONFIG_INFO);
        if (serverCfgParam == null) {
            throw new DeploymentException("SynapseConfigurationInformation not found. " +
                    "Unable to continue the deployment operation.");
        }
        return (ServerConfigurationInformation) serverCfgParam.getValue();
    }
View Full Code Here

            throws DeploymentException {
        Parameter serverCtxParam =
                cfgCtx.getAxisConfiguration().getParameter(
                        SynapseConstants.SYNAPSE_SERVER_CTX_INFO);
        if (serverCtxParam == null) {
            throw new DeploymentException("ServerContextInformation not found. " +
                    "Unable to continue the deployment operation.");
        }
        return (ServerContextInformation) serverCtxParam.getValue();
    }
View Full Code Here

            }           
          
            calculateDefaultModuleVersion(axisConfig.getModules(), axisConfig);
            axisConfig.validateSystemPredefinedPhases();
        } catch (IOException e) {
            throw new DeploymentException(e);
        }
    }
View Full Code Here

            InputStream moduleStream = classLoader.getResourceAsStream("META-INF/module.xml");
            if (moduleStream == null) {
                moduleStream = classLoader.getResourceAsStream("meta-inf/module.xml");
            }
            if (moduleStream == null) {
                throw new DeploymentException(
                        Messages.getMessage(
                                DeploymentErrorMsgs.MODULE_XML_MISSING, moduleUrl.toString()));
            }
            ModuleBuilder moduleBuilder = new ModuleBuilder(moduleStream, module, axisConfig);
            moduleBuilder.populateModule();
        } catch (IOException e) {
            throw new DeploymentException(e);
        }
    }
View Full Code Here

   */
  public static TransportInDescription processTransportReceiver(
            OMElement transport, boolean init) throws DeploymentException {

        if (!TAG_TRANSPORT_RECEIVER.equals(transport.getLocalName())) {
            throw new DeploymentException("Invalid top level element in the transport receiver " +
                    "configuration");
        }

        String name = transport.getAttributeValue(new QName(ATTRIBUTE_NAME));
        if (name == null || "".equals(name)) {
            throw new DeploymentException("Transport name is not specified in the receiver " +
                    "configuration");
        }

        String className = transport.getAttributeValue(new QName(ATTRIBUTE_CLASS));
        if (className == null || "".equals(className)) {
            throw new DeploymentException("Class name is not specified in the receiver " +
                    "configuration");
        }

        TransportInDescription transportIn = new TransportInDescription(name);
        if (init) {
            try {
                Class clazz = TransportBuilderUtils.class.getClassLoader().loadClass(className);
                TransportListener listener = (TransportListener) clazz.newInstance();
                transportIn.setReceiver(listener);
            } catch (Exception e) {
                throw new DeploymentException("Error while initializing transport receiver", e);
            }
        }

        Iterator itr = transport.getChildrenWithName(new QName(TAG_PARAMETER));
        processParameters(itr, transportIn);
View Full Code Here

   */
    public static TransportOutDescription processTransportSender(
            OMElement transport, boolean init) throws DeploymentException {

        if (!TAG_TRANSPORT_SENDER.equals(transport.getLocalName())) {
            throw new DeploymentException("Invalid top level element in the transport sender " +
                    "configuration");
        }

        String name = transport.getAttributeValue(new QName(ATTRIBUTE_NAME));
        if (name == null || "".equals(name)) {
            throw new DeploymentException("Transport name is not specified in the receiver " +
                    "configuration");
        }

        String className = transport.getAttributeValue(new QName(ATTRIBUTE_CLASS));
        if (className == null || "".equals(className)) {
            throw new DeploymentException("Class name is not specified in the receiver " +
                    "configuration");
        }

        TransportOutDescription transportOut = new TransportOutDescription(name);
        if (init) {
            try {
                Class clazz = TransportBuilderUtils.class.getClassLoader().loadClass(className);
                TransportSender sender = (TransportSender) clazz.newInstance();
                transportOut.setSender(sender);
            } catch (Exception e) {
                throw new DeploymentException("Error while initializing transport sender", e);
            }
        }

        Iterator itr = transport.getChildrenWithName(new QName(TAG_PARAMETER));
        processParameters(itr, transportOut);
View Full Code Here

      // setting parameterElement
      parameter.setParameterElement(parameterElement);
      // setting parameter Name
      OMAttribute paramName = parameterElement.getAttribute(new QName(ATTRIBUTE_NAME));
      if (paramName == null) {
        throw new DeploymentException(Messages.getMessage(
            DeploymentErrorMsgs.BAD_PARAMETER_ARGUMENT, parameterElement.toString()));
      }
      parameter.setName(paramName.getAttributeValue());
      // setting parameter Value (the child element of the parameter)
      OMElement paramValue = parameterElement.getFirstElement();
      if (paramValue != null) {
        parameter.setValue(parameterElement);
        parameter.setParameterType(Parameter.OM_PARAMETER);
      } else {
        String paratextValue = parameterElement.getText();
        parameter.setValue(paratextValue);
        parameter.setParameterType(Parameter.TEXT_PARAMETER);
      }
      // setting locking attribute
      OMAttribute paramLocked = parameterElement.getAttribute(new QName(ATTRIBUTE_LOCKED));

      if (paramLocked != null) {
        String lockedValue = paramLocked.getAttributeValue();
        if (BOOLEAN_TRUE.equals(lockedValue)) {
          parameter.setLocked(true);
        } else {
          parameter.setLocked(false);
        }
      }
      try {
        parameterInclude.addParameter(parameter);
      } catch (AxisFault axisFault) {
        throw new DeploymentException(axisFault);
      }
    }
  }
View Full Code Here

TOP

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

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.