You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by in...@apache.org on 2007/08/09 12:06:05 UTC

svn commit: r564161 - in /webservices/synapse/trunk/java: ./ 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/core/axis2/ modules/core/src/main/java/org/a...

Author: indika
Date: Thu Aug  9 03:05:55 2007
New Revision: 564161

URL: http://svn.apache.org/viewvc?view=rev&rev=564161
Log:
now synapse distribute separate standalone and war distributions
war  distribution has been tested on the tomcat,jboss and websphere  
just need to deploy synapse.war  on the  corresponding servers

Added:
    webservices/synapse/trunk/java/modules/war/
    webservices/synapse/trunk/java/modules/war/pom.xml
Modified:
    webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/Constants.java
    webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/Util.java
    webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseStartUpServlet.java
    webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/registry/url/SimpleURLRegistry.java
    webservices/synapse/trunk/java/modules/samples/services/FastStockQuoteService/build.xml
    webservices/synapse/trunk/java/modules/samples/services/LoadbalanceFailoverService/build.xml
    webservices/synapse/trunk/java/modules/samples/services/MTOMSwASampleService/build.xml
    webservices/synapse/trunk/java/modules/samples/services/ReliableStockQuoteService/build.xml
    webservices/synapse/trunk/java/modules/samples/services/SecureStockQuoteService/build.xml
    webservices/synapse/trunk/java/modules/samples/services/SimpleStockQuoteService/build.xml
    webservices/synapse/trunk/java/modules/samples/src/main/scripts/axis2server.bat
    webservices/synapse/trunk/java/modules/samples/src/main/scripts/axis2server.sh
    webservices/synapse/trunk/java/modules/samples/src/main/scripts/build.xml
    webservices/synapse/trunk/java/pom.xml
    webservices/synapse/trunk/java/repository/conf/web.xml
    webservices/synapse/trunk/java/src/main/bin/synapse.bat
    webservices/synapse/trunk/java/src/main/bin/synapse.sh

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/Constants.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/Constants.java?view=diff&rev=564161&r1=564160&r2=564161
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/Constants.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/Constants.java Thu Aug  9 03:05:55 2007
@@ -48,10 +48,7 @@
 
     /** The system property used to specify/override the synapse home location */
     String SYNAPSE_HOME = "synapse.home";
-
-    /** The synapse conf directory location */
-    String SYNAPSE_CONF_DIRECTORY= "webapp/WEB-INF/classes/conf";
-
+   
     /** a message context property set to hold the relates to for POX responses */
     String RELATES_TO_FOR_POX = "RelatesToForPox";
 

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/Util.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/Util.java?view=diff&rev=564161&r1=564160&r2=564161
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/Util.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/Util.java Thu Aug  9 03:05:55 2007
@@ -35,6 +35,7 @@
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URL;
 import java.net.URLConnection;
@@ -45,6 +46,7 @@
 
     /**
      * Return a StreamSource for the given Object
+     *
      * @param o the object
      * @return the StreamSource
      */
@@ -84,14 +86,13 @@
                 handleException("Error converting to a StreamSource", e);
             }
 
-        } else if (o instanceof URI){
+        } else if (o instanceof URI) {
             try {
-                return ((URI)(o)).toURL().openStream();                   
+                return ((URI) (o)).toURL().openStream();
             } catch (IOException e) {
-                handleException("Error opening stream form URI",e);
+                handleException("Error opening stream form URI", e);
             }
-        }
-        else {
+        } else {
             handleException("Cannot convert object to a StreamSource");
         }
         return null;
@@ -103,6 +104,7 @@
      * (if available) would be used to transform this content into an Object.
      * If a suitable XMLToObjectMapper cannot be found, the content would be
      * treated as XML and an OMNode would be returned
+     *
      * @param url the URL to the resource
      * @return an Object created from the given URL
      */
@@ -112,17 +114,29 @@
                 try {
                     url.openStream();
                 } catch (IOException ignored) {
+                    String path = url.getPath();
+                    if (log.isDebugEnabled()) {
+                        log.debug("Can not open a connection to the URL with a path :" +
+                                  path);
+                    }
                     String synapseHome = System.getProperty(Constants.SYNAPSE_HOME);
                     if (synapseHome != null) {
+                        if (log.isDebugEnabled()) {
+                            log.debug("Trying  to resolve an absolute path of the " +
+                                      " URL using the synapse.home : " + synapseHome);
+                        }
                         if (synapseHome.endsWith("/")) {
                             synapseHome = synapseHome.substring(0, synapseHome.lastIndexOf("/"));
                         }
-                        url = new URL(url.getProtocol() + ":" + synapseHome + "/" + url.getPath());
+                        url = new URL(url.getProtocol() + ":" + synapseHome + "/" + path);
                         try {
                             url.openStream();
                         } catch (IOException e) {
-                            e.printStackTrace();
-                            log.error(e);
+                            if (log.isDebugEnabled()) {
+                                log.debug("Faild to resolve an absolute path of the " +
+                                          " URL using the synapse.home : " + synapseHome);
+                            }
+                            log.error("IO Error reading from URL " + url.getPath() + e);
                         }
                     }
                 }
@@ -132,13 +146,13 @@
             }
             URLConnection urlc = url.openConnection();
             XMLToObjectMapper xmlToObject =
-                getXmlToObjectMapper(urlc.getContentType());
+                    getXmlToObjectMapper(urlc.getContentType());
 
             try {
                 XMLStreamReader parser = XMLInputFactory.newInstance().
-                    createXMLStreamReader(urlc.getInputStream());
+                        createXMLStreamReader(urlc.getInputStream());
                 StAXOMBuilder builder = new StAXOMBuilder(parser);
-                OMElement omElem =  builder.getDocumentElement();
+                OMElement omElem = builder.getDocumentElement();
 
                 // detach from URL connection and keep in memory
                 // TODO remove this 
@@ -163,30 +177,15 @@
 
     /**
      * Return an OMElement from a URL source
+     *
      * @param urlStr a URL string
      * @return an OMElement of the resource
      * @throws IOException for invalid URL's or IO errors
      */
     public static OMElement getOMElementFromURL(String urlStr) throws IOException {
-        URL url = new URL(urlStr);
-        if ("file".equals(url.getProtocol())) {
-            try {
-                url.openStream();
-            } catch (IOException ignored) {
-                String synapseHome = System.getProperty(Constants.SYNAPSE_HOME);
-                if (synapseHome != null) {
-                    if (synapseHome.endsWith("/")) {
-                        synapseHome = synapseHome.substring(0, synapseHome.lastIndexOf("/"));
-                    }
-                    url = new URL(url.getProtocol() + ":" + synapseHome + "/" + url.getPath());
-                    try {
-                        url.openStream();
-                    } catch (IOException e) {
-                        e.printStackTrace();
-                        log.error(e);
-                    }
-                }
-            }
+        URL url = getURLFromPath(urlStr);
+        if (url == null) {
+            return null;
         }
         URLConnection conn = url.openConnection();
         conn.setReadTimeout(10000);
@@ -202,11 +201,12 @@
                 return doc;
             } catch (Exception e) {
                 handleException("Error parsing resource at URL : " + url +
-                    " as XML", e);
+                                " as XML", e);
             } finally {
                 try {
                     urlInStream.close();
-                } catch (IOException ignore) {}
+                } catch (IOException ignore) {
+                }
             }
         }
         return null;
