Package org.apache.axis2.description

Examples of org.apache.axis2.description.Parameter


                                           org.apache.synapse.MessageContext synCtx)
            throws AxisFault {

        AxisService service = messageContext.getAxisService();
        if (service != null) {
            Parameter inMediationParam
                    = service.getParameter(HandlerConstants.OUT_SEQUENCE_PARAM_NAME);
            if (inMediationParam != null && inMediationParam.getValue() != null) {
                if (inMediationParam.getValue() instanceof Mediator) {
                    Mediator inMessageSequence = (Mediator) inMediationParam.getValue();
                    return inMessageSequence.mediate(synCtx);
                } else if (inMediationParam.getValue() instanceof String) {
                    Mediator inMessageSequence = synCtx.getConfiguration().getSequence(
                            (String) inMediationParam.getValue());
                    return inMessageSequence.mediate(synCtx);
                } else {
                    if (log.isDebugEnabled()) {
                        log.debug("The provided out message mediation " +
                                "sequence is not a proper mediator");
View Full Code Here


    }

    private static SynapseConfiguration getSynapseConfiguration(
            org.apache.axis2.context.MessageContext axisMsgCtx) {
        AxisConfiguration axisCfg = axisMsgCtx.getConfigurationContext().getAxisConfiguration();
        Parameter param = axisCfg.getParameter(SynapseConstants.SYNAPSE_CONFIG);
        if (param != null) {
            return (SynapseConfiguration) param.getValue();
        }
        return null;
    }
View Full Code Here

    }

    private static SynapseEnvironment getSynapseEnvironment(
            org.apache.axis2.context.MessageContext axisMsgCtx) {
        AxisConfiguration axisCfg = axisMsgCtx.getConfigurationContext().getAxisConfiguration();
        Parameter param = axisCfg.getParameter(SynapseConstants.SYNAPSE_ENV);
        if (param != null) {
            return (SynapseEnvironment) param.getValue();
        }
        return null;
    }
View Full Code Here

     * @param artifactName name of the artifact to be restored
     */
    public abstract void restoreSynapseArtifact(String artifactName);

    protected SynapseConfiguration getSynapseConfiguration() throws DeploymentException {
        Parameter synCfgParam =
                cfgCtx.getAxisConfiguration().getParameter(SynapseConstants.SYNAPSE_CONFIG);
        if (synCfgParam == null) {
            throw new DeploymentException("SynapseConfiguration not found. " +
                    "Are you sure that you are running Synapse?");
        }
        return (SynapseConfiguration) synCfgParam.getValue();
    }
View Full Code Here

        }
        return (SynapseConfiguration) synCfgParam.getValue();
    }

    protected SynapseEnvironment getSynapseEnvironment() throws DeploymentException {
        Parameter synCfgParam =
                cfgCtx.getAxisConfiguration().getParameter(SynapseConstants.SYNAPSE_ENV);
        if (synCfgParam == null) {
            throw new DeploymentException("SynapseEnvironment not found. " +
                    "Are you sure that you are running Synapse?");
        }
        return (SynapseEnvironment) synCfgParam.getValue();
    }
View Full Code Here

        return (SynapseEnvironment) synCfgParam.getValue();
    }

    protected ServerConfigurationInformation getServerConfigurationInformation()
            throws DeploymentException {
        Parameter serverCfgParam =
                cfgCtx.getAxisConfiguration().getParameter(
                        SynapseConstants.SYNAPSE_SERVER_CONFIG_INFO);
        if (serverCfgParam == null) {
            throw new DeploymentException("SynapseConfigurationInformation not found. " +
                    "Are you sure that you are running Synapse?");
        }
        return (ServerConfigurationInformation) serverCfgParam.getValue();
    }
View Full Code Here

        return (ServerConfigurationInformation) serverCfgParam.getValue();
    }

    protected ServerContextInformation getServerContextInformation()
            throws DeploymentException {
        Parameter serverCtxParam =
                cfgCtx.getAxisConfiguration().getParameter(
                        SynapseConstants.SYNAPSE_SERVER_CTX_INFO);
        if (serverCtxParam == null) {
            throw new DeploymentException("ServerContextInformation not found. " +
                    "Are you sure that you are running Synapse?");
        }
        return (ServerContextInformation) serverCtxParam.getValue();
    }
View Full Code Here

     * @return The value of the parameter
     */
    private static String getAxis2ParameterValue(AxisConfiguration axisConfiguration,
                                                 String paramKey) {

        Parameter parameter = axisConfiguration.getParameter(paramKey);
        if (parameter == null) {
            return null;
        }
        Object value = parameter.getValue();
        if (value != null && value instanceof String) {
            return (String) parameter.getValue();
        } else {
            return null;
        }
    }
View Full Code Here

                } else {
                    Axis2MessageContext axis2smc = (Axis2MessageContext) synCtx;
                    org.apache.axis2.context.MessageContext axis2MessageCtx =
                            axis2smc.getAxis2MessageContext();
                    axis2MessageCtx.getTransportOut().addParameter(
                            new Parameter(HTTPConstants.OMIT_SOAP_12_ACTION, true));
                }
            }

            options.setProperty(
                    AddressingConstants.DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.TRUE);
View Full Code Here

    protected SSLContext getSSLContext(TransportInDescription transportIn) throws AxisFault {

        KeyManager[] keymanagers  = null;
        TrustManager[] trustManagers = null;

        Parameter keyParam    = transportIn.getParameter("keystore");
        Parameter trustParam  = transportIn.getParameter("truststore");

        if (keyParam != null) {
            OMElement ksEle      = keyParam.getParameterElement().getFirstElement();
            String location      = ksEle.getFirstChildWithName(new QName("Location")).getText();
            String type          = ksEle.getFirstChildWithName(new QName("Type")).getText();
            String storePassword = ksEle.getFirstChildWithName(new QName("Password")).getText();
            String keyPassword   = ksEle.getFirstChildWithName(new QName("KeyPassword")).getText();

            FileInputStream fis = null;
            try {
                KeyStore keyStore = KeyStore.getInstance(type);
                fis = new FileInputStream(location);
                log.info("Loading Identity Keystore from : " + location);

                keyStore.load(fis, storePassword.toCharArray());
                KeyManagerFactory kmfactory = KeyManagerFactory.getInstance(
                    KeyManagerFactory.getDefaultAlgorithm());
                kmfactory.init(keyStore, keyPassword.toCharArray());
                keymanagers = kmfactory.getKeyManagers();

            } catch (GeneralSecurityException gse) {
                log.error("Error loading Key store : " + location, gse);
                throw new AxisFault("Error loading Key store : " + location, gse);
            } catch (IOException ioe) {
                log.error("Error opening Key store : " + location, ioe);
                throw new AxisFault("Error opening Key store : " + location, ioe);
            } finally {
                if (fis != null) {
                    try {
                        fis.close();
                    } catch (IOException ignore) {}
                }
            }
        }

        if (trustParam != null) {
            OMElement tsEle      = trustParam.getParameterElement().getFirstElement();
            String location      = tsEle.getFirstChildWithName(new QName("Location")).getText();
            String type          = tsEle.getFirstChildWithName(new QName("Type")).getText();
            String storePassword = tsEle.getFirstChildWithName(new QName("Password")).getText();

            FileInputStream fis = null;
View Full Code Here

TOP

Related Classes of org.apache.axis2.description.Parameter

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.