Package org.apache.synapse.core.axis2

Examples of org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient


     */
    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(),
                                             testConfig, synEnv);
View Full Code Here


        algorithm.setLoadBalanceEndpoint(loadbalanceEndpoint);

        loadbalanceEndpoint.setChildren(endpoints);
        loadbalanceEndpoint.setAlgorithm(algorithm);

        SynapseEnvironment env = new Axis2SynapseEnvironment(
                new ConfigurationContext(new AxisConfiguration()), new SynapseConfiguration());
        loadbalanceEndpoint.init(env);
        return loadbalanceEndpoint;
    }
View Full Code Here

        try {
            SynapseConfiguration synapseConfig = new SynapseConfiguration();
            AxisConfiguration axisConfig = new AxisConfiguration();
            synapseConfig.setAxisConfiguration(axisConfig);
            ConfigurationContext cfgCtx = new ConfigurationContext(axisConfig);
            SynapseEnvironment env = new Axis2SynapseEnvironment(cfgCtx, synapseConfig);
            axisConfig.addParameter(SynapseConstants.SYNAPSE_CONFIG, synapseConfig);
            axisConfig.addParameter(SynapseConstants.SYNAPSE_ENV, env);

            MessageContext msgCtx = TestUtils.getAxis2MessageContext(payload, null).
                    getAxis2MessageContext();
View Full Code Here

* test resources.
*/
public class HessianMessageBuilderTest extends TestCase {

    public void testProcessDocumentFaultWithSynEnv() throws IOException {
        SynapseEnvironment synEnv = new Axis2SynapseEnvironment(new ConfigurationContext(
                new AxisConfiguration()), new SynapseConfiguration());
        testProcessDocumentFault(synEnv);
    }
View Full Code Here

    public void testProcessDocumentFaultWithoutSynEnv() throws IOException {
        testProcessDocumentFault(null);
    }

    public void testProcessDocumentWithSynEnv() throws IOException {
        SynapseEnvironment synEnv = new Axis2SynapseEnvironment(new ConfigurationContext(
                new AxisConfiguration()), new SynapseConfiguration());
        testProcessDocument(synEnv);
    }
View Full Code Here

    public static MessageContext createLightweightSynapseMessageContext(
            String payload) throws Exception {
        org.apache.axis2.context.MessageContext mc =
                new org.apache.axis2.context.MessageContext();
        SynapseConfiguration config = new SynapseConfiguration();
        SynapseEnvironment env = new Axis2SynapseEnvironment(config);
        MessageContext synMc = new Axis2MessageContext(mc, config, env);
        SOAPEnvelope envelope =
                OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
        OMDocument omDoc =
                OMAbstractFactory.getSOAP11Factory().createOMDocument();
View Full Code Here

        SynapseConfiguration synConfig = new SynapseConfiguration();
        synConfig.addSequence("myErrorHandler", seqErr);
        synConfig.addSequence(SynapseConstants.MAIN_SEQUENCE_KEY, seq);

        MessageContextCreatorForAxis2.setSynConfig(synConfig);
        MessageContextCreatorForAxis2.setSynEnv(new Axis2SynapseEnvironment(synConfig));
        org.apache.axis2.context.MessageContext mc =
            new org.apache.axis2.context.MessageContext();
        AxisConfiguration axisConfig = synConfig.getAxisConfiguration();
        if (axisConfig == null) {
            axisConfig = new AxisConfiguration();
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp();
        SynapseConfiguration synCfg = new SynapseConfiguration();
        AxisConfiguration config = new AxisConfiguration();
        testCtx = new Axis2MessageContext(new org.apache.axis2.context.MessageContext(),
            synCfg, new Axis2SynapseEnvironment(new ConfigurationContext(config), synCfg));
        ((Axis2MessageContext)testCtx).getAxis2MessageContext().setConfigurationContext(new ConfigurationContext(config));
        SOAPEnvelope envelope = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
        envelope.getBody().addChild(createOMElement("<original>test-split-context</original>"));
        testCtx.setEnvelope(envelope);
        testCtx.setSoapAction("urn:test");
View Full Code Here

    public void testInitializationAndMedition() throws Exception {
        Mediator cm = MediatorFactoryFinder.getInstance().getMediator(createOMElement(
                "<class name='org.apache.synapse.mediators.ext.ClassMediatorTestMediator' " +
                        "xmlns='http://ws.apache.org/ns/synapse'/>"), new Properties());
        ((ManagedLifecycle) cm).init(new Axis2SynapseEnvironment(new SynapseConfiguration()));
        assertTrue(ClassMediatorTestMediator.initialized);
        cm.mediate(new TestMessageContext());
        assertTrue(ClassMediatorTestMediator.invoked);
    }
View Full Code Here

                            "    <result name=\"categoryProp\" column=\"2\"/>\n" +
                            "  </statement>\n" +
                            "</dblookup>"
                    ), new Properties());

                lookup.init(new Axis2SynapseEnvironment(new SynapseConfiguration()));

                java.sql.Statement s = lookup.getDataSource().getConnection().createStatement();
                try {
                    s.execute("drop table destinations");
                } catch (SQLException ignore) {}
View Full Code Here

TOP

Related Classes of org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient

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.