@@ -225,10 +225,72 @@
     /**
      * Return a suitable XMLToObjectMapper for the given content type if one
      * is available, else return null;
+     *
      * @param contentType the content type for which a mapper is required
      * @return a suitable XMLToObjectMapper or null if none can be found
      */
     public static XMLToObjectMapper getXmlToObjectMapper(String contentType) {
         return null;
+    }
+
+    /**
+     * Utility method to resolve url(only If need) path using synapse home system property
+     *
+     * @param path Path to the URL
+     * @return Valid URL instance or null(if it is inavalid or can not open a connection to it )
+     */
+    public static URL getURLFromPath(String path) {
+        if (path == null || "null".equals(path)) {
+            if (log.isDebugEnabled()) {
+                log.debug("Can not create a URL from 'null' ");
+            }
+            return null;
+        }
+        URL url = null;
+        try {
+            url = new URL(path);
+            if ("file".equals(url.getProtocol())) {
+                try {
+                    url.openStream();
+                } catch (MalformedURLException e) {
+                    handleException("Invalid URL reference : " + path, e);
+                } catch (IOException ignored) {
+                    if (log.isDebugEnabled()) {
+                        log.debug("Can not open a connection to the URL with a path :" +
+                                  path);
+                    }
+                    String synapseHome = System.getProperty(Constants.SYNAPSE_HOME);
+                    if (synapseHome != null) {
+                        if (synapseHome.endsWith("/")) {
+                            synapseHome = synapseHome.substring(0, synapseHome.lastIndexOf("/"));
+                        }
+                        if (log.isDebugEnabled()) {
+                            log.debug("Trying  to resolve an absolute path of the " +
+                                      " URL using the synapse.home : " + synapseHome);
+                        }
+                        try {
+                            url = new URL(url.getProtocol() + ":" + synapseHome + "/" +
+                                          url.getPath());
+                            url.openStream();
+                        } catch (MalformedURLException e) {
+                            handleException("Invalid URL reference " + url.getPath() + e);
+                        } catch (IOException e) {
+                            if (log.isDebugEnabled()) {
+                                log.debug("Faild to resolve an absolute path of the " +
+                                          " URL using the synapse.home : " + synapseHome);
+                            }
+                            log.error("IO Error reading from URL : " + url.getPath() + e);
+                        }
+                    }
+                }
+            } else {
+                throw new SynapseException("Invalid protocol.");
+            }
+        } catch (MalformedURLException e) {
+            handleException("Invalid URL reference :  " + path, e);
+        } catch (IOException e) {
+            handleException("IO Error reading from URL : " + path, e);
+        }
+        return url;
     }
 }

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseStartUpServlet.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseStartUpServlet.java?view=diff&rev=564161&r1=564160&r2=564161
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseStartUpServlet.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseStartUpServlet.java Thu Aug  9 03:05:55 2007
@@ -20,7 +20,6 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.log4j.PropertyConfigurator;
 import org.apache.synapse.Constants;
 import org.apache.synapse.ServerManager;
 
