synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sami...@apache.org
Subject svn commit: r355777 - in /incubator/synapse/trunk/java: ./ src/org/apache/synapse/ src/org/apache/synapse/axis2/ src/org/apache/synapse/processors/ src/org/apache/synapse/xml/ test/org/apache/axis2/META-INF/ test/org/apache/axis2/test/ test/org/apache/...
Date Sat, 10 Dec 2005 20:25:34 GMT
Author: saminda
Date: Sat Dec 10 12:25:31 2005
New Revision: 355777

URL: http://svn.apache.org/viewcvs?rev=355777&view=rev
Log:
Code updated to get a dispatch  Axis2 service as a mediator from the  
main repository. ex: when a rule configure as follows 
<servicemediator name="get-test-mediator" service="test-mediator"/> this 
will allow the user to get "test-mediator" service from the repository. 
This tag design to use last in hierarchical ruling structure, or itself 
alone. 

Clean up some typos and added new test cases.  

Added:
    incubator/synapse/trunk/java/src/org/apache/synapse/axis2/MediatationMessageReceiver.java
    incubator/synapse/trunk/java/src/org/apache/synapse/processors/Axis2MediatorProcessor.java
    incubator/synapse/trunk/java/src/org/apache/synapse/xml/Axis2MediatorProcessorConfigurator.java
    incubator/synapse/trunk/java/test/org/apache/axis2/META-INF/service-mediator.xml
    incubator/synapse/trunk/java/test/org/apache/axis2/test/TestMediator.java
    incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/Axis2MediatorProcessorWithRuleTest.java
    incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/Axis2MediatorProcessorTest.java
Modified:
    incubator/synapse/trunk/java/maven.xml
    incubator/synapse/trunk/java/src/org/apache/synapse/Constants.java
    incubator/synapse/trunk/java/src/org/apache/synapse/xml/Constants.java
    incubator/synapse/trunk/java/src/org/apache/synapse/xml/ProcessorConfiguratorFinder.java
    incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/AddressingProcessorTest.java
    incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/RegexProcessorTest.java
    incubator/synapse/trunk/java/test/org/apache/synapse/util/Axis2EvnSetup.java

Modified: incubator/synapse/trunk/java/maven.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/maven.xml?rev=355777&r1=355776&r2=355777&view=diff
==============================================================================
--- incubator/synapse/trunk/java/maven.xml (original)
+++ incubator/synapse/trunk/java/maven.xml Sat Dec 10 12:25:31 2005
@@ -80,6 +80,18 @@
                  basedir="target/services/npe">
                 <include name="**"/>
             </jar>
+             <echo message="----------------Creating test-mediator aar----------------"/>
+            <mkdir dir="target/services/test-mediator/META-INF"/>
+            <mkdir dir="target/services/test-mediator/org/apache/axis2/test"/>
+            <copy file="test/org/apache/axis2/META-INF/service-mediator.xml"
+                  tofile="target/services/test-mediator/META-INF/services.xml"/>
+            <copy file="target/test-classes/org/apache/axis2/test/TestMediator.class"
+                  tofile="target/services/test-mediator/org/apache/axis2/test/TestMediator.class"/>
+            <jar jarfile="target/test-mediator.aar"
+                 basedir="target/services/test-mediator">
+                <include name="**"/>
+            </jar>
+
 
             <echo message="-----------Creating Testing Repository - SendOn ----------"/>
             <mkdir dir="target/synapse-repository-sendon"/>
@@ -102,8 +114,10 @@
             <echo message="-----------Creating Testing Repository - SendOnAxis2 ----------"/>
             <mkdir dir="target/synapse-repository-sendonAxis2"/>
 
-            <copy file="target/npe.aar"
-                  tofile="target/synapse-repository-sendonAxis2/services/npe.aar"/>
+            <!--<copy file="target/npe.aar"-->
+                  <!--tofile="target/synapse-repository-sendonAxis2/services/npe.aar"/>-->
+            <copy file="target/test-mediator.aar"
+                  tofile="target/synapse-repository-sendonAxis2/services/test-mediator.aar"/>
 
             <copy file="synapse-test-resources/axis2/modules/addressing.mar"
                   tofile="target/synapse-repository-sendonAxis2/modules/addressing.mar"/>
@@ -111,6 +125,8 @@
                   tofile="target/synapse-repository-sendonAxis2/axis2.xml"/>
 
             <ant:delete file="target/npe.aar"/>
