Examples of SynapseEnvironment


Examples of org.apache.synapse.core.SynapseEnvironment

     * @param localName    binding localname string in xpath expression
     * @return Object variable resolved by corresponding extension
     */
    public static Object resolveVariableContext(MessageContext ctxt, String namespaceURI,
                                                String prefix, String localName) {
        SynapseEnvironment environment = ctxt.getEnvironment();
        if (environment != null) {
            Map<QName, SynapseXpathVariableResolver> extensions =
                    environment.getXpathVariableExtensions();
            SynapseXpathVariableResolver variableResolver =
                    getMatchingExtensionProvider(extensions, namespaceURI, prefix, localName);
            if (variableResolver != null) {
                return resolveXpathVariable(variableResolver, ctxt);
            }
View Full Code Here

Examples of org.apache.synapse.core.SynapseEnvironment

        InputStream wsdlInputStream = null;
        OMElement wsdlElement = null;
        boolean wsdlFound = false;
        String publishWSDL = null;

        SynapseEnvironment synEnv = SynapseConfigUtils.getSynapseEnvironment(axisCfg);
        String synapseHome = synEnv != null ? synEnv.getServerContextInformation()
                .getServerConfigurationInformation().getSynapseHome() : "";

        if (wsdlKey != null) {
            synCfg.getEntryDefinition(wsdlKey);
            Object keyObject = synCfg.getEntry(wsdlKey);
View Full Code Here

Examples of org.apache.synapse.core.SynapseEnvironment

        AxisConfiguration axisConfig = synCfg.getAxisConfiguration();
        if (axisConfig != null) {

            Parameter param = axisConfig.getParameter(SynapseConstants.SYNAPSE_ENV);
            if (param != null && param.getValue() instanceof SynapseEnvironment)  {
                SynapseEnvironment env = (SynapseEnvironment) param.getValue();
                if (targetInLineInSequence != null) {
                    targetInLineInSequence.init(env);
                }
                if (targetInLineOutSequence != null) {
                    targetInLineOutSequence.init(env);
View Full Code Here

Examples of org.apache.synapse.core.SynapseEnvironment

     * @throws Exception
     */
    public MessageContext build() throws Exception {
        SynapseConfiguration testConfig = new SynapseConfiguration();
        // TODO: check whether we need a SynapseEnvironment in all cases
        SynapseEnvironment synEnv
            = new Axis2SynapseEnvironment(new ConfigurationContext(new AxisConfiguration()),
                                          testConfig);
        MessageContext synCtx;
        if (requireAxis2MessageContext) {
            synCtx = new Axis2MessageContext(new org.apache.axis2.context.MessageContext(),
View Full Code Here

Examples of org.apache.synapse.core.SynapseEnvironment

        // we get the configuration on each message from the Axis2 configuration since the Synapse configuration
        // may be updated externally and thus should not be cached.

        SynapseConfiguration synCfg = getSynapseConfig(axisMsgCtx);
        SynapseEnvironment   synEnv = getSynapseEnvironment(axisMsgCtx);

        if (synCfg == null || synEnv == null) {
            initializeSynapse(axisMsgCtx);
            synCfg = getSynapseConfig(axisMsgCtx);
            synEnv = getSynapseEnvironment(axisMsgCtx);
View Full Code Here

Examples of org.apache.synapse.core.SynapseEnvironment

    protected void unsetSynapseRegistrationsService(
            SynapseRegistrationsService synapseRegistrationsService) {
        int tenantId = synapseRegistrationsService.getTenantId();
        if (synapseEnvironmentServices.containsKey(tenantId)) {
            SynapseEnvironment env = synapseEnvironmentServices.get(tenantId).
                    getSynapseEnvironment();

            synapseEnvironmentServices.remove(synapseRegistrationsService.getTenantId());

            AxisConfiguration axisConfig = synapseRegistrationsService.getConfigurationContext().
View Full Code Here

Examples of org.apache.synapse.core.SynapseEnvironment

    protected void unsetSynapseRegistrationsService(
            SynapseRegistrationsService synapseRegistrationsService) {
        int tenantId = synapseRegistrationsService.getTenantId();
        if (ConfigHolder.getInstance().getSynapseEnvironmentServices().containsKey(tenantId)) {
            SynapseEnvironment env = ConfigHolder.getInstance().
                    getSynapseEnvironmentService(tenantId).getSynapseEnvironment();

            ConfigHolder.getInstance().removeSynapseEnvironmentService(
                    synapseRegistrationsService.getTenantId());
View Full Code Here

Examples of org.apache.synapse.core.SynapseEnvironment

    protected void unsetSynapseRegistrationsService(
            SynapseRegistrationsService synapseRegistrationsService) {
        int tenantId = synapseRegistrationsService.getTenantId();
        if (ConfigHolder.getInstance().getSynapseEnvironmentServices().containsKey(tenantId)) {
            SynapseEnvironment env = ConfigHolder.getInstance().
                    getSynapseEnvironmentService(tenantId).getSynapseEnvironment();

            ConfigHolder.getInstance().removeSynapseEnvironmentService(
                    synapseRegistrationsService.getTenantId());
View Full Code Here

Examples of org.apache.synapse.core.SynapseEnvironment

    public static final String OPERATION = "MyOperation";
    public static final String PAYLOAD = "<foo><bar>text</bar></foo>";

    protected MessageContext getTestContext() {
        SynapseConfiguration testConfig = new SynapseConfiguration();
        SynapseEnvironment synEnv = new Axis2SynapseEnvironment(new ConfigurationContext(new AxisConfiguration()),
                                          testConfig);
        org.apache.axis2.context.MessageContext msgCtx = new org.apache.axis2.context.MessageContext();
        MessageContext synCtx = new Axis2MessageContext(msgCtx, testConfig, synEnv);

        SOAPEnvelope envelope = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
View Full Code Here

Examples of org.apache.synapse.core.SynapseEnvironment

    protected void unsetSynapseRegistrationsService(
            SynapseRegistrationsService synapseRegistrationsService) {
        int tenantId = synapseRegistrationsService.getTenantId();
        if (ConfigHolder.getInstance().getSynapseEnvironmentServices().containsKey(tenantId)) {
            SynapseEnvironment env = ConfigHolder.getInstance().
                    getSynapseEnvironmentService(tenantId).getSynapseEnvironment();

            ConfigHolder.getInstance().removeSynapseEnvironmentService(
                    synapseRegistrationsService.getTenantId());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.