@@ -32,8 +31,6 @@
 import javax.servlet.http.HttpServletResponse;
 import java.io.File;
 import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
 
 /**
  * This servlet will start and stop all the listeners.
@@ -54,52 +51,42 @@
         if ("true".equals(servletContext.getAttribute("hasAlreadyInit"))) {
             return;
         }
-        String synapseHome = System.getProperty(Constants.SYNAPSE_HOME);
+        String synapseHome = resolveSynapseHome(servletConfig);
         //Setting the all required system properties
-        if (synapseHome == null || "".equals(synapseHome)) {
-            synapseHome = servletConfig.getInitParameter(Constants.SYNAPSE_HOME);
-            if (synapseHome != null) {
-                if (synapseHome.endsWith("/")) {
-                    synapseHome = synapseHome.substring(0, synapseHome.lastIndexOf("/"));
-                }
-                System.setProperty(Constants.SYNAPSE_HOME, synapseHome);
-                try {
-                    //load the synapse log4j properties
-                    URL url = new URL("file:" + synapseHome + File.separator
-                                      + Constants.SYNAPSE_CONF_DIRECTORY + File.separator
-                                      + "log4j.properties");
-                    PropertyConfigurator.configure(url);
-                } catch (MalformedURLException ignore) {
-                }
-                //setting axis2 repository location
-                String axis2Repo = System.getProperty(org.apache.axis2.Constants.AXIS2_REPO);
-                if (axis2Repo == null) {
-                    ServerManager.axis2Repolocation = synapseHome +
-                                                      File.separator + "repository";
-                    System.setProperty(org.apache.axis2.Constants.AXIS2_REPO,
-                                       synapseHome +
-                                       File.separator + "repository");
-                }
-                //setting axis2 configuration location
-                String axis2Xml = System.getProperty(org.apache.axis2.Constants.AXIS2_CONF);
-                if (axis2Xml == null) {
-                    System.setProperty(org.apache.axis2.Constants.AXIS2_CONF,
-                                       synapseHome + File.separator
-                                       + Constants.SYNAPSE_CONF_DIRECTORY
-                                       + File.separator + org.apache.axis2.Constants.AXIS2_CONF);
-                }
-                //setting synapse configuration location
-                String synapseXml = System.getProperty(org.apache.synapse.Constants.SYNAPSE_XML);
-                if (synapseXml == null) {
-                    System.setProperty(org.apache.synapse.Constants.SYNAPSE_XML,
-                                       synapseHome + File.separator
-                                       + Constants.SYNAPSE_CONF_DIRECTORY
-                                       + File.separator + org.apache.synapse.Constants.SYNAPSE_XML);
-                }
-            } else {
-                log.fatal("synapse.home had not set : startup failed");
-                return;
+        if (synapseHome != null) {
+            if (synapseHome.endsWith("/")) {
+                synapseHome = synapseHome.substring(0, synapseHome.lastIndexOf("/"));
+            }
+            System.setProperty(Constants.SYNAPSE_HOME, synapseHome);
+            //setting axis2 repository location
+            String axis2Repo = System.getProperty(org.apache.axis2.Constants.AXIS2_REPO);
+            if (axis2Repo == null) {
+                ServerManager.axis2Repolocation = synapseHome + "/WEB-INF" +
+                                                  File.separator + "repository";
+                System.setProperty(org.apache.axis2.Constants.AXIS2_REPO,
+                                   synapseHome + "/WEB-INF" +
+                                   File.separator + "repository");
+            }
+            //setting axis2 configuration location
+            String axis2Xml = System.getProperty(org.apache.axis2.Constants.AXIS2_CONF);
+            if (axis2Xml == null) {
+                System.setProperty(org.apache.axis2.Constants.AXIS2_CONF,
+                                   synapseHome + File.separator
+                                   + "WEB-INF/conf"
+                                   + File.separator + org.apache.axis2.Constants.AXIS2_CONF);
+            }
+            //setting synapse configuration location
+            String synapseXml = System.getProperty(org.apache.synapse.Constants.SYNAPSE_XML);
+            if (synapseXml == null) {
+                System.setProperty(org.apache.synapse.Constants.SYNAPSE_XML,
+                                   synapseHome + File.separator
+                                   + "WEB-INF/conf"
+                                   + File.separator + org.apache.synapse.Constants.SYNAPSE_XML);
+
             }
+        } else {
+            log.fatal("Can not resolve synapse home  : startup failed");
+            return;
         }
         serverManager = ServerManager.getInstance();
         serverManager.start();
@@ -124,5 +111,32 @@
             }
         } catch (Exception ignored) {
         }
+    }
+
+    private String resolveSynapseHome(ServletConfig servletConfig) {
+        // If synapse.home has provided as init-param,the it will take as synapse home
+        String synapseHomeAsParam = servletConfig.getInitParameter(Constants.SYNAPSE_HOME);
+        if (synapseHomeAsParam != null) {
+            if (synapseHomeAsParam.endsWith("/")) {
+                return synapseHomeAsParam.substring(0, synapseHomeAsParam.lastIndexOf("/"));
+            }
+        }
+        //if synapse.home has set as a system property , then use it
+        String synapseHome = System.getProperty(Constants.SYNAPSE_HOME);
+        //Setting the all required system properties
+        if (synapseHome == null || "".equals(synapseHome)) {
+            ServletContext servletContext = servletConfig.getServletContext();
+            //if synapse.home stil can not find ,then resolve it using real path of the WEB-INF
+            String webinfPath = servletContext.getRealPath("WEB-INF");
+            if (webinfPath != null) {
+                synapseHome = webinfPath.substring(0, webinfPath.lastIndexOf("WEB-INF"));
+                if (synapseHome != null) {
+                    if (synapseHome.endsWith("/")) {
+                        synapseHome = synapseHome.substring(0, synapseHome.lastIndexOf("/"));
+                    }
+                }
+            }
+        }
+        return synapseHome;
     }
 }

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/registry/url/SimpleURLRegistry.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/registry/url/SimpleURLRegistry.java?view=diff&rev=564161&r1=564160&r2=564161
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/registry/url/SimpleURLRegistry.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/registry/url/SimpleURLRegistry.java Thu Aug  9 03:05:55 2007
@@ -23,8 +23,8 @@
 import org.apache.axiom.om.impl.builder.StAXOMBuilder;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.synapse.Constants;
 import org.apache.synapse.SynapseException;
+import org.apache.synapse.config.Util;
 import org.apache.synapse.registry.AbstractRegistry;
 import org.apache.synapse.registry.Registry;
 import org.apache.synapse.registry.RegistryEntry;
@@ -53,25 +53,9 @@
         log.info("==> Repository fetch of resource with key : " + key);
         URLConnection urlc = null;
         try {
-            URL url = new URL(getRoot() + key);
-            if ("file".equals(url.getProtocol())) {
-                try {
-                    url.openStream();
-                } catch (IOException ignored) {
-                    String synapseHome = System.getProperty(Constants.SYNAPSE_HOME);
-                    if (synapseHome != null) {
-                        if (synapseHome.endsWith("/")) {
-                            synapseHome = synapseHome.substring(0, synapseHome.lastIndexOf("/"));
-                        }
-                        url = new URL(url.getProtocol() + ":" + synapseHome + "/" + url.getPath());
-                        try {
-                            url.openStream();
-                        } catch (IOException e) {
-                            e.printStackTrace();
-                            log.error(e);
-                        }
-                    }
-                }
+            URL url = Util.getURLFromPath(getRoot() + key);
+            if (url == null) {
+                return null;
             }
             urlc = url.openConnection();
             urlc.connect();
@@ -102,25 +86,9 @@
             log.debug("Perform RegistryEntry lookup for key : " + key);
         }
         try {
-            URL url = new URL(getRoot() + key);
-            if ("file".equals(url.getProtocol())) {
-                try {
-                    url.openStream();
-                } catch (IOException ignored) {
-                    String synapseHome = System.getProperty(Constants.SYNAPSE_HOME);
-                    if (synapseHome != null) {
-                        if (synapseHome.endsWith("/")) {
-                            synapseHome = synapseHome.substring(0, synapseHome.lastIndexOf("/"));
-                        }
-                        url = new URL(url.getProtocol() + ":" + synapseHome + "/" + url.getPath());
-                        try {
-                            url.openStream();
-                        } catch (IOException e) {
-                            e.printStackTrace();
-                            log.error(e);
-                        }
-                    }
-                }
+            URL url = Util.getURLFromPath(getRoot() + key);
+            if (url == null) {
+                return null;
             }
             URLConnection urlc = url.openConnection();
             urlc.setReadTimeout(30000);
@@ -187,83 +155,57 @@
     }
 
     public RegistryEntry[] getChildren(RegistryEntry entry) {
+        URL url;
+        if (entry == null) {
+            URLRegistryEntry urlEntry = new URLRegistryEntry();
+            urlEntry.setKey("");
+            entry = urlEntry;
+        }
+        url = Util.getURLFromPath(getRoot() + entry.getKey());
+        if (url == null) {
+            return null;
+        }
+        if (url.getProtocol().equals("file")) {
 
-        try {
-            URL url;
-            if (entry == null) {
-                URLRegistryEntry urlEntry = new URLRegistryEntry();
-                urlEntry.setKey("");
-                entry = urlEntry;
-            }
-            url = new URL(getRoot() + entry.getKey());
-            if ("file".equals(url.getProtocol())) {
-                try {
-                    url.openStream();
-                } catch (IOException ignored) {
-                    String synapseHome = System.getProperty(Constants.SYNAPSE_HOME);
-                    if (synapseHome != null) {
-                        if (synapseHome.endsWith("/")) {
-                            synapseHome = synapseHome.substring(0, synapseHome.lastIndexOf("/"));
-                        }
-                        url = new URL(url.getProtocol() + ":" + synapseHome + "/" + url.getPath());
-                        try {
-                            url.openStream();
-                        } catch (IOException e) {
-                            e.printStackTrace();
-                            log.error(e);
-                        }
-                    }
-                }
+            File file = new File(url.getFile());
+            if (!file.isDirectory()) {
+                return null;
             }
+            InputStream inStream = null;
+            try {
+                inStream = (InputStream) url.getContent();
 
-            if (url.getProtocol().equals("file")) {
-
-                File file = new File(url.getFile());
-                if (!file.isDirectory()) {
-                    return null;
-                }
-
-                InputStream inStream = null;
-                try {
-                    inStream = (InputStream) url.getContent();
-
-                    BufferedReader reader = new BufferedReader(new InputStreamReader(inStream));
-                    ArrayList entryList = new ArrayList();
-                    String key = "";
-                    while ((key = reader.readLine()) != null) {
-                        URLRegistryEntry registryEntry = new URLRegistryEntry();
-                        if (entry.getKey().equals("")) {
-                            registryEntry.setKey(key);
+                BufferedReader reader = new BufferedReader(new InputStreamReader(inStream));
+                ArrayList entryList = new ArrayList();
+                String key = "";
+                while ((key = reader.readLine()) != null) {
+                    URLRegistryEntry registryEntry = new URLRegistryEntry();
+                    if (entry.getKey().equals("")) {
+                        registryEntry.setKey(key);
+                    } else {
+                        if (entry.getKey().endsWith("/")) {
+                            registryEntry.setKey(entry.getKey() + key);
                         } else {
-                            if (entry.getKey().endsWith("/")) {
-                                registryEntry.setKey(entry.getKey() + key);
-                            } else {
-                                registryEntry.setKey(entry.getKey() + "/" + key);
-                            }
+                            registryEntry.setKey(entry.getKey() + "/" + key);
                         }
-
-                        entryList.add(registryEntry);
                     }
 
-                    RegistryEntry[] entries = new RegistryEntry[entryList.size()];
-                    for (int i = 0; i < entryList.size(); i++) {
-                        entries[i] = (RegistryEntry) entryList.get(i);
-                    }
-                    return entries;
+                    entryList.add(registryEntry);
+                }
 
-                } catch (Exception e) {
-                    throw new SynapseException("Error in reading the URL.");
+                RegistryEntry[] entries = new RegistryEntry[entryList.size()];
+                for (int i = 0; i < entryList.size(); i++) {
+                    entries[i] = (RegistryEntry) entryList.get(i);
                 }
+                return entries;
 
-            } else {
-                throw new SynapseException("Invalid protocol.");
+            } catch (Exception e) {
+                throw new SynapseException("Error in reading the URL.");
             }
 
-        } catch (MalformedURLException e) {
-            handleException("Invalid URL reference " + getRoot() + entry.getKey(), e);
+        } else {
+            throw new SynapseException("Invalid protocol.");
         }
-
-        return null;
     }
 
     public RegistryEntry[] getDescendants(RegistryEntry entry) {

Modified: webservices/synapse/trunk/java/modules/samples/services/FastStockQuoteService/build.xml
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/services/FastStockQuoteService/build.xml?view=diff&rev=564161&r1=564160&r2=564161
==============================================================================
--- webservices/synapse/trunk/java/modules/samples/services/FastStockQuoteService/build.xml (original)
+++ webservices/synapse/trunk/java/modules/samples/services/FastStockQuoteService/build.xml Thu Aug  9 03:05:55 2007
@@ -20,7 +20,7 @@
 <project default="build-service">
 
     <property name="synapse.home" value="../../../.."/>
-    <property name="lib" value="${synapse.home}/webapp/WEB-INF/lib"/>
+    <property name="lib" value="${synapse.home}/lib"/>
     <property name="temp.dir" value="temp"/>
     <property name="classes" value="${temp.dir}/classes"/>
     <property name="src" value="src"/>
@@ -29,7 +29,7 @@
     <path id="synapse.class.path">
         <pathelement path="${java.class.path}"/>
         <fileset dir="${synapse.home}">
-            <include name="webapp/WEB-INF/lib/*.jar"/>
+            <include name="lib/*.jar"/>
         </fileset>
     </path>
 

Modified: webservices/synapse/trunk/java/modules/samples/services/LoadbalanceFailoverService/build.xml
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/services/LoadbalanceFailoverService/build.xml?view=diff&rev=564161&r1=564160&r2=564161
==============================================================================
--- webservices/synapse/trunk/java/modules/samples/services/LoadbalanceFailoverService/build.xml (original)
+++ webservices/synapse/trunk/java/modules/samples/services/LoadbalanceFailoverService/build.xml Thu Aug  9 03:05:55 2007
@@ -20,7 +20,7 @@
 <project default="build-services">
 
     <property name="synapse.home" value="../../../.."/>
-    <property name="lib" value="${synapse.home}/webapp/WEB-INF/lib"/>
+    <property name="lib" value="${synapse.home}/lib"/>
     <property name="temp.dir" value="temp"/>
     <property name="services" value="../../repository/services"/>
     <property name="classes" value="${temp.dir}/classes"/>
@@ -29,7 +29,7 @@
     <path id="synapse.class.path">
         <pathelement path="${java.class.path}"/>
         <fileset dir="${synapse.home}">
-            <include name="webapp/WEB-INF/lib/*.jar"/>
+            <include name="lib/*.jar"/>
         </fileset>
     </path>
 

Modified: webservices/synapse/trunk/java/modules/samples/services/MTOMSwASampleService/build.xml
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/services/MTOMSwASampleService/build.xml?view=diff&rev=564161&r1=564160&r2=564161
==============================================================================
--- webservices/synapse/trunk/java/modules/samples/services/MTOMSwASampleService/build.xml (original)
+++ webservices/synapse/trunk/java/modules/samples/services/MTOMSwASampleService/build.xml Thu Aug  9 03:05:55 2007
@@ -20,7 +20,7 @@
 <project default="build-service">
 
     <property name="synapse.home" value="../../../.."/>
-    <property name="lib" value="${synapse.home}/webapp/WEB-INF/lib"/>
+    <property name="lib" value="${synapse.home}/lib"/>
     <property name="temp.dir" value="temp"/>
     <property name="classes" value="${temp.dir}/classes"/>
     <property name="src" value="src"/>
@@ -29,7 +29,7 @@
     <path id="synapse.class.path">
         <pathelement path="${java.class.path}"/>
         <fileset dir="${synapse.home}">
-            <include name="webapp/WEB-INF/lib/*.jar"/>
+            <include name="lib/*.jar"/>
         </fileset>
     </path>
 

Modified: webservices/synapse/trunk/java/modules/samples/services/ReliableStockQuoteService/build.xml
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/services/ReliableStockQuoteService/build.xml?view=diff&rev=564161&r1=564160&r2=564161
==============================================================================
--- webservices/synapse/trunk/java/modules/samples/services/ReliableStockQuoteService/build.xml (original)
+++ webservices/synapse/trunk/java/modules/samples/services/ReliableStockQuoteService/build.xml Thu Aug  9 03:05:55 2007
@@ -20,7 +20,7 @@
 <project default="build-service">
 
     <property name="synapse.home" value="../../../.."/>
-    <property name="lib" value="${synapse.home}/webapp/WEB-INF/lib"/>
+    <property name="lib" value="${synapse.home}/lib"/>
     <property name="temp.dir" value="temp"/>
     <property name="classes" value="${temp.dir}/classes"/>
     <property name="src" value="src"/>
@@ -29,7 +29,7 @@
     <path id="synapse.class.path">
         <pathelement path="${java.class.path}"/>
         <fileset dir="${synapse.home}">
-            <include name="webapp/WEB-INF/lib/*.jar"/>
+            <include name="lib/*.jar"/>
         </fileset>
     </path>
 

Modified: webservices/synapse/trunk/java/modules/samples/services/SecureStockQuoteService/build.xml
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/services/SecureStockQuoteService/build.xml?view=diff&rev=564161&r1=564160&r2=564161
==============================================================================
--- webservices/synapse/trunk/java/modules/samples/services/SecureStockQuoteService/build.xml (original)
+++ webservices/synapse/trunk/java/modules/samples/services/SecureStockQuoteService/build.xml Thu Aug  9 03:05:55 2007
@@ -20,7 +20,7 @@
 <project default="build-service">
 
     <property name="synapse.home" value="../../../.."/>
-    <property name="lib" value="${synapse.home}/webapp/WEB-INF/lib"/>
+    <property name="lib" value="${synapse.home}/lib"/>
     <property name="temp.dir" value="temp"/>
     <property name="classes" value="${temp.dir}/classes"/>
     <property name="src" value="src"/>
@@ -29,7 +29,7 @@
     <path id="synapse.class.path">
         <pathelement path="${java.class.path}"/>
         <fileset dir="${synapse.home}">
-            <include name="webapp/WEB-INF/lib/*.jar"/>
+            <include name="lib/*.jar"/>
         </fileset>
     </path>
 

Modified: webservices/synapse/trunk/java/modules/samples/services/SimpleStockQuoteService/build.xml
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/services/SimpleStockQuoteService/build.xml?view=diff&rev=564161&r1=564160&r2=564161
==============================================================================
--- webservices/synapse/trunk/java/modules/samples/services/SimpleStockQuoteService/build.xml (original)
+++ webservices/synapse/trunk/java/modules/samples/services/SimpleStockQuoteService/build.xml Thu Aug  9 03:05:55 2007
@@ -20,7 +20,7 @@
 <project default="build-service">
 
     <property name="synapse.home" value="../../../.."/>
-    <property name="lib" value="${synapse.home}/webapp/WEB-INF/lib"/>
+    <property name="lib" value="${synapse.home}/lib"/>
     <property name="temp.dir" value="temp"/>
     <property name="classes" value="${temp.dir}/classes"/>
     <property name="src" value="src"/>
@@ -29,7 +29,7 @@
     <path id="synapse.class.path">
         <pathelement path="${java.class.path}"/>
         <fileset dir="${synapse.home}">
-            <include name="webapp/WEB-INF/lib/*.jar"/>
+            <include name="lib/*.jar"/>
         </fileset>
     </path>
 

Modified: webservices/synapse/trunk/java/modules/samples/src/main/scripts/axis2server.bat
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/main/scripts/axis2server.bat?view=diff&rev=564161&r1=564160&r2=564161
==============================================================================
--- webservices/synapse/trunk/java/modules/samples/src/main/scripts/axis2server.bat (original)
+++ webservices/synapse/trunk/java/modules/samples/src/main/scripts/axis2server.bat Thu Aug  9 03:05:55 2007
@@ -35,7 +35,7 @@
 rem find AXIS2_HOME if it does not exist due to either an invalid value passed
 rem by the user or the %0 problem on Windows 9x
 
-if exist "%AXIS2_HOME%\..\..\webapp\WEB-INF\classes\conf\axis2.xml" goto checkJava
+if exist "%AXIS2_HOME%\..\..\repository\conf\axis2.xml" goto checkJava
 
 :noAxis2Home
 echo AXIS2_HOME environment variable is set incorrectly or AXIS2 could not be located.
@@ -88,22 +88,22 @@
 :runAxis2
 rem set the classes by looping through the libs
 setlocal EnableDelayedExpansion
-set AXIS2_CLASS_PATH=%AXIS2_HOME%/../../webapp/WEB-INF/lib;%AXIS2_HOME%/../../repository/conf
-FOR %%c in ("%AXIS2_HOME%\..\..\webapp\WEB-INF\lib\*.jar") DO set AXIS2_CLASS_PATH=!AXIS2_CLASS_PATH!;%%c
+set AXIS2_CLASS_PATH=%AXIS2_HOME%/../../lib;%AXIS2_HOME%/../../repository/conf
+FOR %%c in ("%AXIS2_HOME%\..\..\lib\*.jar") DO set AXIS2_CLASS_PATH=!AXIS2_CLASS_PATH!;%%c
 
 rem use proper bouncy castle version for the JDK
 
 "%JAVA_HOME%\bin\java" -version 2>&1 | findstr "1.4" >NUL
 IF ERRORLEVEL 1 goto checkJdk15
 echo  Using Bouncy castle JAR for Java 1.4
-FOR %%C in ("%AXIS2_HOME%\..\..\webapp\WEB-INF\lib\bcprov-jdk13*.jar") DO set AXIS2_CLASS_PATH="%%~fC";!AXIS2_CLASS_PATH!
+FOR %%C in ("%AXIS2_HOME%\..\..\lib\bcprov-jdk13*.jar") DO set AXIS2_CLASS_PATH="%%~fC";!AXIS2_CLASS_PATH!
 goto runServer
 
 :checkJdk15
 "%JAVA_HOME%\bin\java" -version 2>&1 | findstr "1.5" >NUL
 IF ERRORLEVEL 1 goto runServer
 echo  Using Bouncy castle JAR for Java 1.5
-FOR %%C in ("%AXIS2_HOME%\..\..\webapp\WEB-INF\lib\bcprov-jdk15*.jar") DO set AXIS2_CLASS_PATH="%%~fC";!AXIS2_CLASS_PATH!
+FOR %%C in ("%AXIS2_HOME%\..\..\lib\bcprov-jdk15*.jar") DO set AXIS2_CLASS_PATH="%%~fC";!AXIS2_CLASS_PATH!
 
 :runServer
 set AXIS2_ENDORSED=%AXIS2_HOME%\..\..\lib\endorsed

Modified: webservices/synapse/trunk/java/modules/samples/src/main/scripts/axis2server.sh
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/main/scripts/axis2server.sh?view=diff&rev=564161&r1=564160&r2=564161
==============================================================================
--- webservices/synapse/trunk/java/modules/samples/src/main/scripts/axis2server.sh (original)
+++ webservices/synapse/trunk/java/modules/samples/src/main/scripts/axis2server.sh Thu Aug  9 03:05:55 2007
@@ -80,12 +80,12 @@
 fi
 
 # update classpath
-AXIS2_CLASSPATH="$AXIS2_HOME/../../webapp/WEB-INF/lib"
-for f in "$AXIS2_HOME"/../../webapp/WEB-INF/lib/*.jar
+AXIS2_CLASSPATH="$AXIS2_HOME/../../lib"
+for f in "$AXIS2_HOME"/../../lib/*.jar
 do
   AXIS2_CLASSPATH="$AXIS2_CLASSPATH":$f
 done
-AXIS2_CLASSPATH=$AXIS2_HOME/../../webapp/WEB-INF/classes:"$JAVA_HOME/lib/tools.jar":"$AXIS2_CLASSPATH":"$CLASSPATH"
+AXIS2_CLASSPATH="$JAVA_HOME/lib/tools.jar":"$AXIS2_CLASSPATH":"$CLASSPATH"
 
 # use proper bouncy castle version for the JDK
 jdk_15=`$JAVA_HOME/bin/java -version 2>&1 | grep 1.5`
@@ -93,13 +93,13 @@
 
 if [ "$jdk_15" ]; then
     echo " Using Bouncy castle JAR for Java 1.5"
-    for f in $AXIS2_HOME/../../webapp/WEB-INF/lib/bcprov-jdk15*.jar
+    for f in $AXIS2_HOME/../../lib/bcprov-jdk15*.jar
     do
       AXIS2_CLASSPATH=$f:$AXIS2_CLASSPATH
     done
 elif [ "$jdk_14" ]; then
     echo " Using Bouncy castle JAR for Java 1.4"
-    for f in $AXIS2_HOME/../../webapp/WEB-INF/lib/bcprov-jdk13*.jar
+    for f in $AXIS2_HOME/../../lib/bcprov-jdk13*.jar
     do
       AXIS2_CLASSPATH=$f:$AXIS2_CLASSPATH
     done

Modified: webservices/synapse/trunk/java/modules/samples/src/main/scripts/build.xml
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/main/scripts/build.xml?view=diff&rev=564161&r1=564160&r2=564161
==============================================================================
--- webservices/synapse/trunk/java/modules/samples/src/main/scripts/build.xml (original)
+++ webservices/synapse/trunk/java/modules/samples/src/main/scripts/build.xml Thu Aug  9 03:05:55 2007
@@ -100,7 +100,7 @@
             <sysproperty key="policy" value="${policy}"/>
             <sysproperty key="rest" value="${rest}"/>
             <sysproperty key="wsrm" value="${wsrm}"/>
-            <sysproperty key="javax.net.ssl.trustStore" value="./../../webapp/WEB-INF/classes/conf/trust.jks"/>
+            <sysproperty key="javax.net.ssl.trustStore" value="./../../lib/trust.jks"/>
             <sysproperty key="javax.net.ssl.trustStorePassword" value="password"/>
             <!--
             <jvmarg value="-Xdebug"/>
@@ -137,7 +137,7 @@
             <sysproperty key="opt_mode" value="${opt_mode}"/>
             <sysproperty key="opt_url"  value="${opt_url}"/>
             <sysproperty key="opt_file" value="${opt_file}"/>
-            <sysproperty key="javax.net.ssl.trustStore" value="./../../webapp/WEB-INF/lib/trust.jks"/>
+            <sysproperty key="javax.net.ssl.trustStore" value="./../../lib/trust.jks"/>
             <sysproperty key="javax.net.ssl.trustStorePassword" value="password"/>
             <!--
             <jvmarg value="-Xdebug"/>
@@ -174,8 +174,8 @@
         <mkdir dir="${class.dir}"/>
         <path id="javac.classpath">
             <pathelement path="${class.dir}"/>
-            <pathelement path="../../webapp/WEB-INF/lib"/>
-            <fileset dir="../../webapp/WEB-INF/lib">
+            <pathelement path="../../lib"/>
+            <fileset dir="../../lib">
                 <include name="**/*.jar"/>
             </fileset>
         </path>