+            <ant:delete file="target/test-mediator.aar"/>
+
         </j:if>
 
 

Modified: incubator/synapse/trunk/java/src/org/apache/synapse/Constants.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/src/org/apache/synapse/Constants.java?rev=355777&r1=355776&r2=355777&view=diff
==============================================================================
--- incubator/synapse/trunk/java/src/org/apache/synapse/Constants.java (original)
+++ incubator/synapse/trunk/java/src/org/apache/synapse/Constants.java Sat Dec 10 12:25:31
2005
@@ -26,18 +26,20 @@
 public interface Constants {
 	
 
-	public static final String CLASSMEDIATOR = "classmediator";
+	String CLASSMEDIATOR = "classmediator";
 
-	public static final String MEDIATE_OPERATION_NAME = "mediate";
+	String MEDIATE_OPERATION_NAME = "mediate";
 
-	public static final String MEDIATOR_RESPONSE_PROPERTY = "synapse.mediator.response";
+	String MEDIATOR_RESPONSE_PROPERTY = "synapse.mediator.response";
 
-	public static final String ISRESPONSE_PROPERTY = "synapse.isresponse";
+	String ISRESPONSE_PROPERTY = "synapse.isresponse";
 
-	public static final String EMPTYMEDIATOR = "emptymediator";
+	String EMPTYMEDIATOR = "emptymediator";
 
     //this is for the synapse.xml config
     String SYNAPSECONFIGURATION = "SynapseConfiguration";
 
 	String SYNAPSE_ENVIRONMENT = "synapse.environment";
+    // for the mediator return value
+    String MEDIATOR_STATUS="mediator.status";
 }

Added: incubator/synapse/trunk/java/src/org/apache/synapse/axis2/MediatationMessageReceiver.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/src/org/apache/synapse/axis2/MediatationMessageReceiver.java?rev=355777&view=auto
==============================================================================
--- incubator/synapse/trunk/java/src/org/apache/synapse/axis2/MediatationMessageReceiver.java
(added)
+++ incubator/synapse/trunk/java/src/org/apache/synapse/axis2/MediatationMessageReceiver.java
Sat Dec 10 12:25:31 2005
@@ -0,0 +1,33 @@
+package org.apache.synapse.axis2;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.receivers.AbstractMessageReceiver;
+import org.apache.synapse.Constants;
+import org.apache.synapse.SynapseMessage;
+import org.apache.synapse.api.Mediator;
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+public class MediatationMessageReceiver extends AbstractMessageReceiver {
+    public void receive(MessageContext messageContext) throws AxisFault {
+        Mediator mediator = (Mediator) makeNewServiceObject(messageContext);
+        SynapseMessage smc = new Axis2SynapseMessage(messageContext);
+        boolean returnValue = mediator.mediate(smc);
+        messageContext.setProperty(Constants.MEDIATOR_STATUS, new Boolean(returnValue));
+    }
+}

Added: incubator/synapse/trunk/java/src/org/apache/synapse/processors/Axis2MediatorProcessor.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/src/org/apache/synapse/processors/Axis2MediatorProcessor.java?rev=355777&view=auto
==============================================================================
--- incubator/synapse/trunk/java/src/org/apache/synapse/processors/Axis2MediatorProcessor.java
(added)
+++ incubator/synapse/trunk/java/src/org/apache/synapse/processors/Axis2MediatorProcessor.java
Sat Dec 10 12:25:31 2005
@@ -0,0 +1,84 @@
+package org.apache.synapse.processors;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.*;
+import org.apache.axis2.description.AxisOperation;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.engine.AxisEngine;
+import org.apache.axis2.util.Utils;
+import org.apache.synapse.Constants;
+import org.apache.synapse.SynapseEnvironment;
+import org.apache.synapse.SynapseException;
+import org.apache.synapse.SynapseMessage;
+import org.apache.synapse.axis2.Axis2SynapseMessage;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+public class Axis2MediatorProcessor extends AbstractProcessor {
+    private String mediatorName;
+    private Log log = LogFactory.getLog(getClass());
+
+    public boolean process(SynapseEnvironment se, SynapseMessage sm) {
+        log.debug("process");
+        MessageContext msgContext =
+                ((Axis2SynapseMessage) sm).getMessageContext();
+        AxisConfiguration ac =
+                msgContext.getConfigurationContext().getAxisConfiguration();
+        ConfigurationContext cc = msgContext.getConfigurationContext();
+
+
+        AxisEngine ae = new AxisEngine(cc);
+        AxisService as = null;
+        try {
+            as = ac.getService(mediatorName);
+
+            if (as == null)
+                throw new SynapseException("cannot locate service "
+                        + mediatorName);
+            // todo: qos stuff goes here
+            AxisOperation ao = as
+                    .getOperation(Constants.MEDIATE_OPERATION_NAME);
+            OperationContext oc = OperationContextFactory
+                    .createOperationContext(
+                            ao.getAxisSpecifMEPConstant(), ao);
+            ao.registerOperationContext(msgContext, oc);
+
+            ServiceContext sc =
+                    Utils.fillContextInformation(ao, as, cc);
+            oc.setParent(sc);
+
+            msgContext.setOperationContext(oc);
+            msgContext.setServiceContext(sc);
+
+            msgContext.setAxisOperation(ao);
+            msgContext.setAxisService(as);
+
+            ae.receive(msgContext);
+        } catch (AxisFault axisFault) {
+            throw new SynapseException(axisFault);
+        }
+
+        return ((Boolean)msgContext.getProperty(Constants.MEDIATOR_STATUS)).booleanValue();
+    }
+
+    public void setServiceMediatorName(String mediatorName) {
+        this.mediatorName = mediatorName;
+    }
+}

