You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by pz...@apache.org on 2006/06/01 11:28:27 UTC
svn commit: r410809 [9/10] - in /incubator/synapse/tags/M2: ./ bin/ etc/
modules/ modules/core/ modules/core/conf/ modules/core/src/
modules/core/src/org/ modules/core/src/org/apache/
modules/core/src/org/apache/synapse/ modules/core/src/org/apache/syn...
Added: incubator/synapse/tags/M2/modules/samples/src/samples/userguide/DumbStockQuoteClient.java
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/modules/samples/src/samples/userguide/DumbStockQuoteClient.java?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/modules/samples/src/samples/userguide/DumbStockQuoteClient.java (added)
+++ incubator/synapse/tags/M2/modules/samples/src/samples/userguide/DumbStockQuoteClient.java Thu Jun 1 02:28:13 2006
@@ -0,0 +1,86 @@
+package samples.userguide;
+
+
+
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.addressing.EndpointReference;
+
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axiom.om.OMElement;
+
+public class DumbStockQuoteClient {
+
+ /**
+ * <p/>
+ * This is a fairly static test client for Synapse. It makes a StockQuote
+ * request to XMethods stockquote service. There is no EPR and there is no
+ * proxy config. It's sort of a Gateway case. It relies on a Synapse config
+ * that will look at the URL or message and send it to the right place
+ */
+ public static void main(String[] args) {
+
+ if (args.length > 0 && args[0].substring(0, 1).equals("-")) {
+ System.out
+ .println("This client demonstrates Synapse as a gateway\n"
+ + "Usage: DumbStockQuoteClient Symbol SynapseURL");
+ System.out
+ .println(
+ "\nDefault values: IBM http://localhost:8080/StockQuote"
+ +
+ "\nAll examples depend on using the sample synapse.xml");
+ System.exit(0);
+ }
+
+ String symb = "IBM";
+ String url = "http://localhost:8080/StockQuote";
+
+ if (args.length > 0)
+ symb = args[0];
+ if (args.length > 1)
+ url = args[1];
+ boolean repository = false;
+ if (args.length > 2) repository = true;
+ try {
+ ServiceClient serviceClient;
+ if (repository) {
+
+ ConfigurationContext configContext =
+ ConfigurationContextFactory.createConfigurationContextFromFileSystem(args[2],null);
+ serviceClient = new ServiceClient(configContext, null);
+ } else {
+ serviceClient = new ServiceClient();
+ }
+
+ // step 1 - create a request payload
+ OMElement getQuote = StockQuoteXMLHandler
+ .createRequestPayload(symb);
+
+ // step 2 - set up the call object
+
+ // the wsa:To
+ EndpointReference targetEPR = new EndpointReference(url);
+
+ Options options = new Options();
+ options.setTo(targetEPR);
+
+ options.setAction("http://www.webserviceX.NET/GetQuote");
+
+ serviceClient.setOptions(options);
+
+ // step 3 - Blocking invocation
+ OMElement result = serviceClient.sendReceive(getQuote);
+ // System.out.println(result);
+
+ // step 4 - parse result
+ System.out.println("Stock price = $"
+ + StockQuoteXMLHandler.parseResponse(result));
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+
+}
Added: incubator/synapse/tags/M2/modules/samples/src/samples/userguide/ProxyStockQuoteClient.java
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/modules/samples/src/samples/userguide/ProxyStockQuoteClient.java?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/modules/samples/src/samples/userguide/ProxyStockQuoteClient.java (added)
+++ incubator/synapse/tags/M2/modules/samples/src/samples/userguide/ProxyStockQuoteClient.java Thu Jun 1 02:28:13 2006
@@ -0,0 +1,122 @@
+package samples.userguide;
+
+import java.net.URL;
+
+
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.transport.http.HTTPConstants;
+import org.apache.axis2.transport.http.HttpTransportProperties;
+import org.apache.axiom.om.OMElement;
+
+
+public class ProxyStockQuoteClient {
+
+ /**
+ * <p/>
+ * This is a fairly static test client for Synapse using the HTTP Proxy
+ * model. It makes a StockQuote request to XMethods stockquote service.
+ * There is no WS-Addressing To URL but we set the HTTP proxy URL to point
+ * to Synapse. This results in the destination XMethods URL being embedded
+ * in the POST header. Synapse will pick this out and use it to direct the
+ * message
+ */
+ public static void main(String[] args) {
+
+ if (args.length > 0 && args[0].substring(0, 1).equals("-")) {
+ System.out
+ .println("This client demonstrates Synapse as a proxy\n"
+ +
+ "Usage: ProxyStockQuoteClient Symbol StockQuoteURL ProxyURL");
+ System.out
+ .println(
+ "\nDefault values: IBM http://www.webservicex.net/stockquote.asmx http://localhost:8080");
+ System.out
+ .println(
+ "\nThe XMethods URL will be used in the <wsa:To> header");
+ System.out.println("The Proxy URL will be used as an HTTP proxy");
+ System.out
+ .println(
+ "\nTo demonstrate Synapse virtual URLs, set the URL to http://stockquote\n"
+ +
+ "\nTo demonstrate content-based behaviour, set the Symbol to MSFT\n"
+ +
+ "\nAll examples depend on using the sample synapse.xml");
+ System.exit(0);
+ }
+
+ String symb = "IBM";
+ String xurl = "http://www.webservicex.net/stockquote.asmx";
+ String purl = "http://localhost:8080";
+
+ if (args.length > 0)
+ symb = args[0];
+ if (args.length > 1)
+ xurl = args[1];
+ if (args.length > 2)
+ purl = args[2];
+
+ boolean repository = false;
+ if (args.length > 3) repository = true;
+
+ try {
+ ServiceClient serviceClient;
+ if (repository) {
+ ConfigurationContext configContext =
+ ConfigurationContextFactory.createConfigurationContextFromFileSystem(args[3],null);
+ serviceClient = new ServiceClient(configContext, null);
+ } else {
+ serviceClient = new ServiceClient();
+ }
+
+ // step 1 - create a request payload
+ OMElement getQuote = StockQuoteXMLHandler
+ .createRequestPayload(symb);
+
+ // step 2 - set up the call object
+
+ // the wsa:To
+ EndpointReference targetEPR = new EndpointReference(xurl);
+
+ Options options = new Options();
+ options.setTo(targetEPR);
+
+ URL url = new URL(purl);
+
+ // engage HTTP Proxy
+
+ HttpTransportProperties httpProps = new HttpTransportProperties();
+
+ HttpTransportProperties.ProxyProperties proxyProperties =
+ httpProps.new ProxyProperties();
+ proxyProperties.setProxyName(url.getHost());
+ proxyProperties.setProxyPort(url.getPort());
+ proxyProperties.setUserName("");
+ proxyProperties.setPassWord("");
+ proxyProperties.setDomain("");
+
+ options.setProperty(HTTPConstants.PROXY, proxyProperties);
+
+ options.setAction("http://www.webserviceX.NET/GetQuote");
+
+ serviceClient.setOptions(options);
+
+ // step 3 - Blocking invocation
+ OMElement result = serviceClient.sendReceive(getQuote);
+ // System.out.println(result);
+
+ // step 4 - parse result
+
+ System.out.println("Stock price = $"
+ + StockQuoteXMLHandler.parseResponse(result));
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+
+}
Added: incubator/synapse/tags/M2/modules/samples/src/samples/userguide/StockQuoteClient.java
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/modules/samples/src/samples/userguide/StockQuoteClient.java?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/modules/samples/src/samples/userguide/StockQuoteClient.java (added)
+++ incubator/synapse/tags/M2/modules/samples/src/samples/userguide/StockQuoteClient.java Thu Jun 1 02:28:13 2006
@@ -0,0 +1,111 @@
+package samples.userguide;
+
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.MessageContextConstants;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axiom.om.OMElement;
+
+import javax.xml.namespace.QName;
+
+
+public class StockQuoteClient {
+
+ /**
+ * @param args <p/>
+ * This is a fairly static test client for Synapse. It makes a
+ * StockQuote request to WebServiceX stockquote service. The EPR
+ * it is sent to is for WebServiceX, but the actual transport URL
+ * is designed to go to the Synapse listener.
+ */
+ public static void main(String[] args) {
+
+ if (args.length > 0 && args[0].substring(0, 1).equals("-")) {
+ System.out
+ .println(
+ "Usage: StockQuoteClient Symbol StockQuoteURL TransportURL");
+ System.out
+ .println(
+ "\nDefault values: IBM http://www.webservicex.net/stockquote.asmx http://localhost:8080");
+ System.out
+ .println(
+ "\nThe XMethods URL will be used in the <wsa:To> header");
+ System.out
+ .println(
+ "The Transport URL will be used as the actual address to send to");
+ System.out
+ .println(
+ "\nTo bypass Synapse, set the transport URL to the WebServiceX URL: \n"
+ +
+ "e.g. StockQuoteClient IBM http://www.webservicex.net/stockquote.asmx http://www.webservicex.net/stockquote.asmx \n"
+ +
+ "\nTo demonstrate Synapse virtual URLs, set the URL to http://stockquote\n"
+ +
+ "\nTo demonstrate content-based behaviour, set the Symbol to MSFT\n"
+ +
+ "\nAll examples depend on using the sample synapse.xml");
+ System.exit(0);
+ }
+
+ String symb = "IBM";
+ String xurl = "http://www.webservicex.net/stockquote.asmx";
+ String turl = "http://localhost:8080";
+
+
+ if (args.length > 0)
+ symb = args[0];
+ if (args.length > 1)
+ xurl = args[1];
+ if (args.length > 2)
+ turl = args[2];
+
+ boolean repository = false;
+ if (args.length > 3) repository = true;
+
+ try {
+ // step 1 - create a request payload
+ OMElement getQuote = StockQuoteXMLHandler
+ .createRequestPayload(symb);
+
+
+ ServiceClient serviceClient;
+ if (repository) {
+
+ ConfigurationContext configContext =
+ ConfigurationContextFactory.createConfigurationContextFromFileSystem(args[3],null);
+ serviceClient = new ServiceClient(configContext, null);
+ } else {
+ serviceClient = new ServiceClient();
+ }
+
+ Options options = new Options();
+ EndpointReference targetEPR = new EndpointReference(xurl);
+ options.setTo(targetEPR);
+
+ // step 2 - set up the call object
+ // the wsa:To
+ options.setProperty(MessageContextConstants.TRANSPORT_URL, turl);
+
+ options.setAction("http://www.webserviceX.NET/GetQuote");
+
+ //options.setSoapAction("http://www.webserviceX.NET/GetQuote");
+
+ //Engage Addressing on outgoing message.
+ serviceClient.engageModule(new QName("addressing"));
+
+ serviceClient.setOptions(options);
+ // step 3 - Blocking invocation
+ OMElement result = serviceClient.sendReceive(getQuote);
+ // System.out.println(result);
+ serviceClient.setOptions(options);
+ // step 4 - parse result
+ System.out.println("Stock price = $"
+ + StockQuoteXMLHandler.parseResponse(result));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+}
Added: incubator/synapse/tags/M2/modules/samples/src/samples/userguide/StockQuoteXMLHandler.java
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/modules/samples/src/samples/userguide/StockQuoteXMLHandler.java?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/modules/samples/src/samples/userguide/StockQuoteXMLHandler.java (added)
+++ incubator/synapse/tags/M2/modules/samples/src/samples/userguide/StockQuoteXMLHandler.java Thu Jun 1 02:28:13 2006
@@ -0,0 +1,52 @@
+package samples.userguide;
+
+import org.apache.axiom.om.*;
+import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+
+import java.io.ByteArrayInputStream;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+
+
+
+public class StockQuoteXMLHandler {
+
+ public static OMElement createRequestPayload(String symb) {
+ OMFactory factory = OMAbstractFactory.getOMFactory(); // access to
+ // OM
+ OMNamespace xNs = factory.createOMNamespace(
+ "http://www.webserviceX.NET/", "");
+ OMElement getQuote = factory.createOMElement("GetQuote", xNs);
+ OMElement symbol = factory.createOMElement("symbol", xNs);
+ getQuote.addChild(symbol);
+ symbol.setText(symb);
+ return getQuote;
+ }
+
+ public static String parseResponse(OMElement result)
+ throws XMLStreamException {
+ QName gQR =
+ new QName("http://www.webserviceX.NET/", "GetQuoteResponse");
+
+ OMElement qResp = (OMElement) result.getChildrenWithName(gQR).next();
+
+ String text = qResp.getText();
+
+
+ StAXOMBuilder builder = new StAXOMBuilder(new ByteArrayInputStream(
+ text.getBytes()));
+
+ OMElement parse = builder.getDocumentElement();
+
+ OMElement last = (OMElement) parse.getFirstElement().getFirstElement()
+ .getNextOMSibling();
+ OMText lastText = (OMText) last.getFirstOMChild();
+ return lastText.getText();
+
+ }
+
+
+
+}
Added: incubator/synapse/tags/M2/project.xml
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/project.xml?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/project.xml (added)
+++ incubator/synapse/tags/M2/project.xml Thu Jun 1 02:28:13 2006
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project>
+ <pomVersion>3</pomVersion>
+ <extend>etc/project.xml</extend>
+ <id>Synapse-Incubating</id>
+</project>
+
Added: incubator/synapse/tags/M2/repository/conf/axis2.xml
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/repository/conf/axis2.xml?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/repository/conf/axis2.xml (added)
+++ incubator/synapse/tags/M2/repository/conf/axis2.xml Thu Jun 1 02:28:13 2006
@@ -0,0 +1,167 @@
+<axisconfig name="SynapseAxisJava2.0">
+ <!-- ================================================= -->
+ <!-- Parameters -->
+ <!-- ================================================= -->
+ <parameter name="hotdeployment" locked="false">true</parameter>
+ <parameter name="hotupdate" locked="false">false</parameter>
+ <parameter name="enableMTOM" locked="false">false</parameter>
+ <parameter name="sendStacktraceDetailsWithFaults" locked="false">true</parameter>
+
+ <!-- Uncomment this to enable REST support -->
+ <!-- <parameter name="enableREST" locked="false">true</parameter>-->
+
+ <parameter name="userName" locked="false">admin</parameter>
+ <parameter name="password" locked="false">axis2</parameter>
+
+ <!-- Always engage addressing for Synapse -->
+ <module ref="addressing"/>
+ <!-- This interceptor initializes Synapse on Axis2 startup -->
+ <listener class="org.apache.synapse.core.axis2.SynapseAxis2Interceptor"/>
+
+
+ <!-- ================================================= -->
+ <!-- Message Receivers -->
+ <!-- ================================================= -->
+ <!--This is the Deafult Message Receiver for the system , if you want to have MessageReceivers for -->
+ <!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
+ <!--any operation -->
+ <!--Note : You can ovride this for particular service by adding the same element with your requirement-->
+ <messageReceivers>
+ <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+ class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+ <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+ class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ </messageReceivers>
+ <!-- ================================================= -->
+ <!-- Transport Ins -->
+ <!-- ================================================= -->
+ <transportReceiver name="http"
+ class="org.apache.axis2.transport.http.SimpleHTTPServer">
+ <parameter name="port" locked="false">6060</parameter>
+ <!--If you want to give your own host address for EPR generation-->
+ <!--uncommet following paramter , and set as you required.-->
+ <!--<parameter name="hostname" locked="false">http://myApp.com/ws</parameter>-->
+ </transportReceiver>
+
+ <transportReceiver name="tcp"
+ class="org.apache.axis2.transport.tcp.TCPServer">
+ <parameter name="port" locked="false">6061</parameter>
+ <!--If you want to give your own host address for EPR generation-->
+ <!--uncommet following paramter , and set as you required.-->
+ <!--<parameter name="hostname" locked="false">tcp://myApp.com/ws</parameter>-->
+ </transportReceiver>
+
+ <!-- ================================================= -->
+ <!-- Transport Outs -->
+ <!-- ================================================= -->
+
+ <transportSender name="tcp"
+ class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+ <transportSender name="local"
+ class="org.apache.axis2.transport.local.LocalTransportSender"/>
+ <transportSender name="jms"
+ class="org.apache.axis2.transport.jms.JMSSender"/>
+ <transportSender name="http"
+ class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+ <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+ <parameter name="Transfer-Encoding" locked="false">chunked</parameter>
+ </transportSender>
+ <transportSender name="https"
+ class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+ <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+ <parameter name="Transfer-Encoding" locked="false">chunked</parameter>
+ </transportSender>
+
+ <!-- ================================================= -->
+ <!-- Phases -->
+ <!-- ================================================= -->
+ <phaseOrder type="inflow">
+ <!-- System pre defined phases -->
+ <phase name="Transport">
+ <!--<handler name="RequestURIBasedDispatcher"-->
+ <!--class="org.apache.axis2.engine.RequestURIBasedDispatcher">-->
+ <!--<order phase="Dispatch"/>-->
+ <!--</handler>-->
+ <!--<handler name="SOAPActionBasedDispatcher"-->
+ <!--class="org.apache.axis2.engine.SOAPActionBasedDispatcher">-->
+ <!--<order phase="Dispatch"/>-->
+ <!--</handler>-->
+ </phase>
+ <phase name="Security"/>
+ <phase name="PreDispatch"/>
+ <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+ <handler name="SynapseDispatcher"
+ class="org.apache.synapse.core.axis2.SynapseDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+
+ <!--<handler name="AddressingBasedDispatcher"-->
+ <!--class="org.apache.axis2.engine.AddressingBasedDispatcher">-->
+ <!--<order phase="Dispatch"/>-->
+ <!--</handler>-->
+
+ <!--<handler name="SOAPMessageBodyBasedDispatcher"-->
+ <!--class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">-->
+ <!--<order phase="Dispatch"/>-->
+ <!--</handler>-->
+
+ <handler name="InstanceDispatcher"
+ class="org.apache.axis2.engine.InstanceDispatcher">
+ <order phase="PostDispatch"/>
+ </handler>
+ </phase>
+ <!-- System pre defined phases -->
+ <!-- After Postdispatch phase module author or or service author can add any phase he want -->
+ <phase name="OperationInPhase"/>
+ </phaseOrder>
+ <phaseOrder type="outflow">
+ <!-- user can add his own phases to this area -->
+ <phase name="OperationOutPhase"/>
+ <!--system predefined phase-->
+ <!--these phase will run irrespective of the service-->
+ <phase name="PolicyDetermination"/>
+ <phase name="MessageOut"/>
+ </phaseOrder>
+ <phaseOrder type="INfaultflow">
+ <phase name="PreDispatch"/>
+ <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+
+ <handler name="SynapseDispatcher"
+ class="org.apache.synapse.core.axis2.SynapseDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+
+ <!--<handler name="RequestURIBasedDispatcher"-->
+ <!--class="org.apache.axis2.engine.RequestURIBasedDispatcher">-->
+ <!--<order phase="Dispatch"/>-->
+ <!--</handler>-->
+
+ <!--<handler name="SOAPActionBasedDispatcher"-->
+ <!--class="org.apache.axis2.engine.SOAPActionBasedDispatcher">-->
+ <!--<order phase="Dispatch"/>-->
+ <!--</handler>-->
+
+ <!--<handler name="AddressingBasedDispatcher"-->
+ <!--class="org.apache.axis2.engine.AddressingBasedDispatcher">-->
+ <!--<order phase="Dispatch"/>-->
+ <!--</handler>-->
+
+ <!--<handler name="SOAPMessageBodyBasedDispatcher"-->
+ <!--class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">-->
+ <!--<order phase="Dispatch"/>-->
+ <!--</handler>-->
+ <handler name="InstanceDispatcher"
+ class="org.apache.axis2.engine.InstanceDispatcher">
+ <order phase="PostDispatch"/>
+ </handler>
+ </phase>
+ <!-- user can add his own phases to this area -->
+ <phase name="OperationInFaultPhase"/>
+ </phaseOrder>
+ <phaseOrder type="Outfaultflow">
+ <!-- user can add his own phases to this area -->
+ <phase name="OperationOutFaultPhase"/>
+ <phase name="PolicyDetermination"/>
+ <phase name="MessageOut"/>
+ </phaseOrder>
+</axisconfig>
\ No newline at end of file
Added: incubator/synapse/tags/M2/repository/conf/sample/axis2.xml
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/repository/conf/sample/axis2.xml?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/repository/conf/sample/axis2.xml (added)
+++ incubator/synapse/tags/M2/repository/conf/sample/axis2.xml Thu Jun 1 02:28:13 2006
@@ -0,0 +1,164 @@
+<axisconfig name="SynapseAxisJava2.0">
+ <!-- ================================================= -->
+ <!-- Parameters -->
+ <!-- ================================================= -->
+ <parameter name="hotdeployment" locked="false">true</parameter>
+ <parameter name="hotupdate" locked="false">false</parameter>
+ <parameter name="enableMTOM" locked="false">false</parameter>
+ <parameter name="sendStacktraceDetailsWithFaults" locked="false">true</parameter>
+
+ <!-- Uncomment this to enable REST support -->
+ <!-- <parameter name="enableREST" locked="false">true</parameter>-->
+
+ <parameter name="userName" locked="false">admin</parameter>
+ <parameter name="password" locked="false">axis2</parameter>
+
+ <!-- Always engage addressing for Synapse -->
+ <module ref="addressing"/>
+
+ <!-- ================================================= -->
+ <!-- Message Receivers -->
+ <!-- ================================================= -->
+ <!--This is the Deafult Message Receiver for the system , if you want to have MessageReceivers for -->
+ <!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
+ <!--any operation -->
+ <!--Note : You can ovride this for particular service by adding the same element with your requirement-->
+ <messageReceivers>
+ <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+ class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+ <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+ class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ </messageReceivers>
+ <!-- ================================================= -->
+ <!-- Transport Ins -->
+ <!-- ================================================= -->
+ <transportReceiver name="http"
+ class="org.apache.axis2.transport.http.SimpleHTTPServer">
+ <parameter name="port" locked="false">6060</parameter>
+ <!--If you want to give your own host address for EPR generation-->
+ <!--uncommet following paramter , and set as you required.-->
+ <!--<parameter name="hostname" locked="false">http://myApp.com/ws</parameter>-->
+ </transportReceiver>
+
+ <transportReceiver name="tcp"
+ class="org.apache.axis2.transport.tcp.TCPServer">
+ <parameter name="port" locked="false">6061</parameter>
+ <!--If you want to give your own host address for EPR generation-->
+ <!--uncommet following paramter , and set as you required.-->
+ <!--<parameter name="hostname" locked="false">tcp://myApp.com/ws</parameter>-->
+ </transportReceiver>
+
+ <!-- ================================================= -->
+ <!-- Transport Outs -->
+ <!-- ================================================= -->
+
+ <transportSender name="tcp"
+ class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+ <transportSender name="local"
+ class="org.apache.axis2.transport.local.LocalTransportSender"/>
+ <transportSender name="jms"
+ class="org.apache.axis2.transport.jms.JMSSender"/>
+ <transportSender name="http"
+ class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+ <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+ <parameter name="Transfer-Encoding" locked="false">chunked</parameter>
+ </transportSender>
+ <transportSender name="https"
+ class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+ <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+ <parameter name="Transfer-Encoding" locked="false">chunked</parameter>
+ </transportSender>
+
+ <!-- ================================================= -->
+ <!-- Phases -->
+ <!-- ================================================= -->
+ <phaseOrder type="inflow">
+ <!-- System pre defined phases -->
+ <phase name="Transport">
+ <!--<handler name="RequestURIBasedDispatcher"-->
+ <!--class="org.apache.axis2.engine.RequestURIBasedDispatcher">-->
+ <!--<order phase="Dispatch"/>-->
+ <!--</handler>-->
+ <!--<handler name="SOAPActionBasedDispatcher"-->
+ <!--class="org.apache.axis2.engine.SOAPActionBasedDispatcher">-->
+ <!--<order phase="Dispatch"/>-->
+ <!--</handler>-->
+ </phase>
+ <phase name="Security"/>
+ <phase name="PreDispatch"/>
+ <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+ <handler name="SynapseDispatcher"
+ class="org.apache.synapse.core.axis2.SynapseDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+
+ <!--<handler name="AddressingBasedDispatcher"-->
+ <!--class="org.apache.axis2.engine.AddressingBasedDispatcher">-->
+ <!--<order phase="Dispatch"/>-->
+ <!--</handler>-->
+
+ <!--<handler name="SOAPMessageBodyBasedDispatcher"-->
+ <!--class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">-->
+ <!--<order phase="Dispatch"/>-->
+ <!--</handler>-->
+
+ <handler name="InstanceDispatcher"
+ class="org.apache.axis2.engine.InstanceDispatcher">
+ <order phase="PostDispatch"/>
+ </handler>
+ </phase>
+ <!-- System pre defined phases -->
+ <!-- After Postdispatch phase module author or or service author can add any phase he want -->
+ <phase name="OperationInPhase"/>
+ </phaseOrder>
+ <phaseOrder type="outflow">
+ <!-- user can add his own phases to this area -->
+ <phase name="OperationOutPhase"/>
+ <!--system predefined phase-->
+ <!--these phase will run irrespective of the service-->
+ <phase name="PolicyDetermination"/>
+ <phase name="MessageOut"/>
+ </phaseOrder>
+ <phaseOrder type="INfaultflow">
+ <phase name="PreDispatch"/>
+ <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+
+ <handler name="SynapseDispatcher"
+ class="org.apache.synapse.core.axis2.SynapseDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+
+ <!--<handler name="RequestURIBasedDispatcher"-->
+ <!--class="org.apache.axis2.engine.RequestURIBasedDispatcher">-->
+ <!--<order phase="Dispatch"/>-->
+ <!--</handler>-->
+
+ <!--<handler name="SOAPActionBasedDispatcher"-->
+ <!--class="org.apache.axis2.engine.SOAPActionBasedDispatcher">-->
+ <!--<order phase="Dispatch"/>-->
+ <!--</handler>-->
+
+ <!--<handler name="AddressingBasedDispatcher"-->
+ <!--class="org.apache.axis2.engine.AddressingBasedDispatcher">-->
+ <!--<order phase="Dispatch"/>-->
+ <!--</handler>-->
+
+ <!--<handler name="SOAPMessageBodyBasedDispatcher"-->
+ <!--class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">-->
+ <!--<order phase="Dispatch"/>-->
+ <!--</handler>-->
+ <handler name="InstanceDispatcher"
+ class="org.apache.axis2.engine.InstanceDispatcher">
+ <order phase="PostDispatch"/>
+ </handler>
+ </phase>
+ <!-- user can add his own phases to this area -->
+ <phase name="OperationInFaultPhase"/>
+ </phaseOrder>
+ <phaseOrder type="Outfaultflow">
+ <!-- user can add his own phases to this area -->
+ <phase name="OperationOutFaultPhase"/>
+ <phase name="PolicyDetermination"/>
+ <phase name="MessageOut"/>
+ </phaseOrder>
+</axisconfig>
\ No newline at end of file
Added: incubator/synapse/tags/M2/repository/conf/sample/springsample.xml
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/repository/conf/sample/springsample.xml?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/repository/conf/sample/springsample.xml (added)
+++ incubator/synapse/tags/M2/repository/conf/sample/springsample.xml Thu Jun 1 02:28:13 2006
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
+ "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<beans>
+
+ <bean id="springtest" class="org.apache.synapse.spring.SpringTestBean" singleton="false">
+ <property name="testProperty"><value>100</value></property>
+ <property name="handler"><ref bean="handler"/></property>
+ </bean>
+
+ <bean id="handler" class="org.apache.synapse.spring.TestMediateHandlerImpl" singleton="true"/>
+
+</beans>
\ No newline at end of file
Added: incubator/synapse/tags/M2/repository/conf/sample/synapse_sample_0.xml
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/repository/conf/sample/synapse_sample_0.xml?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/repository/conf/sample/synapse_sample_0.xml (added)
+++ incubator/synapse/tags/M2/repository/conf/sample/synapse_sample_0.xml Thu Jun 1 02:28:13 2006
@@ -0,0 +1,39 @@
+<synapse xmlns="http://ws.apache.org/ns/synapse">
+
+ <definitions>
+
+ <sequence name="stockquote">
+ <!-- set the To address to the real endpoint -->
+ <header name="To" value="http://www.webservicex.net/stockquote.asmx"/>
+
+ <!-- check if the symbol is MSFT -->
+ <filter xpath="//*[wsx:symbol='MSFT']" xmlns:wsx="http://www.webserviceX.NET/">
+ <!-- if it is throw a fault -->
+ <makefault>
+ <code value="tns:Receiver" xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/>
+ <reason value="Isn't there a Windows API for that?"/>
+ </makefault>
+ </filter>
+ </sequence>
+
+ </definitions>
+
+ <rules>
+ <!-- now log the message using log4j -->
+ <log level="full"/>
+
+ <!-- Check if the URL matches the stockquote gateway/dumb case -->
+ <filter source="get-property('To')" regex=".*/StockQuote.*">
+ <sequence ref="stockquote"/>
+ </filter>
+
+ <!-- check if the URL matches the virtual url - either the proxy or ws-add case -->
+ <filter source="get-property('To')" regex="http://stockquote.*">
+ <sequence ref="stockquote"/>
+ </filter>
+
+ <!-- send the message on -->
+ <send/>
+ </rules>
+
+</synapse>
\ No newline at end of file
Added: incubator/synapse/tags/M2/repository/conf/sample/synapse_sample_1.xml
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/repository/conf/sample/synapse_sample_1.xml?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/repository/conf/sample/synapse_sample_1.xml (added)
+++ incubator/synapse/tags/M2/repository/conf/sample/synapse_sample_1.xml Thu Jun 1 02:28:13 2006
@@ -0,0 +1,85 @@
+<synapse xmlns="http://ws.apache.org/ns/synapse">
+
+ <definitions>
+
+ <sequence name="customrequest">
+ <!-- set the To address to the real endpoint -->
+ <header name="To" value="http://ws.invesbot.com/stockquotes.asmx"/>
+
+ <!-- set correlation field to custom label -->
+ <set-property name="correlate/label" value="customquote"/>
+
+ <!-- transform the custom quote into a standard quote requst -->
+ <transform xslt="file:synapse_repository/conf/sample/transform.xslt"/>
+
+ <!-- send message to real endpoint and stop -->
+ <send/>
+ </sequence>
+
+ <sequence name="customresponse">
+ <!-- transform the custom quote into a standard quote requst -->
+ <transform xslt="file:synapse_repository/conf/sample/transform_back.xslt"/>
+
+ <!-- now send the custom response back to the client and stop -->
+ <send/>
+ </sequence>
+
+ <sequence name="stockquote">
+ <!-- set the To address to the real endpoint -->
+ <header name="To" value="http://ws.invesbot.com/stockquotes.asmx"/>
+
+ <!-- check if the symbol is MSFT -->
+ <filter xpath="//*[wsx:symbol='MSFT']" xmlns:wsx="http://www.webserviceX.NET/">
+ <!-- if it is throw a fault -->
+ <makefault>
+ <code value="tns:Receiver" xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/>
+ <reason value="Isn't there a Windows API for that?"/>
+ </makefault>
+ </filter>
+
+ <send/>
+ </sequence>
+
+ <sequence name="standardrequest">
+ <!-- now log the message using log4j -->
+ <log level="full"/>
+
+ <!-- Check if the URL matches the stockquote gateway/dumb case -->
+ <filter source="get-property('To')" regex=".*/StockQuote.*">
+ <sequence ref="stockquote"/>
+ </filter>
+
+ <!-- check if the URL matches the virtual url - either the proxy or ws-add case -->
+ <filter source="get-property('To')" regex="http://stockquote.*">
+ <sequence ref="stockquote"/>
+ </filter>
+
+ <!-- send the message on -->
+ <send/>
+ </sequence>
+
+ </definitions>
+
+ <rules>
+ <in>
+ <!-- is this a custom stock quote message? -->
+ <filter xpath="//m0:CheckPriceRequest" xmlns:m0="http://www.apache-synapse.org/test">
+ <sequence ref="customrequest"/>
+ </filter>
+
+ <!-- else, proceed as usual with the standard processing rules -->
+ <sequence ref="standardrequest"/>
+ </in>
+
+ <out>
+ <!-- is this a custom stock quote reply? -->
+ <filter source="get-property('correlate/label')" regex="customquote">
+ <sequence ref="customresponse"/>
+ </filter>
+
+ <!-- just let the message flow through -->
+ <send/>
+ </out>
+ </rules>
+
+</synapse>
\ No newline at end of file
Added: incubator/synapse/tags/M2/repository/conf/sample/synapse_sample_2.xml
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/repository/conf/sample/synapse_sample_2.xml?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/repository/conf/sample/synapse_sample_2.xml (added)
+++ incubator/synapse/tags/M2/repository/conf/sample/synapse_sample_2.xml Thu Jun 1 02:28:13 2006
@@ -0,0 +1,125 @@
+<synapse xmlns="http://ws.apache.org/ns/synapse">
+
+ <definitions>
+
+ <!-- define global properties -->
+ <set-property name="version" value="0.1"/>
+
+ <!-- define a reuseable endpoint definition and use it within config -->
+ <endpoint name="invesbot" address="http://ws.invesbot.com/stockquotes.asmx"/>
+
+ <sequence name="customrequest">
+ <!-- is this a valid custom request ? -->
+ <validate schema="file:synapse_repository/conf/sample/validate.xsd">
+ <on-fail>
+ <!-- if the request does not validate againt schema throw a fault -->
+ <makefault>
+ <code value="tns:Receiver" xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/>
+ <reason value="Invalid custom quote request"/>
+ </makefault>
+
+ <!-- send the fault and stop processing -->
+ <send/>
+ </on-fail>
+ </validate>
+
+ <switch source="//m0:CheckPriceRequest/m0:Code" xmlns:m0="http://www.apache-synapse.org/test">
+ <case regex="IBM">
+ <set-property name="symbol" value="Great stock - IBM"/>
+ </case>
+ <case regex="MSFT">
+ <set-property name="symbol" value="Are you sure? - MSFT"/>
+ </case>
+ <default>
+ <set-property name="symbol" expression="fn:concat('Normal Stock - ', //m0:CheckPriceRequest/m0:Code)" xmlns:m0="http://www.apache-synapse.org/test"/>
+ </default>
+ </switch>
+
+ <!-- set a dynamic (local) message property -->
+
+
+ <!-- set correlation field to custom label -->
+ <set-property name="correlate/label" value="customquote"/>
+
+ <!-- transform the custom quote into a standard quote requst -->
+ <transform xslt="file:synapse_repository/conf/sample/transform.xslt"/>
+
+ <log level="custom">
+ <property name="Text" value="Sending quote request"/>
+ <property name="version" expression="get-property('version')"/>
+ <property name="symbol" expression="get-property('symbol')"/>
+ </log>
+
+ <!-- send message to real endpoint referenced by name "invesbot" and stop -->
+ <send>
+ <endpoint ref="invesbot"/>
+ </send>
+ </sequence>
+
+ <sequence name="customresponse">
+ <!-- transform the custom quote into a standard quote requst -->
+ <transform xslt="file:synapse_repository/conf/sample/transform_back.xslt"/>
+
+ <!-- now send the custom response back to the client and stop -->
+ <send/>
+ </sequence>
+
+ <sequence name="stockquote">
+ <!-- set the To address to the real endpoint -->
+ <header name="To" value="http://ws.invesbot.com/stockquotes.asmx"/>
+
+ <!-- check if the symbol is MSFT -->
+ <filter xpath="//*[wsx:symbol='MSFT']" xmlns:wsx="http://www.webserviceX.NET/">
+ <!-- if it is throw a fault -->
+ <makefault>
+ <code value="tns:Receiver" xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/>
+ <reason value="Isn't there a Windows API for that?"/>
+ </makefault>
+ </filter>
+
+ <send/>
+ </sequence>
+
+ <sequence name="standardrequest">
+ <!-- now log the message using log4j -->
+ <log level="full"/>
+
+ <!-- Check if the URL matches the stockquote gateway/dumb case -->
+ <filter source="get-property('To')" regex=".*/StockQuote.*">
+ <sequence ref="stockquote"/>
+ </filter>
+
+ <!-- check if the URL matches the virtual url - either the proxy or ws-add case -->
+ <filter source="get-property('To')" regex="http://stockquote.*">
+ <sequence ref="stockquote"/>
+ </filter>
+
+ <!-- send the message on -->
+ <send/>
+ </sequence>
+
+ </definitions>
+
+ <rules>
+ <in>
+ <!-- is this a custom stock quote message? -->
+ <filter xpath="//m0:CheckPriceRequest" xmlns:m0="http://www.apache-synapse.org/test">
+ <sequence ref="customrequest"/>
+ </filter>
+
+ <!-- else, proceed as usual with the standard processing rules -->
+ <sequence ref="standardrequest"/>
+ </in>
+
+ <out>
+ <!-- is this a custom stock quote reply? -->
+ <filter source="get-property('correlate/label')" regex="customquote">
+ <sequence ref="customresponse"/>
+ </filter>
+
+ <!-- just let the message flow through -->
+ <send/>
+ </out>
+ </rules>
+
+</synapse>
\ No newline at end of file
Added: incubator/synapse/tags/M2/repository/conf/sample/synapse_spring_unittest.xml
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/repository/conf/sample/synapse_spring_unittest.xml?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/repository/conf/sample/synapse_spring_unittest.xml (added)
+++ incubator/synapse/tags/M2/repository/conf/sample/synapse_spring_unittest.xml Thu Jun 1 02:28:13 2006
@@ -0,0 +1,12 @@
+<synapse xmlns="http://ws.apache.org/ns/synapse" xmlns:spring="http://ws.apache.org/ns/synapse/spring">
+
+ <definitions>
+ <spring:config name="springconfig" src="./../../repository/conf/sample/springsample.xml"/>
+ </definitions>
+
+ <rules>
+ <spring bean="springtest" config="springconfig"/>
+ <spring bean="springtest" src="./../../repository/conf/sample/springsample.xml"/>
+ </rules>
+
+</synapse>
\ No newline at end of file
Added: incubator/synapse/tags/M2/repository/conf/sample/transform.xslt
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/repository/conf/sample/transform.xslt?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/repository/conf/sample/transform.xslt (added)
+++ incubator/synapse/tags/M2/repository/conf/sample/transform.xslt Thu Jun 1 02:28:13 2006
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="2.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
+ xmlns:m0="http://www.apache-synapse.org/test"
+ exclude-result-prefixes="m0 fn">
+<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
+
+<xsl:template match="/">
+ <xsl:apply-templates select="//m0:CheckPriceRequest" />
+</xsl:template>
+
+<xsl:template match="m0:CheckPriceRequest">
+
+<m:GetQuote xmlns:m="http://ws.invesbot.com/">
+ <m:symbol><xsl:value-of select="m0:Code"/></m:symbol>
+</m:GetQuote>
+
+</xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
Added: incubator/synapse/tags/M2/repository/conf/sample/transform_back.xslt
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/repository/conf/sample/transform_back.xslt?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/repository/conf/sample/transform_back.xslt (added)
+++ incubator/synapse/tags/M2/repository/conf/sample/transform_back.xslt Thu Jun 1 02:28:13 2006
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="2.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
+ xmlns:m0="http://ws.invesbot.com/"
+ exclude-result-prefixes="m0 fn">
+<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
+
+<xsl:template match="/">
+ <xsl:apply-templates select="//m0:StockQuote" />
+</xsl:template>
+
+<xsl:template match="m0:StockQuote">
+
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+<soap:Body>
+<m:CheckPriceResponse xmlns:m="http://www.apache-synapse.org/test">
+ <m:Code><xsl:value-of select="m0:Symbol"/></m:Code>
+ <m:Price><xsl:value-of select="m0:Price"/></m:Price>
+</m:CheckPriceResponse>
+</soap:Body>
+</soap:Envelope>
+
+</xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
Added: incubator/synapse/tags/M2/repository/conf/sample/validate.xsd
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/repository/conf/sample/validate.xsd?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/repository/conf/sample/validate.xsd (added)
+++ incubator/synapse/tags/M2/repository/conf/sample/validate.xsd Thu Jun 1 02:28:13 2006
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.apache-synapse.org/test" elementFormDefault="qualified" attributeFormDefault="unqualified" targetNamespace="http://www.apache-synapse.org/test">
+ <xs:element name="CheckPriceRequest">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Code" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
\ No newline at end of file
Added: incubator/synapse/tags/M2/repository/conf/synapse.xml
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/repository/conf/synapse.xml?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/repository/conf/synapse.xml (added)
+++ incubator/synapse/tags/M2/repository/conf/synapse.xml Thu Jun 1 02:28:13 2006
@@ -0,0 +1,39 @@
+<synapse xmlns="http://ws.apache.org/ns/synapse">
+
+ <definitions>
+
+ <sequence name="stockquote">
+ <!-- set the To address to the real endpoint -->
+ <header name="To" value="http://www.webservicex.net/stockquote.asmx"/>
+
+ <!-- check if the symbol is MSFT -->
+ <filter xpath="//*[wsx:symbol='MSFT']" xmlns:wsx="http://www.webserviceX.NET/">
+ <!-- if it is throw a fault -->
+ <makefault>
+ <code value="tns:Receiver" xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/>
+ <reason value="Isn't there a Windows API for that?"/>
+ </makefault>
+ </filter>
+ </sequence>
+
+ </definitions>
+
+ <rules>
+ <!-- now log the message using log4j -->
+ <log level="full"/>
+
+ <!-- Check if the URL matches the stockquote gateway/dumb case -->
+ <filter source="get-property('To')" regex=".*/StockQuote.*">
+ <sequence ref="stockquote"/>
+ </filter>
+
+ <!-- check if the URL matches the virtual url - either the proxy or ws-add case -->
+ <filter source="get-property('To')" regex="http://stockquote.*">
+ <sequence ref="stockquote"/>
+ </filter>
+
+ <!-- send the message on -->
+ <send/>
+ </rules>
+
+</synapse>
\ No newline at end of file
Added: incubator/synapse/tags/M2/repository/modules/addressing-1.0.mar
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/repository/modules/addressing-1.0.mar?rev=410809&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/synapse/tags/M2/repository/modules/addressing-1.0.mar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/synapse/tags/M2/repository/services/emptymediator/META-INF/services.xml
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/repository/services/emptymediator/META-INF/services.xml?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/repository/services/emptymediator/META-INF/services.xml (added)
+++ incubator/synapse/tags/M2/repository/services/emptymediator/META-INF/services.xml Thu Jun 1 02:28:13 2006
@@ -0,0 +1,6 @@
+<service name="emptymediator">
+ <operation name="mediate" >
+ <messageReceiver class="org.apache.synapse.core.axis2.EmptyMessageReceiver" />
+ </operation>
+</service>
+
\ No newline at end of file
Added: incubator/synapse/tags/M2/repository/services/synapse/META-INF/services.xml
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/repository/services/synapse/META-INF/services.xml?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/repository/services/synapse/META-INF/services.xml (added)
+++ incubator/synapse/tags/M2/repository/services/synapse/META-INF/services.xml Thu Jun 1 02:28:13 2006
@@ -0,0 +1,8 @@
+ <service name="synapse">
+
+ <operation name="mediate" >
+ <messageReceiver class="org.apache.synapse.core.axis2.SynapseMessageReceiver" />
+ </operation>
+
+ </service>
+
\ No newline at end of file
Added: incubator/synapse/tags/M2/xdocs/download.cgi
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/xdocs/download.cgi?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/xdocs/download.cgi (added)
+++ incubator/synapse/tags/M2/xdocs/download.cgi Thu Jun 1 02:28:13 2006
@@ -0,0 +1,6 @@
+#!/bin/sh
+# Wrapper script around mirrors.cgi script
+# (we must change to that directory in order for python to pick up the
+# python includes correctly)
+cd /www/www.apache.org/dyn/mirrors
+/www/www.apache.org/dyn/mirrors/mirrors.cgi $*
\ No newline at end of file
Added: incubator/synapse/tags/M2/xdocs/download.html
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/xdocs/download.html?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/xdocs/download.html (added)
+++ incubator/synapse/tags/M2/xdocs/download.html Thu Jun 1 02:28:13 2006
@@ -0,0 +1,40 @@
+<html>
+<title>Synapse Downloads</title>
+
+<body>
+<h2>Releases</h2>
+
+<p>Synapse is still under active development and Synapse development community is proud to release Milestone version #2
+ as a big step towards <code>1.0</code> release.
+</p>
+<p></p>
+<table border="1" style="border-collapse: collapse" width="93%" id="table1">
+ <tbody>
+ <tr>
+ <td width="41" align="center">Name</td>
+ <td width="353" align="center">Type</td>
+ <td width="288" align="center">Distribution</td>
+ <td width="69" align="center">Date</td>
+ <td width="119" align="center">Description</td>
+ </tr>
+ <tr>
+ <td align="center" valign="middle"><a name="M1"></a>M1</td>
+ <td align="center">Milestone</td>
+ <td>Source Distribution zip<a href="" title="">zip</a><br>
+ Binary Distribution zip<a href="" title="">zip</a></td>
+ <td>xx-xx-xxxx</td>
+ <td>Milestone Release #1</td>
+ </tr>
+ <tr>
+ <td align="center" valign="middle"><a name="M2"></a>M2</td>
+ <td align="center">Milestone</td>
+ <td>Source Distribution zip<a href="" title="">zip</a><br>
+ Binary Distribution zip<a href="" title="">zip</a></td>
+ <td>xx-xx-xxxx</td>
+ <td>Milestone Release #2</td>
+ </tr>
+ </tbody>
+</table>
+<p> </p>
+</body>
+</html>
Added: incubator/synapse/tags/M2/xdocs/download.xml
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/xdocs/download.xml?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/xdocs/download.xml (added)
+++ incubator/synapse/tags/M2/xdocs/download.xml Thu Jun 1 02:28:13 2006
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * Copyright 2001-2004 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.
+ */
+ -->
+
+<document>
+
+ <properties>
+ <title>Apache Synapse Downloads</title>
+ </properties>
+
+ <body>
+ <section name="Releases">
+ <p>Synapse is still under active development and Synapse development community is proud to release the Milestone 2 release</p>
+ <table border="1" style="border-collapse: collapse" width="93%" id="table1">
+ <thead>
+ <tr>
+ <td width="41" align="center">Name</td>
+ <td width="353" align="center">Type</td>
+ <td width="288" align="center">Distribution</td>
+ <td width="69" align="center">Date</td>
+ <td width="119" align="center">Description</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td align="center" valign="middle">M1</td>
+ <td align="center">Milestone</td>
+ <td><a href="http://www.apache.org/dist/ws/synapse/M1/Synapse-Incubating-M1-src.zip" title="">Source Distribution zip</a><br/>
+ <a href="http://www.apache.org/dist/ws/synapse/M1/Synapse-Incubating-M1-bin.zip" title="">Binary Distribution zip</a></td>
+ <td>23-Jan-2006</td>
+ <td>Milestone 1</td>
+ </tr>
+ <tr>
+ <td align="center" valign="middle">M2</td>
+ <td align="center">Milestone</td>
+ <td><a href="http://www.apache.org/dist/ws/synapse/M2/Synapse-Incubating-M2-src.zip" title="">Source Distribution zip</a><br/>
+ <a href="http://www.apache.org/dist/ws/synapse/M2/Synapse-Incubating-M2-bin.zip" title="">Binary Distribution zip</a><br/>
+ <a href="http://www.apache.org/dist/ws/synapse/M2/Extensions-Synapse-M2-bin.zip" title="">Extensions Distribution zip</a></td>
+ <td>23-May-2006</td>
+ <td>Milestone 2</td>
+ </tr>
+ </tbody>
+ </table>
+
+ </section>
+ </body>
+</document>
Added: incubator/synapse/tags/M2/xdocs/extending_synapse.html
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/xdocs/extending_synapse.html?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/xdocs/extending_synapse.html (added)
+++ incubator/synapse/tags/M2/xdocs/extending_synapse.html Thu Jun 1 02:28:13 2006
@@ -0,0 +1,261 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta content="text/html; charset=ISO-8859-1"
+ http-equiv="content-type">
+ <title>Extending Synapse</title>
+</head>
+<body>
+<h1>Extending Synapse<br>
+</h1>
+<br>
+<h2>Writing custom Mediator implementations</h2>
+<p>The primary interface of the Synapse API is the MessageContext
+interface
+defined below. This essentially defines the per-message context passed
+through the chain of mediators, for each and every message received and
+processed by
+Synapse. Each message instance is wrapped within a MessageContext
+instance, and the message context is set with the references to the
+SynapseConfiguration and SynapseEnvironments to be used. The
+SynapseConfiguration holds the global configuration model that defines
+message
+mediation rules and common definitions to be used, while the
+environment gives
+access to the underlying SOAP implementation used.
+A typical mediator would need to manipulate the MessageContext by
+referring to the SynapseConfiguration. However it is strongly
+recommended that
+the SynapseConfiguration should not be updated by mediator instances as
+it is shared by all messages, and may be updated by Synapse
+administration or configuration modules.
+Mediator instances may store custom named properties into the
+MessageContext
+for later retrieval by successive mediators.<br>
+</p>
+<h4>MessageContext Interface</h4>
+<p></p>
+<pre>package org.apache.synapse;<br><br>import ...<br><br>public interface <span
+ style="font-weight: bold;">MessageContext </span>{<br><br> /**<br> * Get a reference to the current SynapseConfiguration<br> *<br> * @return the current synapse configuration<br> */<br> public SynapseConfiguration getConfiguration();<br><br> /**<br> * Set or replace the Synapse Configuration instance to be used. May be used to<br> * programatically change the configuration at runtime etc.<br> *<br> * @param cfg The new synapse configuration instance<br> */<br> public void setConfiguration(SynapseConfiguration cfg);<br><br> /**<br> * Returns a reference to the host Synapse Environment<br> * @return the Synapse Environment<br> */<br> public SynapseEnvironment getEnvironment();<br><br> /**<br> * Sets the SynapseEnvironment reference to this context<br> * @param se the reference to the Synapse Environment<br> */<br> public void setEnvironment(SynapseEnvironment se);<br><br> /**<br> * Get
the value of a custom (local) property set on the message instance<br> * @param key key to look up property<br> * @return value for the given key<br> */<br> public Object getProperty(String key);<br><br> /**<br> * Set a custom (local) property with the given name on the message instance<br> * @param key key to be used<br> * @param value value to be saved<br> */<br> public void setProperty(String key, Object value);<br><br> /**<br> * Returns the Set of keys over the properties on this message context<br> * @return a Set of keys over message properties<br> */<br> public Set getPropertyKeySet();<br><br> /**<br> * Get the SOAP envelope of this message<br> * @return the SOAP envelope of the message<br> */<br> public SOAPEnvelope getEnvelope();<br><br> /**<br> * Sets the given envelope as the current SOAPEnvelope for this message<br> * @param envelope the envelope to be set<br> * @throws org.ap
ache.axis2.AxisFault on exception<br> */<br> public void setEnvelope(SOAPEnvelope envelope) throws AxisFault;<br><br> /**<br> * SOAP message related getters and setters<br> */<br> public ....get/set()...<br><br>}<br></pre>
+<p>The MessageContext interface is based on the Axis2 <a>MessageContext</a>
+interface, and uses the Axis2 <a>EndpointReference</a> and
+SOAPEnvelope
+classes/interfaces.</p>
+<p>The purpose of this interface is to capture a message as it flows
+through the system. As you will see the messages are represented using
+the SOAP infoset. Binary messages can be embedded in the Envelope using
+the MTOM support built into Axis2's AXIOM object model.</p>
+<h4>Mediator interface</h4>
+<p>The second key interface for mediator writers is the Mediator
+interface:</p>
+<pre>package org.apache.synapse.api;<br><br>import org.apache.synapse.MessageContext;<br><br>/**<br> * All Synapse mediators must implement this Mediator interface. As a message passes<br> * through the synapse system, each mediator's mediate() method is invoked in the<br> * sequence/order defined in the SynapseConfiguration.<br> */<br>public interface <span
+ style="font-weight: bold;">Mediator </span>{<br><br> /**<br> * Invokes the mediator passing the current message for mediation. Each<br> * mediator performs its mediation action, and returns true if mediation<br> * should continue, or false if further mediation should be aborted.<br> *<br> * @param synCtx the current message for mediation<br> * @return true if further mediation should continue<br> */<br> public boolean mediate(MessageContext synCtx);<br><br> /**<br> * This is used for debugging purposes and exposes the type of the current<br> * mediator for logging and debugging purposes<br> * @return a String representation of the mediator type<br> */<br> public String getType();<br>}</pre>
+<p>A mediator can read and/or modify the <a>SynapseMessage</a> in any
+suitable
+manner - adjusting the routing headers or changing the message body. If
+the mediate() method
+returns false, it signals to the Synapse processing model to stop
+further processing of the message. For example, if the mediator is a
+security agent it
+may decide that this message is dangerous and should not be processed
+further. This is generally the exception as mediators are usually
+designed to co-operate to process the message onwards.<br>
+<br>
+</p>
+<h3>Leaf and Node Mediators, List mediators and Filter mediators<br>
+</h3>
+Mediators may be Node mediators (i.e. these contain sub mediators) or
+Leaf mediators (mediators that does not hold any sub mediators). A Node
+mediator must implement the org.apache.synapse.api.ListMediator
+interface listed below, or extend from the
+org.apache.synapse.mediators.AbstractListMediator.<br>
+<h4>The ListMediator interface<br>
+</h4>
+package org.apache.synapse.api;<br>
+<br>
+import java.util.List;<br>
+<br>
+/**<br>
+ * The List mediator executes a given sequence/list of child
+mediators<br>
+ */<br>
+public interface ListMediator extends Mediator {<br>
+<br>
+ /**<br>
+ * Appends the specified mediator to the end of
+this mediator's (children) list<br>
+ * @param m the mediator to be added<br>
+ * @return true (as per the general contract of
+the Collection.add method)<br>
+ */<br>
+ public boolean addChild(Mediator m);<br>
+<br>
+ /**<br>
+ * Appends all of the mediators in the
+specified collection to the end of this mediator's (children)<br>
+ * list, in the order that they are returned by
+the specified collection's iterator<br>
+ * @param c the list of mediators to be added<br>
+ * @return true if this list changed as a
+result of the call<br>
+ */<br>
+ public boolean addAll(List c);<br>
+<br>
+ /**<br>
+ * Returns the mediator at the specified
+position<br>
+ * @param pos index of mediator to return<br>
+ * @return the mediator at the specified
+position in this list<br>
+ */<br>
+ public Mediator getChild(int pos);<br>
+<br>
+ /**<br>
+ * Removes the first occurrence in this list of
+the specified mediator<br>
+ * @param m mediator to be removed from this
+list, if present<br>
+ * @return true if this list contained the
+specified mediator<br>
+ */<br>
+ public boolean removeChild(Mediator m);<br>
+<br>
+ /**<br>
+ * Removes the mediator at the specified
+position in this list<br>
+ * @param pos the index of the mediator to
+remove<br>
+ * @return the mediator previously at the
+specified position<br>
+ */<br>
+ public Mediator removeChild(int pos);<br>
+<br>
+ /**<br>
+ * Return the list of mediators of this List
+mediator instance<br>
+ * @return the child/sub mediator list<br>
+ */<br>
+ public List getList();<br>
+}<br>
+<br>
+A ListMediator implementation should call super.mediate(synCtx) to
+process its sub mediator sequence. A FilterMediator is a ListMediator
+which executes its sequence of sub mediators on successful outcome of a
+test condition. Mediator instance which performs filtering should
+implement the FilterMediator interface.<br>
+<br>
+<h4>FilterMediator interface</h4>
+<pre>package org.apache.synapse.api;<br><br>import org.apache.synapse.MessageContext;<br><br>/**<br> * The filter mediator is a list mediator, which executes the given (sub) list of mediators<br> * if the specified condition is satisfied<br> *<br> * @see FilterMediator#test(org.apache.synapse.MessageContext)<br> */<br>public interface <span
+ style="font-weight: bold;">FilterMediator </span>extends ListMediator {<br><br> /**<br> * Should return true if the sub/child mediators should execute. i.e. if the filter<br> * condition is satisfied<br> * @param synCtx<br> * @return true if the configured filter condition evaluates to true<br> */<br> public boolean test(MessageContext synCtx);<br>}<br></pre>
+<h2>Writing custom Configuration implementations for mediators<br>
+</h2>
+You may write your own custom configurator for the Mediator
+implementation you write without relying on the Class mediator or
+Spring
+extension for its initialization. You could thus write a
+MediatorFactory implementation which defines how to digest a custom
+XML configuration element to be used to create and configure the custom
+mediator instance. The custom
+MediatorFactory implementation and the mediator class must be bundled
+in a JAR file conforming to the J2SE Service Provider model (See the
+description for Extensions below for more details and examples) and
+placed into the SYNAPSE_HOME/lib folder, so that the Synapse runtime
+could find and load the definition.
+Essentially this means that a custom JAR file must bundle your class
+implementing the Mediator interface, and the MediatorFactory
+implementation class and contain a text file by the name
+"org.apache.synapse.config.xml.MediatorFactory" which will contain the
+fully qualified name(s) of your MediatorFactory implementation
+class(es). You should also place any dependency JARs into the same lib
+folder so that the correct classpath references could be made. <br>
+<br>
+The
+MediatorFactory interface listing is given below, which you should
+implement, and its getTagQName()
+method must define the fully qualified element of interest for custom
+configuration. The Synapse initialization will call back to this
+MediatorFactory
+instance through the
+createMediator(OMElement elem) method passing in this XML element, so
+that an instance of the mediator could be created utilizing the custom
+XML specification and returned.
+See the ValidateMediator and the ValidateMediatorFactory classes under
+modules/extensions in the Synapse source distribution for examples.<br>
+<br>
+<h4>The MediatorFactory interface</h4>
+<pre>package org.apache.synapse.config.xml;<br><br>import ...<br><br>/**<br> * A mediator factory capable of creating an instance of a mediator through a given<br> * XML should implement this interface<br> */<br>public interface MediatorFactory {<br> /**<br> * Creates an instance of the mediator using the OMElement<br> * @param elem<br> * @return the created mediator<br> */<br> public Mediator createMediator(OMElement elem);<br><br> /**<br> * The QName of this mediator element in the XML config<br> * @return QName of the mediator element<br> */<br> public QName getTagQName();<br>}<br></pre>
+<h2>Writing custom Configuration implementations for Configuration
+extensions</h2>
+Mediators could be configured in multiple ways as Synapse, i.e.
+Either through an XML configuration file, or programatically. If
+Synapse
+is initialized with a Synapse XML configuration which is the default,
+and you want to create a custom extension to the global Synapse
+configuration,
+you must implement the org.apache.synapse.config.Extension
+interface, and you must write your custom ExtensionFactory
+implementation which will create the instance of your extension, so
+that
+it could be set into the SynapseConfiguration as a named global
+'property'.
+The interfaces referenced are listed below.<br>
+<br>
+<h4>The Extension interface</h4>
+<pre>package org.apache.synapse.config;<br><br>import ...<br><br>/**<br> * An Extension allows the Synapse configuration to be extended. The Spring<br> * configuration support is implemented as such an extension, so that the<br> * Synapse core will not be dependent on Spring classes. An extension<br> * <b>must</b> specify the following methods to set and get its name.<br> */<br>public interface Extension {<br><br> public String getName();<br><br> public void setName(String name);<br> <br>}<br></pre>
+<h4>The ExtensionFactory interface<br>
+</h4>
+<pre>package org.apache.synapse.config.xml;<br><br>import ....<br><br>/**<br> * A extension factory that is capable of creating an instance of a<br> * named extension, through a given XML, should implement this interface<br> */<br>public interface ExtensionFactory {<br> /**<br> * Creates an instance of a named extension using the OMElement<br> * @param elem<br> * @return the created named extension<br> */<br> public Extension createExtension(OMElement elem);<br><br> /**<br> * The QName of the extension element in the XML config<br> * @return QName of the extension element<br> */<br> public QName getTagQName();<br><br>}<br></pre>
+<h4>Loading of Extensions by the Synapse runtime</h4>
+Synapse loads available extensions from the runtime classpath using the
+<a
+ href="http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Service%20Provider">J2SE
+Service Provider model</a>.
+This essentially iterates over the available JAR files, for a
+META-INF/services directory within each file, and looks for a
+text
+file with the name org.apache.synapse.config.xml.ExtensionFactory which
+contains a list of fully qualified classname that implement the above
+interface, listing each class in a separate line.<br>
+<br>
+e.g. The built-in extension_mediators.jar contains the following
+structure<br>
+<br>
+<pre>extension_mediators.jar<br> /META-INF/services<br> org.apache.synapse.config.xml.ExtensionFactory<br> org.apache.synapse.config.xml.MediatorFactory<br> /... the implementation classes as usual...<br><br></pre>
+The org.apache.synapse.config.xml.ExtensionFactory text file discussed
+above contains the line
+"org.apache.synapse.config.xml.SpringConfigExtensionFactory" but may
+contain multiple lines specifying a list of extensions contained within
+the specific JAR file.<br>
+<br>
+Once the available ExtensionFactory implementations are loaded by the
+Synapse initializer, it accumulates the list of defined XML
+configuration elements by calling to the getTagQName() method of the
+ExtensionFactory implementation. Lets consider the Spring extension as
+an example.<br>
+<br>
+<pre>package org.apache.synapse.config.xml;<br><br>import ...<br><br>/**<br> * Creates a Spring configuration extension from XML configuration. A Spring<br> * configuration extension keeps Spring away from the core of synapse<br> *<br> * <spring:config name="string" src="file"/><br> */<br>public class SpringConfigExtensionFactory implements ExtensionFactory {<br><br> private static final Log log = LogFactory.getLog(SpringConfigExtensionFactory.class);<br><br> private static final QName SPRING_CFG_Q = new QName(Constants.SYNAPSE_NAMESPACE + "/spring", "config");<br><br> /**<br> * <spring:config name="string" src="file"/><br> *<br> * @param elem the XML configuration element<br> * @return A named Spring Configuration<br> */<br> public Extension createExtension(OMElement elem) {<br><br> SpringConfigExtension springCfgExt = null;<br> OMAttribute name = elem.getAttribute(new QName(Constants.NULL_NAMESPACE, "name"));<br>
OMAttribute src = elem.getAttribute(new QName(Constants.NULL_NAMESPACE, "src"));<br><br> if (name == null) {<br> handleException("The 'name' attribute is required for a Spring configuration definition");<br> } else if (src == null) {<br> handleException("The 'src' attribute is required for a Spring configuration definition");<br> } else {<br> springCfgExt = new SpringConfigExtension(name.getAttributeValue(), src.getAttributeValue());<br> }<br> return springCfgExt;<br> }<br><br> private void handleException(String msg) {<br> log.error(msg);<br> throw new SynapseException(msg);<br> }<br>}<br></pre>
+The getTagQName() returns the name space
+"http://ws.apache.org/ns/synapse/spring" and the element name as
+"config", and thus registers itself as the handler for a
+<spring:config .../> element where the namespace spring refers to
+"http://ws.apache.org/ns/synapse/spring". It should be noted that the
+XML configuration extensions must reside within the <definitions>
+elements of the Synapse XML configuration. Refer to the Synapse
+configuration language syntax for more information on the structure of
+the Synapse XML. If the Synapse configuration builder comes across an
+XML configuration element that has been registers (as shown above), it
+will then call into the implementation of the ExtensionFactory
+implementations' createExtension(OMElement elem) method with the XML
+element, and an instance of the Extension interface implementation in
+return. This extension implementation class getName() method is used to
+store it into the SynapseConfiguration, as a "property", and thus could
+be retrieved later via this same "name". Hence the implementations
+should be careful to use unique meaningful names for their
+implementations.<br>
+<br>
+For completeness, the implementation of the Spring extension is
+given in the following listing.<br>
+<br>
+<pre>package org.apache.synapse.config;<br><br>import ...<br><br>/**<br> * This defines an extension to Synapse to process a Spring Configuration.<br> * This keeps the Spring dependency out from the Synapse core, and the<br> * dependent Jars from the core distribution.<br> *<br> * A Spring configuration is usually named, but this class allows an<br> * inlined configuration to be built up as well, where the Spring mediator<br> * defines an inline Spring configuration<br> */<br>public class SpringConfigExtension implements Extension {<br><br> /**<br> * The name of this Spring configuration<br> */<br> private String name = null;<br><br> /**<br> * This is the Spring ApplicationContext/BeanFactory<br> */<br> private GenericApplicationContext appContext = null;<br><br> /**<br> * Create a Spring configuration from the given configuration<br> *<br> * @param configFile the configuration file to be used<br> */<br> public SpringConfigEx
tension(String name, String configFile) {<br> setName(name);<br> appContext = new GenericApplicationContext();<br> XmlBeanDefinitionReader xbdr = new XmlBeanDefinitionReader(appContext);<br> xbdr.setValidating(false);<br> xbdr.loadBeanDefinitions(new FileSystemResource(configFile));<br> appContext.refresh();<br> }<br><br> public GenericApplicationContext getAppContext() {<br> return appContext;<br> }<br><br> public String getName() {<br> return name;<br> }<br><br> public void setName(String name) {<br> this.name = name;<br> }<br><br> public QName getTagQName() {<br> return SPRING_CFG_Q;<br> }<br>}<br><br></pre>
+</body>
+</html>
Added: incubator/synapse/tags/M2/xdocs/getInvolved.html
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/xdocs/getInvolved.html?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/xdocs/getInvolved.html (added)
+++ incubator/synapse/tags/M2/xdocs/getInvolved.html Thu Jun 1 02:28:13 2006
@@ -0,0 +1,15 @@
+<html>
+<body>
+<title>Get Involved</title>
+
+<p>For more information see</p>
+
+<ol>
+ <li>The original proposal: <a href="http://wiki.apache.org/incubator/SynapseProposal">http://wiki.apache.org/incubator/SynapseProposal</a></li>
+ <li>The Wiki: <a href="http://wiki.apache.org/ws/Synapse">http://wiki.apache.org/ws/Synapse</a></li>
+ <li>The Synapse Configuration Language: <a href="http://wiki.apache.org/incubator/Synapse/SynapseConfigurationLanguage">http://wiki.apache.org/incubator/Synapse/SynapseConfigurationLanguage</a></li>
+ <!--<li>The Wiki User Guide: <a href="http://wiki.apache.org/ws/Synapse/UserGuide">http://wiki.apache.org/ws/Synapse/UserGuide</a></li>-->
+ <!--<li>M1 release criteria: <a href="http://wiki.apache.org/ws/Synapse/M1Criteria">http://wiki.apache.org/ws/Synapse/M1Criteria</a></li>-->
+</ol>
+</body>
+</html>
\ No newline at end of file
Added: incubator/synapse/tags/M2/xdocs/index.xml
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/xdocs/index.xml?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/xdocs/index.xml (added)
+++ incubator/synapse/tags/M2/xdocs/index.xml Thu Jun 1 02:28:13 2006
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+/*
+ * Copyright 2001-2004 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.
+ */
+ -->
+
+<document>
+
+ <properties>
+ <title>Apache Synapse</title>
+ </properties>
+
+<body>
+
+<section name="Apache Synapse">
+ <p>
+ The Synapse project will create a robust, lightweight
+ implementation of a highly scalable and distributed service mediation
+ framework based on Web services specifications.
+ </p>
+
+ <p>For more information, see:</p>
+ <ul>
+ <li>The wiki (we use this more than this main site): <a href="http://wiki.apache.org/ws/Synapse">http://wiki.apache.org/ws/Synapse</a></li>
+ <li>The original proposal: <a href="http://wiki.apache.org/incubator/SynapseProposal">http://wiki.apache.org/incubator/SynapseProposal</a></li>
+ <li>The Synapse Configuration Language: <a href="http://wiki.apache.org/incubator/Synapse/SynapseConfigurationLanguage">http://wiki.apache.org/incubator/Synapse/SynapseConfigurationLanguage</a></li>
+ <li>The Wiki User Guide: <a href="http://wiki.apache.org/incubator/Synapse/SynapseUserGuide">http://wiki.apache.org/incubator/Synapse/SynapseUserGuide</a></li>
+ <li>The Wiki Synapse extension guide: <a href="http://wiki.apache.org/incubator/Synapse/ExtendingSynapse">http://wiki.apache.org/incubator/Synapse/ExtendingSynapse</a></li>
+ <li>The M2 release download is available from <a href="http://www.apache.org/dist/ws/synapse/M2/">http://www.apache.org/dist/ws/synapse/M2</a></li>
+ <li>The developer mailing list: <a href="mailto:synapse-dev-subscribe@ws.apache.org">Subscribe</a></li>
+ <li>The users mailing list: <a href="mailto:synapse-user-subscribe@ws.apache.org">Subscribe</a></li>
+ </ul>
+</section>
+
+<section name="Introduction">
+ <p>Synapse is a mediation framework for Web Services. Synapse allows messages flowing through, into, or out of an organization to be mediated.</p>
+ <!--<p>The user guide is available at <a class="external" rel="nofollow" href="http://wiki.apache.org/ws/Synapse/UserGuide">http://wiki.apache.org/ws/Synapse/UserGuide</a> </p>-->
+ <p>The configuration language and its syntax is available at <a class="external" rel="nofollow" href="http://wiki.apache.org/incubator/Synapse/SynapseConfigurationLanguage">http://wiki.apache.org/incubator/Synapse/SynapseConfigurationLanguage</a> </p>
+
+ <p>Synapse, incidentally, is pronounced "sine-apse", and not "sin-apse". </p>
+</section>
+
+<section name="Status">
+ <p>Synapse is an effort undergoing incubation at the Apache Software Foundation (ASF),
+ sponsored by the Web Services PMC. Incubation is required of all newly accepted projects
+ until a further review indicates that the infrastructure, communications, and decision making process
+ have stabilized in a manner consistent with other successful ASF projects.
+ While incubation status is not necessarily a reflection of the completeness or
+ stability of the code, it does indicate that the project has
+ yet to be fully endorsed by the ASF.</p>
+
+ <p>We have released the second Milestone M2. The release will support: </p>
+
+ <ul>
+ <li><p> A streamlined configuration model and a new XML syntax</p></li>
+ <li><p> Concept of Endpoints </p></li>
+ <li><p> Global and message context based 'properties', and a new XPath extention function synapse:get-property() to read them</p></li>
+ <li><p> New mediators - Switch & Validate </p></li>
+ <li><p> Enhanced and streamlined mediators - send, drop, log, makefault, transform, header, filter, class, set-property, sequence, in & out </p></li>
+ <li><p> Message correlation support</p></li>
+ <li><p> Enhanced Spring support</p></li>
+ <li><p> Synapse initialization on Axis2 startup</p></li>
+ <li><p> Sample applications and configurations demonstrating most of the above features </p></li>
+ <li><p> Enhanced documentation </p></li>
+ </ul>
+</section>
+
+</body>
+</document>
Added: incubator/synapse/tags/M2/xdocs/navigation.xml
URL: http://svn.apache.org/viewvc/incubator/synapse/tags/M2/xdocs/navigation.xml?rev=410809&view=auto
==============================================================================
--- incubator/synapse/tags/M2/xdocs/navigation.xml (added)
+++ incubator/synapse/tags/M2/xdocs/navigation.xml Thu Jun 1 02:28:13 2006
@@ -0,0 +1,22 @@
+<project name="Synapse">
+ <title>Synapse</title>
+ <body>
+ <menu name="Synapse">
+ <item name="Home" href="index.html"/>
+ <item name="Download Synapse">
+ <item name="Releases" href="download.html"/>
+ <item name="Source Code" href="http://svn.apache.org/viewcvs.cgi/incubator/synapse/trunk/java/"/>
+ </item>
+ <item name="Documentation">
+ <item name="Synapse configuration language and syntax" href="http://wiki.apache.org/incubator/Synapse/SynapseConfigurationLanguage"/>
+ <item name="User Guide" href="userguide.html"/>
+ <item name="Extending Synapse" href="extending_synapse.html"/>
+ </item>
+ <item name="Get Involved" href="getInvolved.html" />
+ <item name="Project Information">
+ <item name="Issue Tracking" href="http://issues.apache.org/jira/browse/Synapse"/>
+ <item name="Mailing List" href="mail-lists.html"/>
+ </item>
+ </menu>
+ </body>
+</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org