Added: webservices/synapse/trunk/java/modules/war/pom.xml
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/war/pom.xml?view=auto&rev=564161
==============================================================================
--- webservices/synapse/trunk/java/modules/war/pom.xml (added)
+++ webservices/synapse/trunk/java/modules/war/pom.xml Thu Aug  9 03:05:55 2007
@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+
+<project
+        xmlns="http://maven.apache.org/POM/4.0.0"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.synapse</groupId>
+        <artifactId>synapse</artifactId>
+        <version>SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.synapse</groupId>
+    <artifactId>synapse-war</artifactId>
+
+    <name>Apache Synapse - Web Application</name>
+    <description>Apache Synapse - Web Application</description>
+    <packaging>war</packaging>
+    <build>
+        <finalName>synapse</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <version>2.0-alpha-1</version>
+                <executions>
+                    <execution>
+                        <id>copy</id>
+                        <phase>initialize</phase>
+                        <goals>
+                            <goal>copy</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.apache.axis2</groupId>
+                                    <artifactId>addressing</artifactId>
+                                    <version>${addressing.version}</version>
+                                    <type>mar</type>
+                                    <outputDirectory>target/temp/lib</outputDirectory>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.apache.sandesha2</groupId>
+                                    <artifactId>sandesha2</artifactId>
+                                    <version>${sandesha2.version}</version>
+                                    <type>mar</type>                                    
+                                    <outputDirectory>target/temp/lib</outputDirectory>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.apache.rampart</groupId>
+                                    <artifactId>rampart</artifactId>
+                                    <version>${rampart.version}</version>
+                                    <type>mar</type>
+                                    <outputDirectory>target/temp/lib</outputDirectory>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>2.0.2</version>
+                <configuration>
+                    <warName>synapse</warName>
+                    <archive>
+                        <addMavenDescriptor>false</addMavenDescriptor>
+                    </archive>
+                    <outputDirectory>target</outputDirectory>
+                    <webResources>
+                        <resource>
+                            <directory>repository</directory>
+                            <targetPath>WEB-INF/repository</targetPath>
+                            <excludes>
+                                <exclude>repository/conf/web.xml</exclude>
+                                <exclude>repository/conf/axis2.xml</exclude>
+                                <exclude>repository/conf/synapse.xml</exclude>
+                            </excludes>
+                        </resource>
+                        <!--<resource>-->
+                            <!--<directory>repository/conf/sample/resources/misc/client-->
+                            <!--</directory>-->
+                            <!--<targetPath>samples/axis2Client/client_repo/conf</targetPath>-->
+                            <!--<includes>-->
+                                <!--<include>axis2.xml</include>-->
+                            <!--</includes>-->
+                        <!--</resource>-->
+                        <!--<resource>-->
+                            <!--<directory>repository/conf/sample/resources/misc/server-->
+                            <!--</directory>-->
+                            <!--<targetPath>samples/axis2Server/repository/conf</targetPath>-->
+                            <!--<includes>-->
+                                <!--<include>axis2.xml</include>-->
+                            <!--</includes>-->
+                        <!--</resource>-->
+                        <resource>
+                            <directory>modules/core/src/main/resources</directory>
+                            <targetPath>WEB-INF/classes/conf</targetPath>
+                            <includes>
+                                <include>log4j.properties</include>
+                                <include>identity.jks</include>
+                                <include>trust.jks</include>
+                            </includes>
+                        </resource>
+                        <resource>
+                            <directory>modules/core/target</directory>
+                            <targetPath>WEB-INF/repository/modules</targetPath>
+                            <includes>
+                                <include>synapse-${synapse.version}.mar</include>
+                            </includes>
+                        </resource>
+                        <resource>
+                            <directory>modules/war/target/temp/lib</directory>
+                            <targetPath>WEB-INF/repository/modules</targetPath>
+                            <includes>
+                                <include>addressing-${addressing.version}.mar</include>
+                                <include>rampart-${rampart.version}.mar</include>
+                                <include>sandesha2-${sandesha2.version}.mar</include>
+                            </includes>
+                        </resource>
+                        <resource>
+                            <directory>src/main/release/docs</directory>
+                            <targetPath>docs</targetPath>
+                            <includes>
+                                <include>release_notes.txt</include>
+                            </includes>
+                        </resource>
+                        <resource>
+                            <directory>src/site/resources</directory>
+                            <targetPath>docs</targetPath>
+                            <includes>
+                                <include>Synapse_Configuration_Language.html</include>
+                                <include>Synapse_Samples.html</include>
+                                <include>Synapse_Samples_Setup.html</include>
+                                <include>Synapse_QuickStart.html</include>
+                                <include>Synapse_Extending.html</include>
+                            </includes>
+                        </resource>
+                        <!--<resource>-->
+                            <!--<directory>modules/samples/services</directory>-->
+                            <!--<targetPath>samples/axis2Server/src</targetPath>-->
+                        <!--</resource>-->
+                        <!--<resource>-->
+                            <!--<directory>modules/samples/src/main/java</directory>-->
+                            <!--<targetPath>samples/axis2Client/src</targetPath>-->
+                            <!--<excludes>-->
+                                <!--<exclude>**/target</exclude>-->
+                                <!--<exclude>**/target/**/*</exclude>-->
+                            <!--</excludes>-->
+                        <!--</resource>-->
+                        <!--<resource>-->
+                            <!--<directory>modules/samples/src/main/scripts</directory>-->
+                            <!--<targetPath>samples/axis2Client</targetPath>-->
+                            <!--<excludes>-->
+                                <!--<exclude>custom.sh</exclude>-->
+                                <!--<exclude>custom.bat</exclude>-->
+                                <!--<exclude>axis2server.sh</exclude>-->
+                                <!--<exclude>axis2server.bat</exclude>-->
+                            <!--</excludes>-->
+                        <!--</resource>-->
+                        <!--<resource>-->
+                            <!--<directory>modules/samples/src/main/scripts</directory>-->
+                            <!--<targetPath>samples/axis2Server</targetPath>-->
+                            <!--<includes>-->
+                                <!--<include>axis2server.sh</include>-->
+                            <!--</includes>-->
+                        <!--</resource>-->
+                        <!--<resource>-->
+                            <!--<directory>modules/samples/src/main/scripts</directory>-->
+                            <!--<targetPath>samples/axis2Server</targetPath>-->
+                            <!--<includes>-->
+                                <!--<include>axis2server.bat</include>-->
+                            <!--</includes>-->
+                        <!--</resource>-->
+                        <resource>
+                            <directory>modules/core/target</directory>
+                            <targetPath>WEB-INF/lib</targetPath>
+                            <includes>
+                                <include>synapse-core-${synapse.version}.jar</include>
+                            </includes>
+                        </resource>
+                        <resource>
+                            <directory>modules/samples/target</directory>
+                            <targetPath>WEB-INF/lib</targetPath>
+                            <includes>
+                                <include>synapse-samples-${synapse.version}.jar</include>
+                            </includes>
+                        </resource>
+                        <resource>
+                            <directory>modules/extensions/target</directory>
+                            <targetPath>WEB-INF/lib</targetPath>
+                            <includes>
+                                <include>synapse-extensions-${synapse.version}.jar</include>
+                            </includes>
+                        </resource>
+                        <resource>
+                            <directory>modules/transports/target</directory>
+                            <targetPath>WEB-INF/lib</targetPath>
+                            <includes>
+                                <include>synapse-transports-${synapse.version}.jar</include>
+                            </includes>
+                        </resource>
+                        <resource>
+                            <directory>repository/conf</directory>
+                            <targetPath>WEB-INF</targetPath>
+                            <includes>
+                                <include>web.xml</include>
+                            </includes>
+                        </resource>
+                        <resource>
+                            <directory>repository/conf</directory>
+                            <targetPath>WEB-INF/conf</targetPath>
+                            <includes>
+                                <include>axis2.xml</include>
+                                <include>synapse.xml</include>
+                            </includes>
+                        </resource>
+                    </webResources>
+                </configuration>
+            </plugin>
+            
+        </plugins>
+    </build>
+</project>