Added: incubator/synapse/trunk/java/src/org/apache/synapse/xml/Axis2MediatorProcessorConfigurator.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/src/org/apache/synapse/xml/Axis2MediatorProcessorConfigurator.java?rev=355777&view=auto
==============================================================================
--- incubator/synapse/trunk/java/src/org/apache/synapse/xml/Axis2MediatorProcessorConfigurator.java
(added)
+++ incubator/synapse/trunk/java/src/org/apache/synapse/xml/Axis2MediatorProcessorConfigurator.java
Sat Dec 10 12:25:31 2005
@@ -0,0 +1,46 @@
+package org.apache.synapse.xml;
+
+import org.apache.synapse.Processor;
+import org.apache.synapse.SynapseEnvironment;
+import org.apache.synapse.SynapseException;
+import org.apache.synapse.processors.Axis2MediatorProcessor;
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMAttribute;
+
+import javax.xml.namespace.QName;
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+public class Axis2MediatorProcessorConfigurator extends AbstractProcessorConfigurator{
+
+    private static final QName A2M_Q = new QName(Constants.SYNAPSE_NAMESPACE,
+			"servicemediator");
+    public Processor createProcessor(SynapseEnvironment se, OMElement el) {
+        Axis2MediatorProcessor a2mp = new Axis2MediatorProcessor();
+        super.setNameOnProcessor(se,el,a2mp);
+        OMAttribute serviceName = el.getAttribute(new QName("service"));
+        if (serviceName == null)
+			throw new SynapseException("missing mediator attribute on element"
+                    + el.toString());
+		a2mp.setServiceMediatorName(serviceName.getAttributeValue());
+		return a2mp;          
+    }
+
+    public QName getTagQName() {
+        return A2M_Q;
+    }
+}

Modified: incubator/synapse/trunk/java/src/org/apache/synapse/xml/Constants.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/src/org/apache/synapse/xml/Constants.java?rev=355777&r1=355776&r2=355777&view=diff
==============================================================================
--- incubator/synapse/trunk/java/src/org/apache/synapse/xml/Constants.java (original)
+++ incubator/synapse/trunk/java/src/org/apache/synapse/xml/Constants.java Sat Dec 10 12:25:31
2005
@@ -16,19 +16,10 @@
 package org.apache.synapse.xml;
 
 /**
- *
- * <p>
+ * <p/>
  * Constants used in the XML processing
- *
  */
