You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by as...@apache.org on 2007/03/17 17:18:47 UTC

svn commit: r519363 [13/16] - in /webservices/synapse/trunk/java: modules/core/ modules/core/src/main/java/org/apache/synapse/ modules/core/src/main/java/org/apache/synapse/config/ modules/core/src/main/java/org/apache/synapse/config/xml/ modules/core/...

Modified: webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/ProxyStockQuoteClient.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/ProxyStockQuoteClient.java?view=diff&rev=519363&r1=519362&r2=519363
==============================================================================
--- webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/ProxyStockQuoteClient.java (original)
+++ webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/ProxyStockQuoteClient.java Sat Mar 17 09:18:32 2007
@@ -1,88 +1,88 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you 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.
- */
-
-package samples.userguide;
-
-import org.apache.axiom.om.OMElement;
-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 samples.common.StockQuoteHandler;
-
-import java.net.URL;
-
-
-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) {
-
-        String symbol = "IBM";
-        String xurl   = "http://localhost:9000/axis2/services/SimpleStockQuoteService";
-        String purl   = "http://localhost:8080";
-        String sAction= "urn:getQuote";
-
-        if (args.length > 0) symbol = args[0];
-        if (args.length > 1) xurl   = args[1];
-        if (args.length > 2) purl   = args[2];
-
-        try {
-            OMElement getQuote = StockQuoteHandler.createStandardRequestPayload(symbol);
-
-            Options options = new Options();
-            if (xurl != null)
-                options.setTo(new EndpointReference(xurl));
-            options.setAction(sAction);
-
-            ServiceClient serviceClient = new ServiceClient();
-
-            // engage HTTP Proxy
-
-            HttpTransportProperties.ProxyProperties proxyProperties =new
-                HttpTransportProperties.ProxyProperties();
-            URL url = new URL(purl);
-            proxyProperties.setProxyName(url.getHost());
-            proxyProperties.setProxyPort(url.getPort());
-            proxyProperties.setUserName("");
-            proxyProperties.setPassWord("");
-            proxyProperties.setDomain("");
-            options.setProperty(HTTPConstants.PROXY, proxyProperties);
-
-            serviceClient.setOptions(options);
-
-            OMElement result = serviceClient.sendReceive(getQuote).getFirstElement();
-            System.out.println("Standard :: Stock price = $" +
-                StockQuoteHandler.parseStandardResponsePayload(result));
-
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you 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.
+ */
+
+package samples.userguide;
+
+import org.apache.axiom.om.OMElement;
+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 samples.common.StockQuoteHandler;
+
+import java.net.URL;
+
+
+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) {
+
+        String symbol = "IBM";
+        String xurl   = "http://localhost:9000/axis2/services/SimpleStockQuoteService";
+        String purl   = "http://localhost:8080";
+        String sAction= "urn:getQuote";
+
+        if (args.length > 0) symbol = args[0];
+        if (args.length > 1) xurl   = args[1];
+        if (args.length > 2) purl   = args[2];
+
+        try {
+            OMElement getQuote = StockQuoteHandler.createStandardRequestPayload(symbol);
+
+            Options options = new Options();
+            if (xurl != null)
+                options.setTo(new EndpointReference(xurl));
+            options.setAction(sAction);
+
+            ServiceClient serviceClient = new ServiceClient();
+
+            // engage HTTP Proxy
+
+            HttpTransportProperties.ProxyProperties proxyProperties =new
+                HttpTransportProperties.ProxyProperties();
+            URL url = new URL(purl);
+            proxyProperties.setProxyName(url.getHost());
+            proxyProperties.setProxyPort(url.getPort());
+            proxyProperties.setUserName("");
+            proxyProperties.setPassWord("");
+            proxyProperties.setDomain("");
+            options.setProperty(HTTPConstants.PROXY, proxyProperties);
+
+            serviceClient.setOptions(options);
+
+            OMElement result = serviceClient.sendReceive(getQuote).getFirstElement();
+            System.out.println("Standard :: Stock price = $" +
+                StockQuoteHandler.parseStandardResponsePayload(result));
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+}

Propchange: webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/ProxyStockQuoteClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/StockQuoteClient.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/StockQuoteClient.java?view=diff&rev=519363&r1=519362&r2=519363
==============================================================================
--- webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/StockQuoteClient.java (original)
+++ webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/StockQuoteClient.java Sat Mar 17 09:18:32 2007
@@ -1,103 +1,103 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you 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.
- */
-
-package samples.userguide;
-
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
-import org.apache.axis2.Constants;
-import org.apache.axis2.addressing.EndpointReference;
-import org.apache.axis2.client.Options;
-import org.apache.axis2.client.ServiceClient;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ConfigurationContextFactory;
-import org.apache.rampart.RampartMessageData;
-import org.apache.neethi.PolicyEngine;
-import org.apache.neethi.Policy;
-import samples.common.StockQuoteHandler;
-
-import javax.xml.namespace.QName;
-
-/**
- * The EPR to the actual service is set, but the transport is set to
- * the Synapse url.
- */
-public class StockQuoteClient {
-
-    public static void main(String[] args) {
-
-        String symbol  = "IBM";
-        String xurl    = "http://localhost:9000/axis2/services/SimpleStockQuoteService";
-        String turl    = "http://localhost:8080";
-        String sAction = "urn:getQuote";
-        String repo    = "client_repo";
-        String secpol  = null;
-
-        if (args.length > 0) symbol = args[0];
-        if (args.length > 1) xurl   = args[1];
-        if (args.length > 2) turl   = args[2];
-        if (args.length > 3) repo   = args[3];
-        if (args.length > 4) secpol = args[4];
-
-        try {
-            OMElement getQuote = StockQuoteHandler.createStandardRequestPayload(symbol);
-
-            Options options = new Options();
-            if (xurl != null)
-                options.setTo(new EndpointReference(xurl));
-            if (turl != null)
-                options.setProperty(Constants.Configuration.TRANSPORT_URL, turl);
-            options.setAction(sAction);
-
-            if (secpol != null && secpol.length() > 0) {
-                options.setProperty(
-                    RampartMessageData.KEY_RAMPART_POLICY, loadPolicy(secpol));
-            }
-
-            ServiceClient serviceClient = null;
-            if (repo != null) {
-                ConfigurationContext configContext =
-                    ConfigurationContextFactory.
-                        createConfigurationContextFromFileSystem(repo, null);
-                serviceClient = new ServiceClient(configContext, null);
-            } else {
-                serviceClient = new ServiceClient();
-            }
-            serviceClient.engageModule(new QName("addressing"));
-            if (secpol != null && secpol.length() > 0) {
-                serviceClient.engageModule(new QName("rampart"));
-            }
-
-            serviceClient.setOptions(options);
-
-            OMElement result = serviceClient.sendReceive(getQuote).getFirstElement();
-            System.out.println("Standard :: Stock price = $" +
-                StockQuoteHandler.parseStandardResponsePayload(result));
-
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    private static Policy loadPolicy(String xmlPath) throws Exception {
-        StAXOMBuilder builder = new StAXOMBuilder(xmlPath);
-        return PolicyEngine.getPolicy(builder.getDocumentElement());
-    }
-
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you 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.
+ */
+
+package samples.userguide;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.rampart.RampartMessageData;
+import org.apache.neethi.PolicyEngine;
+import org.apache.neethi.Policy;
+import samples.common.StockQuoteHandler;
+
+import javax.xml.namespace.QName;
+
+/**
+ * The EPR to the actual service is set, but the transport is set to
+ * the Synapse url.
+ */
+public class StockQuoteClient {
+
+    public static void main(String[] args) {
+
+        String symbol  = "IBM";
+        String xurl    = "http://localhost:9000/axis2/services/SimpleStockQuoteService";
+        String turl    = "http://localhost:8080";
+        String sAction = "urn:getQuote";
+        String repo    = "client_repo";
+        String secpol  = null;
+
+        if (args.length > 0) symbol = args[0];
+        if (args.length > 1) xurl   = args[1];
+        if (args.length > 2) turl   = args[2];
+        if (args.length > 3) repo   = args[3];
+        if (args.length > 4) secpol = args[4];
+
+        try {
+            OMElement getQuote = StockQuoteHandler.createStandardRequestPayload(symbol);
+
+            Options options = new Options();
+            if (xurl != null)
+                options.setTo(new EndpointReference(xurl));
+            if (turl != null)
+                options.setProperty(Constants.Configuration.TRANSPORT_URL, turl);
+            options.setAction(sAction);
+
+            if (secpol != null && secpol.length() > 0) {
+                options.setProperty(
+                    RampartMessageData.KEY_RAMPART_POLICY, loadPolicy(secpol));
+            }
+
+            ServiceClient serviceClient = null;
+            if (repo != null) {
+                ConfigurationContext configContext =
+                    ConfigurationContextFactory.
+                        createConfigurationContextFromFileSystem(repo, null);
+                serviceClient = new ServiceClient(configContext, null);
+            } else {
+                serviceClient = new ServiceClient();
+            }
+            serviceClient.engageModule(new QName("addressing"));
+            if (secpol != null && secpol.length() > 0) {
+                serviceClient.engageModule(new QName("rampart"));
+            }
+
+            serviceClient.setOptions(options);
+
+            OMElement result = serviceClient.sendReceive(getQuote).getFirstElement();
+            System.out.println("Standard :: Stock price = $" +
+                StockQuoteHandler.parseStandardResponsePayload(result));
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    private static Policy loadPolicy(String xmlPath) throws Exception {
+        StAXOMBuilder builder = new StAXOMBuilder(xmlPath);
+        return PolicyEngine.getPolicy(builder.getDocumentElement());
+    }
+
+}

Propchange: webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/StockQuoteClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/synapse/trunk/java/modules/samples/src/main/java/samples/util/SampleAxis2Server.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/main/java/samples/util/SampleAxis2Server.java?view=diff&rev=519363&r1=519362&r2=519363
==============================================================================
--- webservices/synapse/trunk/java/modules/samples/src/main/java/samples/util/SampleAxis2Server.java (original)
+++ webservices/synapse/trunk/java/modules/samples/src/main/java/samples/util/SampleAxis2Server.java Sat Mar 17 09:18:32 2007
@@ -1,133 +1,133 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you 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.
- */
-
-package samples.util;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.axis2.transport.http.SimpleHTTPServer;
-import org.apache.axis2.util.CommandLineOptionParser;
-import org.apache.axis2.util.OptionsValidator;
-import org.apache.axis2.util.CommandLineOption;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ConfigurationContextFactory;
-import org.apache.axis2.engine.ListenerManager;
-import org.apache.axis2.description.TransportInDescription;
-
-import javax.xml.namespace.QName;
-import java.util.List;
-import java.util.Map;
-import java.io.File;
-import java.net.ServerSocket;
-
-public class SampleAxis2Server {
-
-    private static final Log log = LogFactory.getLog(SimpleHTTPServer.class);
-
-    int port = -1;
-
-    public static int DEFAULT_PORT = 8080;
-
-
-    /**
-     * @param args
-     * @throws Exception
-     */
-    public static void main(String[] args) throws Exception {
-		String repoLocation = null;
-		String confLocation = null;
-
-		CommandLineOptionParser optionsParser = new CommandLineOptionParser(args);
-		List invalidOptionsList = optionsParser.getInvalidOptions(new OptionsValidator() {
-			public boolean isInvalid(CommandLineOption option) {
-				String optionType = option.getOptionType();
-				return !("repo".equalsIgnoreCase(optionType) || "conf"
-						.equalsIgnoreCase(optionType));
-			}
-		});
-
-		if ((invalidOptionsList.size()>0)||(args.length>4))
-		{
-			printUsage();
-			return;
-		}
-
-		Map optionsMap = optionsParser.getAllOptions();
-
-		CommandLineOption repoOption = (CommandLineOption) optionsMap
-				.get("repo");
-		CommandLineOption confOption = (CommandLineOption) optionsMap
-				.get("conf");
-
-		log.info("[SimpleAxisServer] Starting");
-		if (repoOption != null) {
-			repoLocation = repoOption.getOptionValue();
-			log.info("[SimpleAxisServer] Using the Axis2 Repository"
-					+ new File(repoLocation).getAbsolutePath());
-		}
-		if (confOption != null) {
-			confLocation = confOption.getOptionValue();
-			System.out
-					.println("[SimpleAxisServer] Using the Axis2 Configuration File"
-							+ new File(confLocation).getAbsolutePath());
-		}
-
-		try {
-			ConfigurationContext configctx = ConfigurationContextFactory
-					.createConfigurationContextFromFileSystem(repoLocation,
-							confLocation);
-
-            configurePort(configctx);
-
-            ListenerManager listenerManager =  new ListenerManager();
-				listenerManager.init(configctx);
-			listenerManager.start();
-			log.info("[SimpleAxisServer] Started");
-		} catch (Throwable t) {
-            log.fatal("[SimpleAxisServer] Shutting down. Error starting SimpleAxisServer", t);
-        }
-    }
-
-    private static void configurePort(ConfigurationContext configCtx) {
-
-        TransportInDescription trsIn = (TransportInDescription)
-            configCtx.getAxisConfiguration().getTransportsIn().get(new QName("http"));
-
-        if(trsIn != null) {
-            String port = System.getProperty("port");
-            if(port != null) {
-                try {
-                    new Integer(port);
-                    trsIn.getParameter("port").setValue(port);
-                } catch (NumberFormatException e) {
-                    log.error("Given port is not a valid integer. Using 9000 for port.");
-                    trsIn.getParameter("port").setValue("9000");
-                }
-            } else {
-                trsIn.getParameter("port").setValue("9000");
-            }
-        }
-    }
-
-    public static void printUsage() {
-        System.out.println("Usage: SampleAxisServer -repo <repository>  -conf <axis2 configuration file>");
-        System.out.println();
-        System.exit(1);
-    }
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you 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.
+ */
+
+package samples.util;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.axis2.transport.http.SimpleHTTPServer;
+import org.apache.axis2.util.CommandLineOptionParser;
+import org.apache.axis2.util.OptionsValidator;
+import org.apache.axis2.util.CommandLineOption;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.engine.ListenerManager;
+import org.apache.axis2.description.TransportInDescription;
+
+import javax.xml.namespace.QName;
+import java.util.List;
+import java.util.Map;
+import java.io.File;
+import java.net.ServerSocket;
+
+public class SampleAxis2Server {
+
+    private static final Log log = LogFactory.getLog(SimpleHTTPServer.class);
+
+    int port = -1;
+
+    public static int DEFAULT_PORT = 8080;
+
+
+    /**
+     * @param args
+     * @throws Exception
+     */
+    public static void main(String[] args) throws Exception {
+		String repoLocation = null;
+		String confLocation = null;
+
+		CommandLineOptionParser optionsParser = new CommandLineOptionParser(args);
+		List invalidOptionsList = optionsParser.getInvalidOptions(new OptionsValidator() {
+			public boolean isInvalid(CommandLineOption option) {
+				String optionType = option.getOptionType();
+				return !("repo".equalsIgnoreCase(optionType) || "conf"
+						.equalsIgnoreCase(optionType));
+			}
+		});
+
+		if ((invalidOptionsList.size()>0)||(args.length>4))
+		{
+			printUsage();
+			return;
+		}
+
+		Map optionsMap = optionsParser.getAllOptions();
+
+		CommandLineOption repoOption = (CommandLineOption) optionsMap
+				.get("repo");
+		CommandLineOption confOption = (CommandLineOption) optionsMap
+				.get("conf");
+
+		log.info("[SimpleAxisServer] Starting");
+		if (repoOption != null) {
+			repoLocation = repoOption.getOptionValue();
+			log.info("[SimpleAxisServer] Using the Axis2 Repository"
+					+ new File(repoLocation).getAbsolutePath());
+		}
+		if (confOption != null) {
+			confLocation = confOption.getOptionValue();
+			System.out
+					.println("[SimpleAxisServer] Using the Axis2 Configuration File"
+							+ new File(confLocation).getAbsolutePath());
+		}
+
+		try {
+			ConfigurationContext configctx = ConfigurationContextFactory
+					.createConfigurationContextFromFileSystem(repoLocation,
+							confLocation);
+
+            configurePort(configctx);
+
+            ListenerManager listenerManager =  new ListenerManager();
+				listenerManager.init(configctx);
+			listenerManager.start();
+			log.info("[SimpleAxisServer] Started");
+		} catch (Throwable t) {
+            log.fatal("[SimpleAxisServer] Shutting down. Error starting SimpleAxisServer", t);
+        }
+    }
+
+    private static void configurePort(ConfigurationContext configCtx) {
+
+        TransportInDescription trsIn = (TransportInDescription)
+            configCtx.getAxisConfiguration().getTransportsIn().get(new QName("http"));
+
+        if(trsIn != null) {
+            String port = System.getProperty("port");
+            if(port != null) {
+                try {
+                    new Integer(port);
+                    trsIn.getParameter("port").setValue(port);
+                } catch (NumberFormatException e) {
+                    log.error("Given port is not a valid integer. Using 9000 for port.");
+                    trsIn.getParameter("port").setValue("9000");
+                }
+            } else {
+                trsIn.getParameter("port").setValue("9000");
+            }
+        }
+    }
+
+    public static void printUsage() {
+        System.out.println("Usage: SampleAxisServer -repo <repository>  -conf <axis2 configuration file>");
+        System.out.println();
+        System.exit(1);
+    }
+}

Propchange: webservices/synapse/trunk/java/modules/samples/src/main/java/samples/util/SampleAxis2Server.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/synapse/trunk/java/modules/samples/src/main/scripts/axis2server.bat
------------------------------------------------------------------------------
    svn:eol-style = CRLF

Propchange: webservices/synapse/trunk/java/modules/samples/src/main/scripts/axis2server.sh
------------------------------------------------------------------------------
    svn:eol-style = LF

Modified: webservices/synapse/trunk/java/repository/conf/axis2.xml
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/axis2.xml?view=diff&rev=519363&r1=519362&r2=519363
==============================================================================
--- webservices/synapse/trunk/java/repository/conf/axis2.xml (original)
+++ webservices/synapse/trunk/java/repository/conf/axis2.xml Sat Mar 17 09:18:32 2007
@@ -1,337 +1,337 @@
-<!--
-  ~  Licensed to the Apache Software Foundation (ASF) under one
-  ~  or more contributor license agreements.  See the NOTICE file
-  ~  distributed with this work for additional information
-  ~  regarding copyright ownership.  The ASF licenses this file
-  ~  to you 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.
-  -->
-
-<axisconfig name="AxisJava2.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="enableSwA" locked="false">false</parameter>
-
-    <!--Uncomment if you want to enable file caching for attachments -->
-    <!--parameter name="cacheAttachments" locked="false">true</parameter>
-    <parameter name="attachmentDIR" locked="false"></parameter>
-    <parameter name="sizeThreshold" locked="false">4000</parameter-->
-
-    <!--This will give out the timout of the configuration contexts, in milliseconds-->
-    <parameter name="ConfigContextTimeoutInterval" locked="false">30000</parameter>
-
-    <!--During a fault, stacktrace can be sent with the fault message. The following flag will control -->
-    <!--that behaviour.-->
-    <parameter name="sendStacktraceDetailsWithFaults" locked="false">false</parameter>
-
-    <!--If there aren't any information available to find out the fault reason, we set the message of the expcetion-->
-    <!--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -->
-    <!--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-->
-    <!--is set then, Axis2 tries to get the first exception and set its message as the faultreason/Reason.-->
-    <parameter name="DrillDownToRootCauseForFaultReason" locked="false">false</parameter>
-
-    <parameter name="Sandesha2StorageManager" locked="false">inmemory</parameter>
-    <parameter name="userName" locked="false">admin</parameter>
-    <parameter name="password" locked="false">axis2</parameter>
-
-    <!--To override repository/services you need to uncomment following parameter and value SHOULD be absolute file path.-->
-    <!--<parameter name="ServicesDirectory" locked="false">service</parameter>-->
-    <!--To override repository/modules you need to uncomment following parameter and value SHOULD be absolute file path-->
-    <!--<parameter name="ModulesDirectory" locked="false">modules</parameter>-->
-
-
-
-    <!--Following params will set the proper context paths for invocations. All the endpoints will have a commons context-->
-    <!--root which can configured using the following contextRoot parameter-->
-    <!--<parameter name="contextRoot" locked="false">axis2</parameter>-->
-
-    <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distingiush those endpoints-->
-    <!--In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this -->
-    <!--context path to proper Axis2 servlets-->
-    <!--<parameter name="servicePath" locked="false">services</parameter>-->
-    <!--<parameter name="restPath" locked="false">rest</parameter>-->
-
-    <!-- Following parameter will completely disable REST handling in Axis2-->
-    <parameter name="disableREST" locked="true">false</parameter>
-
-    <!-- If you have a frontend host which exposes this webservice using a different public URL  -->
-    <!-- use this parameter to override autodetected url -->
-    <!--<parameter name="httpFrontendHostUrl" locked="false">https://someotherhost/context</parameter>-->
-
-
-    <!--    The way of adding listener to the system-->
-    <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
-    <!--        <parameter name="RSS_URL" locked="false">http://127.0.0.1/rss</parameter>-->
-    <!--    </listener>-->
-
-    <!-- ================================================= -->
-    <!-- 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"/>
-        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only"
-                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
-        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out"
-                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
-    </messageReceivers>
-
-    <!-- ================================================= -->
-    <!-- Message Formatter -->
-    <!-- ================================================= -->
-    <!--Following content type to message formatter mapping can be used to implement support for different message -->
-    <!--format  serialization in Axis2. These message formats are expected to be resolved based on the content type. -->
-    <messageFormatters>
-        <messageFormatter contentType="application/x-www-form-urlencoded"
-                         class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
-        <messageFormatter contentType="multipart/form-data"
-                         class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
-        <messageFormatter contentType="application/xml"
-                         class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
-    </messageFormatters>
-
-    <!-- ================================================= -->
-    <!-- Message Builders -->
-    <!-- ================================================= -->
-    <!--Following content type to builder mapping can be used to implement support for different message -->
-    <!--formats in Axis2. These message formats are expected to be resolved based on the content type. -->
-    <messageBuilders>
-        <messageBuilder contentType="application/xml"
-                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
-        <messageBuilder contentType="application/x-www-form-urlencoded"
-                         class="org.apache.axis2.builder.XFormURLEncodedBuilder"/>
-        <messageBuilder contentType="multipart/form-data"
-                         class="org.apache.axis2.builder.MultipartFormDataBuilder"/>
-    </messageBuilders>
-
-    <!-- ================================================= -->
-    <!-- Transport Ins -->
-    <!-- ================================================= -->
-    <!-- the non blocking http transport based on HttpCore + NIO extensions -->
-    <transportReceiver name="http" class="org.apache.axis2.transport.nhttp.HttpCoreNIOListener">
-    	<parameter name="port" locked="false">8080</parameter>
-    	<parameter name="non-blocking" locked="false">true</parameter>
-    </transportReceiver>
-
-    <!-- the non blocking https transport based on HttpCore + SSL-NIO extensions -->
-    <transportReceiver name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener">
-    	<parameter name="port" locked="false">8443</parameter>
-    	<parameter name="non-blocking" locked="false">true</parameter>
-        <parameter name="keystore" locked="false">
-            <KeyStore>
-                <Location>keystore.jks</Location>
-                <Type>JKS</Type>
-                <Password>password</Password>
-                <KeyPassword>password</KeyPassword>
-            </KeyStore>
-        </parameter>
-        <parameter name="truststore" locked="false">
-            <TrustStore>
-                <Location>keystore.jks</Location>
-                <Type>JKS</Type>
-                <Password>password</Password>
-            </TrustStore>
-        </parameter>
-        <!--<parameter name="SSLVerifyClient">require</parameter>
-            supports optional|require or defaults to none -->
-    </transportReceiver>
-
-    <!--Uncomment this and configure as appropriate for JMS transport support, after setting up your JMS environment (e.g. ActiveMQ)
-    <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
-        <parameter name="myTopicConnectionFactory" locked="false">        	        	
-        	<parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
-        	<parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter>        	
-        	<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">TopicConnectionFactory</parameter>
-        </parameter>
-
-        <parameter name="myQueueConnectionFactory" locked="false">        	        	
-        	<parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
-        	<parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter>        	
-        	<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
-        </parameter>
-
-        <parameter name="default" locked="false">        	        	
-        	<parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
-        	<parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter>        	
-        	<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
-        </parameter>
-    </transportReceiver>-->
-
-    <!-- ================================================= -->
-    <!-- Transport Outs -->
-    <!-- ================================================= -->
-
-    <transportSender name="jms"   class="org.apache.axis2.transport.jms.JMSSender"/>
-    <!-- the non-blocking http transport based on HttpCore + NIO extensions -->
-    <transportSender name="http"  class="org.apache.axis2.transport.nhttp.HttpCoreNIOSender">
-        <parameter name="non-blocking" locked="false">true</parameter>
-    </transportSender>
-    <transportSender name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLSender">
-        <parameter name="non-blocking" locked="false">true</parameter>
-        <parameter name="keystore" locked="false">
-            <KeyStore>
-                <Location>keystore.jks</Location>
-                <Type>JKS</Type>
-                <Password>password</Password>
-                <KeyPassword>password</KeyPassword>
-            </KeyStore>
-        </parameter>
-        <parameter name="truststore" locked="false">
-            <TrustStore>
-                <Location>keystore.jks</Location>
-                <Type>JKS</Type>
-                <Password>password</Password>
-            </TrustStore>
-        </parameter>
-        <!--<parameter name="HostnameVerifier">DefaultAndLocalhost</parameter>
-            supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified -->
-    </transportSender>
-
-    <!-- ================================================= -->
-    <!-- Global Modules  -->
-    <!-- ================================================= -->
-    <!-- Comment this to disable Addressing -->
-    <module ref="addressing"/>
-    <module ref="synapse-1.0-RC1"/>
-
-    <!--Configuring module , providing parameters for modules whether they refer or not-->
-    <!--<moduleConfig name="addressing">-->
-    <!--<parameter name="addressingPara" locked="false">N/A</parameter>-->
-    <!--</moduleConfig>-->
-
-    <!-- ================================================= -->
-    <!-- Clustering  -->
-    <!-- ================================================= -->
-    <!-- Configure and uncomment following for preparing Axis2 to a clustered environment -->
-    <!-- 
-    <cluster class="org.apache.axis2.cluster.tribes.TribesClusterManager">
-    	<parameter name="param1" locked="false">value1</parameter>
-    </cluster>
-     -->
-     
-    <!-- ================================================= -->
-    <!-- Phases  -->
-    <!-- ================================================= -->
-    <phaseOrder type="InFlow">
-        <!--  System pre defined phases       -->
-        <phase name="Transport">
-            <handler name="RequestURIBasedDispatcher"
-                     class="org.apache.axis2.engine.RequestURIBasedDispatcher">
-                <order phase="Transport"/>
-            </handler>
-            <handler name="SOAPActionBasedDispatcher"
-                     class="org.apache.axis2.engine.SOAPActionBasedDispatcher">
-                <order phase="Transport"/>
-            </handler>
-        </phase>
-        <phase name="Security"/>
-        <phase name="PreDispatch"/>
-        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
-            <handler name="AddressingBasedDispatcher"
-                     class="org.apache.axis2.engine.AddressingBasedDispatcher">
-                <order phase="Dispatch"/>
-            </handler>
-            <handler name="RequestURIOperationDispatcher"
-                     class="org.apache.axis2.engine.RequestURIOperationDispatcher">
-                <order phase="Dispatch"/>
-            </handler>
-
-            <handler name="SOAPMessageBodyBasedDispatcher"
-                     class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
-                <order phase="Dispatch"/>
-            </handler>
-
-            <handler name="HTTPLocationBasedDispatcher"
-                     class="org.apache.axis2.engine.HTTPLocationBasedDispatcher">
-                <order phase="Dispatch"/>
-            </handler>
-            
-            <handler name="InstanceDispatcher"
-                     class="org.apache.axis2.engine.InstanceDispatcher">
-                <order phase="Dispatch"/>
-            </handler>
-        </phase>
-        <!--  System pre defined phases       -->
-        <phase name="RMPhase"/>
-        <!--   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="RMPhase"/>
-        <phase name="OperationOutPhase"/>
-        <!--system predefined phase-->
-        <!--these phase will run irrespective of the service-->
-        <phase name="PolicyDetermination"/>
-        <phase name="MessageOut"/>
-        <phase name="Security"/>
-    </phaseOrder>
-    <phaseOrder type="InFaultFlow">
-        <phase name="PreDispatch"/>
-        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
-            <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="RequestURIOperationDispatcher"
-                     class="org.apache.axis2.engine.RequestURIOperationDispatcher">
-                <order phase="Dispatch"/>
-            </handler>
-
-            <handler name="SOAPMessageBodyBasedDispatcher"
-                     class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
-                <order phase="Dispatch"/>
-            </handler>
-
-            <handler name="HTTPLocationBasedDispatcher"
-                     class="org.apache.axis2.engine.HTTPLocationBasedDispatcher">
-                <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="RMPhase"/>
-        <phase name="OperationInFaultPhase"/>
-    </phaseOrder>
-    <phaseOrder type="OutFaultFlow">
-        <!--      user can add his own phases to this area  -->
-        <phase name="RMPhase"/>
-        <phase name="OperationOutFaultPhase"/>
-        <phase name="PolicyDetermination"/>
-        <phase name="MessageOut"/>
-    </phaseOrder>
-</axisconfig>
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you 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.
+  -->
+
+<axisconfig name="AxisJava2.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="enableSwA" locked="false">false</parameter>
+
+    <!--Uncomment if you want to enable file caching for attachments -->
+    <!--parameter name="cacheAttachments" locked="false">true</parameter>
+    <parameter name="attachmentDIR" locked="false"></parameter>
+    <parameter name="sizeThreshold" locked="false">4000</parameter-->
+
+    <!--This will give out the timout of the configuration contexts, in milliseconds-->
+    <parameter name="ConfigContextTimeoutInterval" locked="false">30000</parameter>
+
+    <!--During a fault, stacktrace can be sent with the fault message. The following flag will control -->
+    <!--that behaviour.-->
+    <parameter name="sendStacktraceDetailsWithFaults" locked="false">false</parameter>
+
+    <!--If there aren't any information available to find out the fault reason, we set the message of the expcetion-->
+    <!--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -->
+    <!--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-->
+    <!--is set then, Axis2 tries to get the first exception and set its message as the faultreason/Reason.-->
+    <parameter name="DrillDownToRootCauseForFaultReason" locked="false">false</parameter>
+
+    <parameter name="Sandesha2StorageManager" locked="false">inmemory</parameter>
+    <parameter name="userName" locked="false">admin</parameter>
+    <parameter name="password" locked="false">axis2</parameter>
+
+    <!--To override repository/services you need to uncomment following parameter and value SHOULD be absolute file path.-->
+    <!--<parameter name="ServicesDirectory" locked="false">service</parameter>-->
+    <!--To override repository/modules you need to uncomment following parameter and value SHOULD be absolute file path-->
+    <!--<parameter name="ModulesDirectory" locked="false">modules</parameter>-->
+
+
+
+    <!--Following params will set the proper context paths for invocations. All the endpoints will have a commons context-->
+    <!--root which can configured using the following contextRoot parameter-->
+    <!--<parameter name="contextRoot" locked="false">axis2</parameter>-->
+
+    <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distingiush those endpoints-->
+    <!--In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this -->
+    <!--context path to proper Axis2 servlets-->
+    <!--<parameter name="servicePath" locked="false">services</parameter>-->
+    <!--<parameter name="restPath" locked="false">rest</parameter>-->
+
+    <!-- Following parameter will completely disable REST handling in Axis2-->
+    <parameter name="disableREST" locked="true">false</parameter>
+
+    <!-- If you have a frontend host which exposes this webservice using a different public URL  -->
+    <!-- use this parameter to override autodetected url -->
+    <!--<parameter name="httpFrontendHostUrl" locked="false">https://someotherhost/context</parameter>-->
+
+
+    <!--    The way of adding listener to the system-->
+    <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
+    <!--        <parameter name="RSS_URL" locked="false">http://127.0.0.1/rss</parameter>-->
+    <!--    </listener>-->
+
+    <!-- ================================================= -->
+    <!-- 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"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </messageReceivers>
+
+    <!-- ================================================= -->
+    <!-- Message Formatter -->
+    <!-- ================================================= -->
+    <!--Following content type to message formatter mapping can be used to implement support for different message -->
+    <!--format  serialization in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageFormatters>
+        <messageFormatter contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
+        <messageFormatter contentType="multipart/form-data"
+                         class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
+        <messageFormatter contentType="application/xml"
+                         class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+    </messageFormatters>
+
+    <!-- ================================================= -->
+    <!-- Message Builders -->
+    <!-- ================================================= -->
+    <!--Following content type to builder mapping can be used to implement support for different message -->
+    <!--formats in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageBuilders>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.builder.XFormURLEncodedBuilder"/>
+        <messageBuilder contentType="multipart/form-data"
+                         class="org.apache.axis2.builder.MultipartFormDataBuilder"/>
+    </messageBuilders>
+
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
+    <!-- the non blocking http transport based on HttpCore + NIO extensions -->
+    <transportReceiver name="http" class="org.apache.axis2.transport.nhttp.HttpCoreNIOListener">
+    	<parameter name="port" locked="false">8080</parameter>
+    	<parameter name="non-blocking" locked="false">true</parameter>
+    </transportReceiver>
+
+    <!-- the non blocking https transport based on HttpCore + SSL-NIO extensions -->
+    <transportReceiver name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener">
+    	<parameter name="port" locked="false">8443</parameter>
+    	<parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>keystore.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>keystore.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>
+        <!--<parameter name="SSLVerifyClient">require</parameter>
+            supports optional|require or defaults to none -->
+    </transportReceiver>
+
+    <!--Uncomment this and configure as appropriate for JMS transport support, after setting up your JMS environment (e.g. ActiveMQ)
+    <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
+        <parameter name="myTopicConnectionFactory" locked="false">        	        	
+        	<parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+        	<parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter>        	
+        	<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">TopicConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="myQueueConnectionFactory" locked="false">        	        	
+        	<parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+        	<parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter>        	
+        	<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="default" locked="false">        	        	
+        	<parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+        	<parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter>        	
+        	<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
+        </parameter>
+    </transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
+
+    <transportSender name="jms"   class="org.apache.axis2.transport.jms.JMSSender"/>
+    <!-- the non-blocking http transport based on HttpCore + NIO extensions -->
+    <transportSender name="http"  class="org.apache.axis2.transport.nhttp.HttpCoreNIOSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportSender>
+    <transportSender name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>keystore.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>keystore.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>
+        <!--<parameter name="HostnameVerifier">DefaultAndLocalhost</parameter>
+            supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified -->
+    </transportSender>
+
+    <!-- ================================================= -->
+    <!-- Global Modules  -->
+    <!-- ================================================= -->
+    <!-- Comment this to disable Addressing -->
+    <module ref="addressing"/>
+    <module ref="synapse-1.0-RC1"/>
+
+    <!--Configuring module , providing parameters for modules whether they refer or not-->
+    <!--<moduleConfig name="addressing">-->
+    <!--<parameter name="addressingPara" locked="false">N/A</parameter>-->
+    <!--</moduleConfig>-->
+
+    <!-- ================================================= -->
+    <!-- Clustering  -->
+    <!-- ================================================= -->
+    <!-- Configure and uncomment following for preparing Axis2 to a clustered environment -->
+    <!-- 
+    <cluster class="org.apache.axis2.cluster.tribes.TribesClusterManager">
+    	<parameter name="param1" locked="false">value1</parameter>
+    </cluster>
+     -->
+     
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
+    <phaseOrder type="InFlow">
+        <!--  System pre defined phases       -->
+        <phase name="Transport">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.engine.RequestURIBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.engine.SOAPActionBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.engine.AddressingBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.engine.RequestURIOperationDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.engine.HTTPLocationBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+            
+            <handler name="InstanceDispatcher"
+                     class="org.apache.axis2.engine.InstanceDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+        </phase>
+        <!--  System pre defined phases       -->
+        <phase name="RMPhase"/>
+        <!--   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="RMPhase"/>
+        <phase name="OperationOutPhase"/>
+        <!--system predefined phase-->
+        <!--these phase will run irrespective of the service-->
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+    <phaseOrder type="InFaultFlow">
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <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="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.engine.RequestURIOperationDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.engine.HTTPLocationBasedDispatcher">
+                <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="RMPhase"/>
+        <phase name="OperationInFaultPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFaultFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="RMPhase"/>
+        <phase name="OperationOutFaultPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+    </phaseOrder>
+</axisconfig>

Propchange: webservices/synapse/trunk/java/repository/conf/axis2.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/synapse/trunk/java/repository/conf/sample/resources/endpoint/dynamic_endpt_1.xml
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/resources/endpoint/dynamic_endpt_1.xml?view=diff&rev=519363&r1=519362&r2=519363
==============================================================================
--- webservices/synapse/trunk/java/repository/conf/sample/resources/endpoint/dynamic_endpt_1.xml (original)
+++ webservices/synapse/trunk/java/repository/conf/sample/resources/endpoint/dynamic_endpt_1.xml Sat Mar 17 09:18:32 2007
@@ -1 +1 @@
-<endpoint xmlns="http://ws.apache.org/ns/synapse" name="simple"><address uri="http://localhost:9000/axis2/services/SimpleStockQuoteService"/></endpoint> 
+<endpoint xmlns="http://ws.apache.org/ns/synapse" name="simple"><address uri="http://localhost:9000/axis2/services/SimpleStockQuoteService"/></endpoint> 

Propchange: webservices/synapse/trunk/java/repository/conf/sample/resources/endpoint/dynamic_endpt_1.xml
------------------------------------------------------------------------------
    svn:eol-style = native



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