Modified: webservices/synapse/trunk/java/pom.xml
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/pom.xml?view=diff&rev=564161&r1=564160&r2=564161
==============================================================================
--- webservices/synapse/trunk/java/pom.xml (original)
+++ webservices/synapse/trunk/java/pom.xml Thu Aug  9 03:05:55 2007
@@ -108,6 +108,7 @@
                         <!--<inherited>false</inherited>-->
                     <!--</plugin>-->
                     <!---->
+                    
                     <plugin>
                         <artifactId>maven-javadoc-plugin</artifactId>
                         <version>2.1</version>
@@ -787,7 +788,7 @@
             <version>${mx4j.version}</version>
             <scope>provided</scope>
         </dependency>
-        
+
     </dependencies>
 
     <reporting>
@@ -856,6 +857,7 @@
         <module>modules/extensions</module>
         <module>modules/samples</module>
         <module>modules/mar</module>
+        <module>modules/war</module>
     </modules>
 
     <properties>

Modified: webservices/synapse/trunk/java/repository/conf/web.xml
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/web.xml?view=diff&rev=564161&r1=564160&r2=564161
==============================================================================
--- webservices/synapse/trunk/java/repository/conf/web.xml (original)
+++ webservices/synapse/trunk/java/repository/conf/web.xml Thu Aug  9 03:05:55 2007
@@ -30,7 +30,7 @@
     <servlet>
         <servlet-name>StartUpServlet</servlet-name>
         <servlet-class>org.apache.synapse.core.axis2.SynapseStartUpServlet</servlet-class>