-public class Constants {
-	
-	
-
-	public static final String SYNAPSE_NAMESPACE = "http://ws.apache.org/ns/synapse";
-
-	public static final String SYNAPSE = "synapse";
-
-
-
+public interface Constants {
+    String SYNAPSE_NAMESPACE = "http://ws.apache.org/ns/synapse";
+    String SYNAPSE = "synapse";
 }

Modified: incubator/synapse/trunk/java/src/org/apache/synapse/xml/ProcessorConfiguratorFinder.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/src/org/apache/synapse/xml/ProcessorConfiguratorFinder.java?rev=355777&r1=355776&r2=355777&view=diff
==============================================================================
--- incubator/synapse/trunk/java/src/org/apache/synapse/xml/ProcessorConfiguratorFinder.java
(original)
+++ incubator/synapse/trunk/java/src/org/apache/synapse/xml/ProcessorConfiguratorFinder.java
Sat Dec 10 12:25:31 2005
@@ -59,7 +59,7 @@
 			FaultProcessorConfigurator.class,
 			AddressingProcessorConfigurator.class,
 			InProcessorConfigurator.class, OutProcessorConfigurator.class,
-			NeverProcessorConfigurator.class, RefProcessorConfigurator.class };
+			NeverProcessorConfigurator.class, RefProcessorConfigurator.class, Axis2MediatorProcessorConfigurator.class
};
 
 	private static void initialise() {
 

Added: incubator/synapse/trunk/java/test/org/apache/axis2/META-INF/service-mediator.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/test/org/apache/axis2/META-INF/service-mediator.xml?rev=355777&view=auto
==============================================================================
--- incubator/synapse/trunk/java/test/org/apache/axis2/META-INF/service-mediator.xml (added)
+++ incubator/synapse/trunk/java/test/org/apache/axis2/META-INF/service-mediator.xml Sat Dec
10 12:25:31 2005
@@ -0,0 +1,11 @@
+<service name="test-mediator">
+    <description>
+        Test-Mediator
+    </description>
+    <parameter name="ServiceClass" locked="false">
+        org.apache.axis2.test.TestMediator</parameter>
+    <operation name="mediate">
+        <messageReceiver
+                class="org.apache.synapse.axis2.MediatationMessageReceiver"/>
+    </operation>
+</service>
\ No newline at end of file

Added: incubator/synapse/trunk/java/test/org/apache/axis2/test/TestMediator.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/test/org/apache/axis2/test/TestMediator.java?rev=355777&view=auto
==============================================================================
--- incubator/synapse/trunk/java/test/org/apache/axis2/test/TestMediator.java (added)
+++ incubator/synapse/trunk/java/test/org/apache/axis2/test/TestMediator.java Sat Dec 10 12:25:31
2005
@@ -0,0 +1,27 @@
+package org.apache.axis2.test;
+
+import org.apache.synapse.api.Mediator;
+import org.apache.synapse.SynapseMessage;
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+public class TestMediator implements Mediator {
+    public boolean mediate(SynapseMessage smc) {
+        System.out.println("Executing mediators");
+        return true ;  
+    }
+}

Added: incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/Axis2MediatorProcessorWithRuleTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/Axis2MediatorProcessorWithRuleTest.java?rev=355777&view=auto
==============================================================================
--- incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/Axis2MediatorProcessorWithRuleTest.java
(added)
+++ incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/Axis2MediatorProcessorWithRuleTest.java
Sat Dec 10 12:25:31 2005
@@ -0,0 +1,63 @@
+package org.apache.synapse.spi.injection;
+
+import junit.framework.TestCase;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.om.OMElement;
+import org.apache.synapse.SynapseEnvironment;
+import org.apache.synapse.SynapseMessage;
+import org.apache.synapse.Processor;
+import org.apache.synapse.processors.Axis2MediatorProcessor;
+import org.apache.synapse.xml.Axis2MediatorProcessorConfigurator;
+import org.apache.synapse.axis2.Axis2SynapseEnvironment;
+import org.apache.synapse.axis2.Axis2SynapseMessage;
+import org.apache.synapse.util.Axis2EvnSetup;
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+public class Axis2MediatorProcessorWithRuleTest extends TestCase {
+    private MessageContext msgCtx;
+    private SynapseEnvironment env;
+    private OMElement config;
+    private String synapsexml =
+            "<synapse xmlns=\"http://ws.apache.org/ns/synapse\">\n" +
+                    "<stage name=\"test-service-mediator\">\n" +
+                    "    <servicemediator name=\"service-mediator\" service=\"test-mediator\"/>\n"
+
+                    "</stage>\n" +
+                    "</synapse>";
+
+    public void setUp() throws Exception {
+        msgCtx = Axis2EvnSetup.axis2Deployment("target/synapse-repository-sendonAxis2");
+        config =Axis2EvnSetup.getSynapseConfigElement(synapsexml);
+        env = new Axis2SynapseEnvironment(config,
+                Thread.currentThread().getContextClassLoader());
+    }
+
+    public void testAxis2MediatorProcessor() throws Exception {
+
+        SynapseMessage smc = new Axis2SynapseMessage(msgCtx);
+        env.injectMessage(smc);
+        assertNotNull(env.lookupProcessor("service-mediator"));
+    }
+
+    public void testAxis2MediagtorConfigurator() throws Exception {
+        Axis2MediatorProcessorConfigurator conf = new Axis2MediatorProcessorConfigurator();
+
+        Processor pro = conf.createProcessor(env,config.getFirstElement().getFirstElement());
+        assertTrue(pro instanceof Axis2MediatorProcessor);
+        assertNotNull(pro.getName());
+    }
+}

Modified: incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/AddressingProcessorTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/AddressingProcessorTest.java?rev=355777&r1=355776&r2=355777&view=diff
==============================================================================
--- incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/AddressingProcessorTest.java
(original)
+++ incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/AddressingProcessorTest.java
Sat Dec 10 12:25:31 2005
@@ -34,10 +34,10 @@
         SynapseMessage sm = new Axis2SynapseMessage(
                 Axis2EvnSetup.axis2Deployment("target/synapse-repository"));
         Processor addressingProcessor = new AddressingProcessor();
-        boolean resutl = addressingProcessor.process(null,sm);
+        boolean result = addressingProcessor.process(null,sm);
         assertTrue(((Boolean) sm.getProperty(
                 Constants.MEDIATOR_RESPONSE_PROPERTY)).booleanValue());
-        assertTrue(resutl);
+        assertTrue(result);
         //todo: sm stuff
     }
 }

Added: incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/Axis2MediatorProcessorTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/Axis2MediatorProcessorTest.java?rev=355777&view=auto
==============================================================================
--- incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/Axis2MediatorProcessorTest.java
(added)
+++ incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/Axis2MediatorProcessorTest.java
Sat Dec 10 12:25:31 2005
@@ -0,0 +1,35 @@
+package org.apache.synapse.spi.processors;
+
+import junit.framework.TestCase;
+import org.apache.synapse.SynapseMessage;
+import org.apache.synapse.processors.Axis2MediatorProcessor;
+import org.apache.synapse.util.Axis2EvnSetup;
+import org.apache.synapse.axis2.Axis2SynapseMessage;
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+public class Axis2MediatorProcessorTest extends TestCase {
+    public void testAxis2MediatorProcessor() throws Exception {
+        SynapseMessage sm = new Axis2SynapseMessage(
+                Axis2EvnSetup.axis2Deployment("target/synapse-repository-sendonAxis2"));
+        Axis2MediatorProcessor pro = new Axis2MediatorProcessor();
+        pro.setServiceMediatorName("test-mediator");
+        boolean result = pro.process(null,sm);
+        assertTrue(result);
+        //todo
+    }
+}

Modified: incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/RegexProcessorTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/RegexProcessorTest.java?rev=355777&r1=355776&r2=355777&view=diff
==============================================================================
--- incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/RegexProcessorTest.java
(original)
+++ incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/RegexProcessorTest.java
Sat Dec 10 12:25:31 2005
@@ -31,7 +31,7 @@
         pro.setPattern("http://xmethods..\\*");
         boolean result = pro.process(null,sm);
         assertTrue(result);
-        //todo:
+        //todo: smc stuff
 
     }
 }

Modified: incubator/synapse/trunk/java/test/org/apache/synapse/util/Axis2EvnSetup.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/test/org/apache/synapse/util/Axis2EvnSetup.java?rev=355777&r1=355776&r2=355777&view=diff
==============================================================================
--- incubator/synapse/trunk/java/test/org/apache/synapse/util/Axis2EvnSetup.java (original)
+++ incubator/synapse/trunk/java/test/org/apache/synapse/util/Axis2EvnSetup.java Sat Dec 10
12:25:31 2005
@@ -41,7 +41,7 @@
             throws AxisFault {
         ConfigurationContextFactory conFac = new ConfigurationContextFactory();
         ConfigurationContext configCtx = conFac
-                .buildClientConfigurationContext(testingReposity);
+                .buildConfigurationContext(testingReposity);
         MessageContext msgCtx = new MessageContext(configCtx);
         msgCtx.setEnvelope(testEnvSetup());
         msgCtx.setServerSide(true);



---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Mime
View raw message