-        <!-- synapse.home parameter must have set if synapse is going to deploy in the exsiting tomcat
+        <!-- synapse.home parameter is optinal. if set this,then it take as the synapse.home
          This value must contains the absolute path to the syapase home  -->
         <!--<init-param>-->
             <!--<param-name>synapse.home</param-name>-->

Modified: webservices/synapse/trunk/java/src/main/bin/synapse.bat
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/src/main/bin/synapse.bat?view=diff&rev=564161&r1=564160&r2=564161
==============================================================================
--- webservices/synapse/trunk/java/src/main/bin/synapse.bat (original)
+++ webservices/synapse/trunk/java/src/main/bin/synapse.bat Thu Aug  9 03:05:55 2007
@@ -92,29 +92,27 @@
 :runSynapse
 rem set the classes by looping through the libs
 setlocal EnableDelayedExpansion
-set SYNAPSE_CLASS_PATH="%SYNAPSE_HOME%/webapp/WEB-INF/lib"
-FOR %%C in ("%SYNAPSE_HOME%\webapp\WEB-INF\lib\*.jar") DO set SYNAPSE_CLASS_PATH=!SYNAPSE_CLASS_PATH!;"%%~fC"
-set SYNAPSE_CLASS_PATH="%SYNAPSE_HOME%\webapp\WEB-INF\lib";%SYNAPSE_CLASS_PATH%
-
-set SYNAPSE_CLASS_PATH="%SYNAPSE_HOME%\webapp\WEB-INF\classes";%SYNAPSE_CLASS_PATH%
+set SYNAPSE_CLASS_PATH="%SYNAPSE_HOME%/lib"
+FOR %%C in ("%SYNAPSE_HOME%\lib\*.jar") DO set SYNAPSE_CLASS_PATH=!SYNAPSE_CLASS_PATH!;"%%~fC"
+set SYNAPSE_CLASS_PATH="%SYNAPSE_HOME%\lib";%SYNAPSE_CLASS_PATH%
 
 rem use proper bouncy castle version for the JDK
 
 "%JAVA_HOME%\bin\java" -version 2>&1 | findstr "1.4" >NUL
 IF ERRORLEVEL 1 goto checkJdk15
 echo  Using Bouncy castle JAR for Java 1.4
-FOR %%C in ("%SYNAPSE_HOME%\webapp\WEB-INF\lib\bcprov-jdk13*.jar") DO set SYNAPSE_CLASS_PATH="%%~fC";!SYNAPSE_CLASS_PATH!
+FOR %%C in ("%SYNAPSE_HOME%\lib\bcprov-jdk13*.jar") DO set SYNAPSE_CLASS_PATH="%%~fC";!SYNAPSE_CLASS_PATH!
 goto runServer
 
 :checkJdk15
 "%JAVA_HOME%\bin\java" -version 2>&1 | findstr "1.5" >NUL
 IF ERRORLEVEL 1 goto runServer
 echo  Using Bouncy castle JAR for Java 1.5
-FOR %%C in ("%SYNAPSE_HOME%\webapp\WEB-INF\lib\bcprov-jdk15*.jar") DO set SYNAPSE_CLASS_PATH="%%~fC";!SYNAPSE_CLASS_PATH!
+FOR %%C in ("%SYNAPSE_HOME%\lib\bcprov-jdk15*.jar") DO set SYNAPSE_CLASS_PATH="%%~fC";!SYNAPSE_CLASS_PATH!
 
 :runServer
 rem if a sample configuration is not specified, use default
-if "%_SYNAPSE_XML%" == "" set _SYNAPSE_XML=-Dsynapse.xml="%SYNAPSE_HOME%\webapp\WEB-INF\classes\conf\synapse.xml"
+if "%_SYNAPSE_XML%" == "" set _SYNAPSE_XML=-Dsynapse.xml="%SYNAPSE_HOME%\repository\conf\synapse.xml"
 
 set SYNAPSE_ENDORSED="%SYNAPSE_HOME%\lib\endorsed";"%JAVA_ENDORSED_DIRS%";"%JAVA_HOME%\lib\endorsed"
 
@@ -125,7 +123,7 @@
 echo Using JAVA_HOME:       %JAVA_HOME%
 echo Using SYNAPSE_XML:     %_SYNAPSE_XML%
 
-%_JAVACMD% %_PORT% %_SYNAPSE_XML% -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XMLGrammarCachingConfiguration -Daxis2.xml="%SYNAPSE_HOME%\webapp\WEB-INF\classes\conf\axis2.xml" -Djava.endorsed.dirs=%SYNAPSE_ENDORSED% %_XDEBUG% -cp %SYNAPSE_CLASS_PATH% org.apache.synapse.SynapseServer "%SYNAPSE_HOME%\repository"
+%_JAVACMD% %_PORT% %_SYNAPSE_XML% -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XMLGrammarCachingConfiguration -Daxis2.xml="%SYNAPSE_HOME%\repository\conf\axis2.xml" -Djava.endorsed.dirs=%SYNAPSE_ENDORSED% %_XDEBUG% -cp %SYNAPSE_CLASS_PATH% org.apache.synapse.SynapseServer "%SYNAPSE_HOME%\repository"
 goto end
 
 :end

Modified: webservices/synapse/trunk/java/src/main/bin/synapse.sh
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/src/main/bin/synapse.sh?view=diff&rev=564161&r1=564160&r2=564161
==============================================================================
--- webservices/synapse/trunk/java/src/main/bin/synapse.sh (original)
+++ webservices/synapse/trunk/java/src/main/bin/synapse.sh Thu Aug  9 03:05:55 2007
@@ -84,12 +84,12 @@
 fi
 
 # update classpath
-SYNAPSE_CLASSPATH="$SYNAPSE_HOME/webapp/WEB-INF/lib"
-for f in $SYNAPSE_HOME/webapp/WEB-INF/lib/*.jar
+SYNAPSE_CLASSPATH="$SYNAPSE_HOME/lib"
+for f in $SYNAPSE_HOME/lib/*.jar
 do
   SYNAPSE_CLASSPATH=$SYNAPSE_CLASSPATH:$f
 done
-SYNAPSE_CLASSPATH=$SYNAPSE_HOME/webapp/WEB-INF/classes:$JAVA_HOME/lib/tools.jar:$SYNAPSE_CLASSPATH:$CLASSPATH
+SYNAPSE_CLASSPATH=$JAVA_HOME/lib/tools.jar:$SYNAPSE_CLASSPATH:$CLASSPATH
 
 # use proper bouncy castle version for the JDK
 jdk_15=`$JAVA_HOME/bin/java -version 2>&1 | grep 1.5`
@@ -97,13 +97,13 @@
 
 if [ "$jdk_15" ]; then
     echo " Using Bouncy castle JAR for Java 1.5"
-    for f in $SYNAPSE_HOME/webapp/WEB-INF/lib/bcprov-jdk15*.jar
+    for f in $SYNAPSE_HOME/lib/bcprov-jdk15*.jar
     do
       SYNAPSE_CLASSPATH=$f:$SYNAPSE_CLASSPATH
     done
 elif [ "$jdk_14" ]; then
     echo " Using Bouncy castle JAR for Java 1.4"
-    for f in $SYNAPSE_HOME/webapp/WEB-INF/lib/bcprov-jdk13*.jar
+    for f in $SYNAPSE_HOME/lib/bcprov-jdk13*.jar
     do
       SYNAPSE_CLASSPATH=$f:$SYNAPSE_CLASSPATH
     done
@@ -121,7 +121,7 @@
 SYNAPSE_ENDORSED=$SYNAPSE_HOME/lib/endorsed
 
 # synapse.xml
-SYNAPSE_XML=-Dsynapse.xml=$SYNAPSE_HOME/webapp/WEB-INF/classes/conf/synapse.xml
+SYNAPSE_XML=-Dsynapse.xml=$SYNAPSE_HOME/repository/conf/synapse.xml
 
 if [ "$1" = "-xdebug" ]; then
   XDEBUG="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
@@ -152,4 +152,4 @@
 echo "Using JAVA_HOME:       $JAVA_HOME"
 echo "Using SYNAPSE_XML:     $SYNAPSE_XML"
 
-$JAVA_HOME/bin/java $XDEBUG $PORT $SYNAPSE_XML -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XMLGrammarCachingConfiguration -Daxis2.xml=$SYNAPSE_HOME/webapp/WEB-INF/classes/conf/axis2.xml -Djava.endorsed.dirs=$SYNAPSE_ENDORSED -classpath $SYNAPSE_CLASSPATH org.apache.synapse.SynapseServer $SYNAPSE_HOME/repository
+$JAVA_HOME/bin/java $XDEBUG $PORT $SYNAPSE_XML -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XMLGrammarCachingConfiguration -Daxis2.xml=$SYNAPSE_HOME/repository/conf/axis2.xml -Djava.endorsed.dirs=$SYNAPSE_ENDORSED -classpath $SYNAPSE_CLASSPATH org.apache.synapse.SynapseServer $SYNAPSE_HOME/repository



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