synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asan...@apache.org
Subject svn commit: r577213 [2/5] - in /webservices/synapse/trunk/java/modules: core/src/main/java/org/apache/synapse/ core/src/main/java/org/apache/synapse/config/ core/src/main/java/org/apache/synapse/config/xml/ core/src/main/java/org/apache/synapse/config/...
Date Wed, 19 Sep 2007 09:09:14 GMT
Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/RegistryFactory.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/RegistryFactory.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/RegistryFactory.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/RegistryFactory.java Wed Sep 19 02:09:01 2007
@@ -40,9 +40,9 @@
 
     private static final Log log = LogFactory.getLog(RegistryFactory.class);
 
-    public static final QName PROVIDER_Q = new QName(Constants.NULL_NAMESPACE, "provider");
-    public static final QName PARAMETER_Q = new QName(Constants.SYNAPSE_NAMESPACE, "parameter");
-    public static final QName NAME_Q     = new QName(Constants.NULL_NAMESPACE, "name");
+    public static final QName PROVIDER_Q = new QName(XMLConfigConstants.NULL_NAMESPACE, "provider");
+    public static final QName PARAMETER_Q = new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "parameter");
+    public static final QName NAME_Q     = new QName(XMLConfigConstants.NULL_NAMESPACE, "name");
 
     public static Registry createRegistry(OMElement elem) {
 

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/RegistrySerializer.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/RegistrySerializer.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/RegistrySerializer.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/RegistrySerializer.java Wed Sep 19 02:09:01 2007
@@ -40,8 +40,8 @@
     private static final Log log = LogFactory.getLog(RegistrySerializer.class);
 
     protected static final OMFactory fac = OMAbstractFactory.getOMFactory();
-    protected static final OMNamespace synNS = fac.createOMNamespace(Constants.SYNAPSE_NAMESPACE, "syn");
-    protected static final OMNamespace nullNS = fac.createOMNamespace(Constants.NULL_NAMESPACE, "");
+    protected static final OMNamespace synNS = fac.createOMNamespace(XMLConfigConstants.SYNAPSE_NAMESPACE, "syn");
+    protected static final OMNamespace nullNS = fac.createOMNamespace(XMLConfigConstants.NULL_NAMESPACE, "");
 
     public static OMElement serializeRegistry(OMElement parent, Registry registry) {
 

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SendMediatorFactory.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SendMediatorFactory.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SendMediatorFactory.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SendMediatorFactory.java Wed Sep 19 02:09:01 2007
@@ -79,7 +79,7 @@
 
     private static final Log log = LogFactory.getLog(SendMediatorFactory.class);
 
-    private static final QName SEND_Q = new QName(Constants.SYNAPSE_NAMESPACE, "send");
+    private static final QName SEND_Q = new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "send");
 
     public Mediator createMediator(OMElement elem) {
 
@@ -89,7 +89,7 @@
         // set its common attributes such as tracing etc
         initMediator(sm,elem);
 
-        OMElement epElement = elem.getFirstChildWithName(new QName(Constants.SYNAPSE_NAMESPACE, "endpoint"));
+        OMElement epElement = elem.getFirstChildWithName(new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "endpoint"));
         if (epElement != null) {
             // get the factory for the element
             // create the endpoint and set it in the send medaitor

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SequenceMediatorFactory.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SequenceMediatorFactory.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SequenceMediatorFactory.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SequenceMediatorFactory.java Wed Sep 19 02:09:01 2007
@@ -48,7 +48,7 @@
 
     private static final Log log = LogFactory.getLog(SequenceMediatorFactory.class);
 
-    private static final QName SEQUENCE_Q = new QName(Constants.SYNAPSE_NAMESPACE, "sequence");
+    private static final QName SEQUENCE_Q = new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "sequence");
 
     public QName getTagQName() {
         return SEQUENCE_Q;
@@ -56,21 +56,21 @@
 
     public SequenceMediator createAnonymousSequence(OMElement elem) {
         SequenceMediator seqMediator = new SequenceMediator();
-        OMAttribute e = elem.getAttribute(new QName(Constants.NULL_NAMESPACE, "onError"));
+        OMAttribute e = elem.getAttribute(new QName(XMLConfigConstants.NULL_NAMESPACE, "onError"));
         if (e != null) {
             seqMediator.setErrorHandler(e.getAttributeValue());
         }
         initMediator(seqMediator, elem);
         addChildren(elem, seqMediator);
         OMAttribute statistics = elem.getAttribute(
-                new QName(Constants.NULL_NAMESPACE, Constants.STATISTICS_ATTRIB_NAME));
+                new QName(XMLConfigConstants.NULL_NAMESPACE, XMLConfigConstants.STATISTICS_ATTRIB_NAME));
         if (statistics != null) {
             String statisticsValue = statistics.getAttributeValue();
             if (statisticsValue != null) {
-                if (Constants.STATISTICS_ENABLE.equals(statisticsValue)) {
-                    seqMediator.setStatisticsEnable(org.apache.synapse.Constants.STATISTICS_ON);
-                } else if (Constants.STATISTICS_DISABLE.equals(statisticsValue)) {
-                    seqMediator.setStatisticsEnable(org.apache.synapse.Constants.STATISTICS_OFF);
+                if (XMLConfigConstants.STATISTICS_ENABLE.equals(statisticsValue)) {
+                    seqMediator.setStatisticsEnable(org.apache.synapse.SynapseConstants.STATISTICS_ON);
+                } else if (XMLConfigConstants.STATISTICS_DISABLE.equals(statisticsValue)) {
+                    seqMediator.setStatisticsEnable(org.apache.synapse.SynapseConstants.STATISTICS_OFF);
                 }
             }
         }
@@ -81,8 +81,8 @@
 
         SequenceMediator seqMediator = new SequenceMediator();
 
-        OMAttribute n = elem.getAttribute(new QName(Constants.NULL_NAMESPACE, "name"));
-        OMAttribute e = elem.getAttribute(new QName(Constants.NULL_NAMESPACE, "onError"));
+        OMAttribute n = elem.getAttribute(new QName(XMLConfigConstants.NULL_NAMESPACE, "name"));
+        OMAttribute e = elem.getAttribute(new QName(XMLConfigConstants.NULL_NAMESPACE, "onError"));
         if (n != null) {
             seqMediator.setName(n.getAttributeValue());
             if (e != null) {
@@ -92,7 +92,7 @@
             addChildren(elem, seqMediator);
 
         } else {
-            n = elem.getAttribute(new QName(Constants.NULL_NAMESPACE, "key"));
+            n = elem.getAttribute(new QName(XMLConfigConstants.NULL_NAMESPACE, "key"));
             if (n != null) {
                 seqMediator.setKey(n.getAttributeValue());
                 if (e != null) {
@@ -109,14 +109,14 @@
         }
 
         OMAttribute statistics = elem.getAttribute(
-                new QName(Constants.NULL_NAMESPACE, Constants.STATISTICS_ATTRIB_NAME));
+                new QName(XMLConfigConstants.NULL_NAMESPACE, XMLConfigConstants.STATISTICS_ATTRIB_NAME));
         if (statistics != null) {
             String statisticsValue = statistics.getAttributeValue();
             if (statisticsValue != null) {
-                if (Constants.STATISTICS_ENABLE.equals(statisticsValue)) {
-                    seqMediator.setStatisticsEnable(org.apache.synapse.Constants.STATISTICS_ON);
-                } else if (Constants.STATISTICS_DISABLE.equals(statisticsValue)) {
-                    seqMediator.setStatisticsEnable(org.apache.synapse.Constants.STATISTICS_OFF);
+                if (XMLConfigConstants.STATISTICS_ENABLE.equals(statisticsValue)) {
+                    seqMediator.setStatisticsEnable(org.apache.synapse.SynapseConstants.STATISTICS_ON);
+                } else if (XMLConfigConstants.STATISTICS_DISABLE.equals(statisticsValue)) {
+                    seqMediator.setStatisticsEnable(org.apache.synapse.SynapseConstants.STATISTICS_OFF);
                 }
             }
         }

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SequenceMediatorSerializer.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SequenceMediatorSerializer.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SequenceMediatorSerializer.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SequenceMediatorSerializer.java Wed Sep 19 02:09:01 2007
@@ -47,14 +47,14 @@
         OMElement sequence = fac.createOMElement("sequence", synNS);
         int isEnableStatistics = mediator.getStatisticsEnable();
         String statisticsValue = null;
-        if (isEnableStatistics == org.apache.synapse.Constants.STATISTICS_ON) {
-            statisticsValue = Constants.STATISTICS_ENABLE;
-        } else if (isEnableStatistics == org.apache.synapse.Constants.STATISTICS_OFF) {
-            statisticsValue = Constants.STATISTICS_DISABLE;
+        if (isEnableStatistics == org.apache.synapse.SynapseConstants.STATISTICS_ON) {
+            statisticsValue = XMLConfigConstants.STATISTICS_ENABLE;
+        } else if (isEnableStatistics == org.apache.synapse.SynapseConstants.STATISTICS_OFF) {
+            statisticsValue = XMLConfigConstants.STATISTICS_DISABLE;
         }
         if (statisticsValue != null) {
             sequence.addAttribute(fac.createOMAttribute(
-                    Constants.STATISTICS_ATTRIB_NAME, nullNS, statisticsValue));
+                    XMLConfigConstants.STATISTICS_ATTRIB_NAME, nullNS, statisticsValue));
         }
         if (mediator.getErrorHandler() != null) {
             sequence.addAttribute(fac.createOMAttribute(
@@ -89,14 +89,14 @@
 
             int isEnableStatistics = mediator.getStatisticsEnable();
             String statisticsValue = null;
-            if (isEnableStatistics == org.apache.synapse.Constants.STATISTICS_ON) {
-                statisticsValue = Constants.STATISTICS_ENABLE;
-            } else if (isEnableStatistics == org.apache.synapse.Constants.STATISTICS_OFF) {
-                statisticsValue = Constants.STATISTICS_DISABLE;
+            if (isEnableStatistics == org.apache.synapse.SynapseConstants.STATISTICS_ON) {
+                statisticsValue = XMLConfigConstants.STATISTICS_ENABLE;
+            } else if (isEnableStatistics == org.apache.synapse.SynapseConstants.STATISTICS_OFF) {
+                statisticsValue = XMLConfigConstants.STATISTICS_DISABLE;
             }
             if (statisticsValue != null) {
                 sequence.addAttribute(fac.createOMAttribute(
-                        Constants.STATISTICS_ATTRIB_NAME, nullNS, statisticsValue));
+                        XMLConfigConstants.STATISTICS_ATTRIB_NAME, nullNS, statisticsValue));
             }
 
             if (mediator.getKey() != null) {

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SwitchMediatorFactory.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SwitchMediatorFactory.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SwitchMediatorFactory.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SwitchMediatorFactory.java Wed Sep 19 02:09:01 2007
@@ -52,14 +52,14 @@
 
     private static final Log log = LogFactory.getLog(SwitchMediatorFactory.class);
 
-    private static final QName SWITCH_Q = new QName(Constants.SYNAPSE_NAMESPACE, "switch");
-    private static final QName CASE_Q = new QName(Constants.SYNAPSE_NAMESPACE, "case");
-    private static final QName DEFAULT_Q = new QName(Constants.SYNAPSE_NAMESPACE, "default");
+    private static final QName SWITCH_Q = new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "switch");
+    private static final QName CASE_Q = new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "case");
+    private static final QName DEFAULT_Q = new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "default");
 
     public Mediator createMediator(OMElement elem) {
 
         SwitchMediator switchMediator = new SwitchMediator();
-        OMAttribute source = elem.getAttribute(new QName(Constants.NULL_NAMESPACE, "source"));
+        OMAttribute source = elem.getAttribute(new QName(XMLConfigConstants.NULL_NAMESPACE, "source"));
         if (source == null) {
             String msg = "A 'source' XPath attribute is required for a switch mediator";
             log.error(msg);
@@ -83,7 +83,7 @@
         while (iter.hasNext()) {
             OMElement caseElem = (OMElement) iter.next();
             SwitchCase aCase = new SwitchCase();
-            OMAttribute regex = caseElem.getAttribute(new QName(Constants.NULL_NAMESPACE, "regex"));
+            OMAttribute regex = caseElem.getAttribute(new QName(XMLConfigConstants.NULL_NAMESPACE, "regex"));
             if (regex == null) {
                 String msg = "The 'regex' attribute is required for a switch case definition";
                 log.error(msg);

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SynapseMediatorFactory.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SynapseMediatorFactory.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SynapseMediatorFactory.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SynapseMediatorFactory.java Wed Sep 19 02:09:01 2007
@@ -21,6 +21,7 @@
 
 import org.apache.axiom.om.OMElement;
 import org.apache.synapse.Mediator;
+import org.apache.synapse.SynapseConstants;
 import org.apache.synapse.mediators.base.SynapseMediator;
 
 import javax.xml.namespace.QName;
@@ -36,7 +37,7 @@
  */
 public class SynapseMediatorFactory extends AbstractListMediatorFactory {
 
-    private final static QName RULES_Q = new QName(Constants.SYNAPSE_NAMESPACE, "rules");
+    private final static QName RULES_Q = new QName(SynapseConstants.SYNAPSE_NAMESPACE, "rules");
 
     public QName getTagQName() {
         return RULES_Q;

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SynapseXMLConfigurationFactory.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SynapseXMLConfigurationFactory.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SynapseXMLConfigurationFactory.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SynapseXMLConfigurationFactory.java Wed Sep 19 02:09:01 2007
@@ -26,14 +26,14 @@
 	private static Log log = LogFactory.getLog(SynapseXMLConfigurationFactory.class);
 	
 	public SynapseConfiguration getConfiguration(OMElement definitions) {
-		if (!definitions.getQName().equals(Constants.DEFINITIONS_ELT)) throw new SynapseException("Wrong QName for this config factory "+definitions.getQName());
+		if (!definitions.getQName().equals(XMLConfigConstants.DEFINITIONS_ELT)) throw new SynapseException("Wrong QName for this config factory "+definitions.getQName());
 		
 		
 		SynapseConfiguration config = new SynapseConfiguration();
 		config.setDefaultQName(definitions.getQName());
 		
         SequenceMediator rootSequence = new SequenceMediator();
-        rootSequence.setName(org.apache.synapse.Constants.MAIN_SEQUENCE_KEY);
+        rootSequence.setName(org.apache.synapse.SynapseConstants.MAIN_SEQUENCE_KEY);
 
 
 
@@ -43,9 +43,9 @@
                     Object o = iter.next();
                     if (o instanceof OMElement) {
                         OMElement elt = (OMElement) o;
-                        if (Constants.SEQUENCE_ELT.equals(elt.getQName())) {
+                        if (XMLConfigConstants.SEQUENCE_ELT.equals(elt.getQName())) {
                             String key = elt.getAttributeValue(
-                                new QName(Constants.NULL_NAMESPACE, "key"));
+                                new QName(XMLConfigConstants.NULL_NAMESPACE, "key"));
                             // this could be a sequence def or a mediator of the main sequence
                             if (key != null) {
                                 Mediator m = MediatorFactoryFinder.getInstance().getMediator(elt);
@@ -53,15 +53,15 @@
                             } else {
                                 defineSequence(config, elt);
                             }
-                        } else if (Constants.ENDPOINT_ELT.equals(elt.getQName())) {
+                        } else if (XMLConfigConstants.ENDPOINT_ELT.equals(elt.getQName())) {
                             defineEndpoint(config, elt);
-                        } else if (Constants.ENTRY_ELT.equals(elt.getQName())) {
+                        } else if (XMLConfigConstants.ENTRY_ELT.equals(elt.getQName())) {
                             defineEntry(config, elt);
-                        } else if (Constants.PROXY_ELT.equals(elt.getQName())) {
+                        } else if (XMLConfigConstants.PROXY_ELT.equals(elt.getQName())) {
                             defineProxy(config, elt);
-                        } else if (Constants.REGISTRY_ELT.equals(elt.getQName())) {
+                        } else if (XMLConfigConstants.REGISTRY_ELT.equals(elt.getQName())) {
                             defineRegistry(config, elt);
-                        } else if (Constants.STARTUP_ELT.equals(elt.getQName())) {
+                        } else if (XMLConfigConstants.STARTUP_ELT.equals(elt.getQName())) {
                             defineStartup(config, elt);
                         }  
                         else {
@@ -135,7 +135,7 @@
 
     public static void defineSequence(SynapseConfiguration config, OMElement ele) {
 
-        String name = ele.getAttributeValue(new QName(Constants.NULL_NAMESPACE, "name"));
+        String name = ele.getAttributeValue(new QName(XMLConfigConstants.NULL_NAMESPACE, "name"));
         if (name != null) {
             if (config.getLocalRegistry().get(name) != null) {
                 handleException("Duplicate sequence definition : " + name);
@@ -148,7 +148,7 @@
 
     public static void defineEndpoint(SynapseConfiguration config, OMElement ele) {
 
-        String name = ele.getAttributeValue(new QName(Constants.NULL_NAMESPACE, "name"));
+        String name = ele.getAttributeValue(new QName(XMLConfigConstants.NULL_NAMESPACE, "name"));
         if (name != null) {
             if (config.getLocalRegistry().get(name.trim()) != null) {
                 handleException("Duplicate endpoint definition : " + name);
@@ -169,9 +169,9 @@
      */
     private static void setDefaultMainSequence(SynapseConfiguration config) {
         SequenceMediator main = new SequenceMediator();
-        main.setName(org.apache.synapse.Constants.MAIN_SEQUENCE_KEY);
+        main.setName(org.apache.synapse.SynapseConstants.MAIN_SEQUENCE_KEY);
         main.addChild(new SendMediator());
-        config.addSequence(org.apache.synapse.Constants.MAIN_SEQUENCE_KEY, main);
+        config.addSequence(org.apache.synapse.SynapseConstants.MAIN_SEQUENCE_KEY, main);
     }
 
     /**
@@ -182,11 +182,11 @@
      */
     private static void setDefaultFaultSequence(SynapseConfiguration config) {
         SequenceMediator fault = new SequenceMediator();
-        fault.setName(org.apache.synapse.Constants.FAULT_SEQUENCE_KEY);
+        fault.setName(org.apache.synapse.SynapseConstants.FAULT_SEQUENCE_KEY);
         LogMediator log = new LogMediator();
         log.setLogLevel(LogMediator.FULL);
         fault.addChild(log);
-        config.addSequence(org.apache.synapse.Constants.FAULT_SEQUENCE_KEY, fault);
+        config.addSequence(org.apache.synapse.SynapseConstants.FAULT_SEQUENCE_KEY, fault);
     }
 
     private static void handleException(String msg) {
@@ -202,7 +202,7 @@
 	
 	public QName getTagQName() {
 		
-		return Constants.DEFINITIONS_ELT;
+		return XMLConfigConstants.DEFINITIONS_ELT;
 	}
 
 	public Class getSerializerClass() {

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SynapseXMLConfigurationSerializer.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SynapseXMLConfigurationSerializer.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SynapseXMLConfigurationSerializer.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/SynapseXMLConfigurationSerializer.java Wed Sep 19 02:09:01 2007
@@ -32,10 +32,10 @@
 	private static final OMFactory fac = OMAbstractFactory.getOMFactory();
 
 	private static final OMNamespace synNS = fac.createOMNamespace(
-			Constants.SYNAPSE_NAMESPACE, "syn");
+			XMLConfigConstants.SYNAPSE_NAMESPACE, "syn");
 
 	private static final OMNamespace nullNS = fac.createOMNamespace(
-			Constants.NULL_NAMESPACE, "");
+			XMLConfigConstants.NULL_NAMESPACE, "");
 
 	/**
 	 * order of entries is irrelavant, however its nice to have some order
@@ -145,7 +145,7 @@
 	}
 
 	public QName getTagQName() {
-		return Constants.DEFINITIONS_ELT;
+		return XMLConfigConstants.DEFINITIONS_ELT;
 	}
 
 }

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/ValidateMediatorFactory.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/ValidateMediatorFactory.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/ValidateMediatorFactory.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/ValidateMediatorFactory.java Wed Sep 19 02:09:01 2007
@@ -49,13 +49,13 @@
 
     private static final Log log = LogFactory.getLog(ValidateMediatorFactory.class);
 
-    private static final QName VALIDATE_Q = new QName(Constants.SYNAPSE_NAMESPACE, "validate");
-    private static final QName ON_FAIL_Q  = new QName(Constants.SYNAPSE_NAMESPACE, "on-fail");
-    private static final QName SCHEMA_Q   = new QName(Constants.SYNAPSE_NAMESPACE, "schema");
-    private static final QName KEY_Q      = new QName(Constants.NULL_NAMESPACE, "key");
-    private static final QName SOURCE_Q   = new QName(Constants.NULL_NAMESPACE, "source");
-    public static final QName ATT_NAME_Q  = new QName(Constants.NULL_NAMESPACE, "name");
-    public static final QName ATT_VALUE_Q = new QName(Constants.NULL_NAMESPACE, "value");
+    private static final QName VALIDATE_Q = new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "validate");
+    private static final QName ON_FAIL_Q  = new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "on-fail");
+    private static final QName SCHEMA_Q   = new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "schema");
+    private static final QName KEY_Q      = new QName(XMLConfigConstants.NULL_NAMESPACE, "key");
+    private static final QName SOURCE_Q   = new QName(XMLConfigConstants.NULL_NAMESPACE, "source");
+    public static final QName ATT_NAME_Q  = new QName(XMLConfigConstants.NULL_NAMESPACE, "name");
+    public static final QName ATT_VALUE_Q = new QName(XMLConfigConstants.NULL_NAMESPACE, "value");
 
     public Mediator createMediator(OMElement elem) {
 
@@ -117,7 +117,7 @@
         // set its common attributes such as tracing etc
         initMediator(validateMediator,elem);
         // set the features
-        Iterator iter = elem.getChildrenWithName(new QName(Constants.SYNAPSE_NAMESPACE, "feature"));
+        Iterator iter = elem.getChildrenWithName(new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "feature"));
         while (iter.hasNext()) {
             OMElement featureElem = (OMElement) iter.next();
             OMAttribute attName = featureElem.getAttribute(ATT_NAME_Q);

Copied: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/XMLConfigConstants.java (from r574820, webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/Constants.java)
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/XMLConfigConstants.java?p2=webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/XMLConfigConstants.java&p1=webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/Constants.java&r1=574820&r2=577213&rev=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/Constants.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/XMLConfigConstants.java Wed Sep 19 02:09:01 2007
@@ -19,119 +19,61 @@
 
 package org.apache.synapse.config.xml;
 
+import org.apache.synapse.SynapseConstants;
 import javax.xml.namespace.QName;
 
 /**
- * Constants used in the XML processing
+ * Constants used in the processing of XML configuration language
  */
-public interface Constants {
-	public static final QName DEFINITIONS_ELT = new QName(
-			Constants.SYNAPSE_NAMESPACE, "definitions");
+public class XMLConfigConstants {
 
-	public static final QName SEQUENCE_ELT = new QName(
-			Constants.SYNAPSE_NAMESPACE, "sequence");
+    // re-definition of the Synapse NS here to make things easier for the XML config lang code
+    public static final String SYNAPSE_NAMESPACE = SynapseConstants.SYNAPSE_NAMESPACE;
 
-	public static final QName ENDPOINT_ELT = new QName(
-			Constants.SYNAPSE_NAMESPACE, "endpoint");
+    //- Mediators -
+    //-- PropertyMediator --
+    /** The scope name for synapse message context properties */
+    public static final String SCOPE_DEFAULT = "default";
+    /** The scope name for axis2 message context properties */
+    public static final String SCOPE_AXIS2 = "axis2";
+    /** The scope name for transport header properties */
+    public static final String SCOPE_TRANSPORT = "transport";
+
+    //-- WS-RM sequence mediator --
+    /** WS-RM version 1.0*/
+    public static final String SEQUENCE_VERSION_1_0 = "1.0";
+    /** WS-RM version 1.1*/
+    public static final String SEQUENCE_VERSION_1_1 = "1.1";
+
+    //- configuration language constants -
+    public static final QName DEFINITIONS_ELT = new QName(SYNAPSE_NAMESPACE, "definitions");
+    public static final QName SEQUENCE_ELT    = new QName(SYNAPSE_NAMESPACE, "sequence");
+    public static final QName ENDPOINT_ELT    = new QName(SYNAPSE_NAMESPACE, "endpoint");
+    public static final QName ENTRY_ELT       = new QName(SYNAPSE_NAMESPACE, "localEntry");
+    public static final QName REGISTRY_ELT    = new QName(SYNAPSE_NAMESPACE, "registry");
+    public static final QName STARTUP_ELT     = new QName(SYNAPSE_NAMESPACE, "startup");
+    public static final QName PROXY_ELT       = new QName(SYNAPSE_NAMESPACE, "proxy");
+    public static final String NULL_NAMESPACE = "";
+    public static final Object QUARTZ_QNAME =
+        new QName("http://www.opensymphony.com/quartz/JobSchedulingData", "quartz");
 
-	public static final QName ENTRY_ELT = new QName(
-			Constants.SYNAPSE_NAMESPACE, "localEntry");
-
-	public static final QName REGISTRY_ELT = new QName(
-			Constants.SYNAPSE_NAMESPACE, "registry");
-
-	public static final QName STARTUP_ELT = new QName(
-			Constants.SYNAPSE_NAMESPACE, "startup");
-
-	public static final Object QUARTZ_QNAME = new QName("http://www.opensymphony.com/quartz/JobSchedulingData", "quartz");
-	
-	public static final QName PROXY_ELT = new QName(
-			Constants.SYNAPSE_NAMESPACE, "proxy");
-
-	public static final String SYNAPSE_NAMESPACE = org.apache.synapse.Constants.SYNAPSE_NAMESPACE;
-
-	public static final String NULL_NAMESPACE = "";
-
-	public static final String RAMPART_POLICY = "rampartPolicy";
-
-	public static final String SANDESHA_POLICY = "sandeshaPolicy";
-
-	/** The Trace attribute name */
+	/** The Trace attribute name, for proxy services, sequences */
 	public static final String TRACE_ATTRIB_NAME = "trace";
-
 	/** The Trace value 'enable' */
 	public static final String TRACE_ENABLE = "enable";
-
 	/** The Trace value 'disable' */
 	public static final String TRACE_DISABLE = "disable";
 
 	/** The statistics attribute name */
 	public static final String STATISTICS_ATTRIB_NAME = "statistics";
-
 	/** The statistics value 'enable' */
 	public static final String STATISTICS_ENABLE = "enable";
-
 	/** The statistics value 'disable' */
 	public static final String STATISTICS_DISABLE = "disable";
 
-	// -- variables for the scoping of a property mediator --
-	/** The String value for an Axis2 messagecontext property */
-	public static final String SCOPE_AXIS2 = org.apache.synapse.Constants.SCOPE_AXIS2;
-
-	/**
-	 * The scope for a set-property mediator, when the property should be set on
-	 * the underlying transport
-	 */
-	String SCOPE_TRANSPORT = org.apache.synapse.Constants.SCOPE_TRANSPORT;
-
-	// -- Synapse message context property keys --
-	/** The scope for the synapse message context properties */
-	String SCOPE_DEFAULT = org.apache.synapse.Constants.SCOPE_DEFAULT;
-
-	// -- Synapse property values for WS-RM sequence handling --
-	/** The String value for a WS-RM version 1.0 */
-	public static final String SEQUENCE_VERSION_1_0 = org.apache.synapse.Constants.SEQUENCE_VERSION_1_0;
-
-	/** The String value for a WS-RM version 1.1 */
-	public static final String SEQUENCE_VERSION_1_1 = org.apache.synapse.Constants.SEQUENCE_VERSION_1_1;
-
-	
-
-	// -- Synapse Send mediator releated constants -- //
-	String SEND_ELEMENT = "send";
-
-	String LOADBALANCE_ELEMENT = "loadbalance";
-
-	/** failover only element */
-	String FAILOVER_ELEMENT = "failover";
-
-	String SUSPEND_DURATION_ON_FAILURE = "suspendDurationOnFailure";
-
-	String MAXIMUM_RETRIES = "maximumRetries";
-
-	String RETRY_INTERVAL = "retryInterval";
-
-	/** failover attribute in the loadbalance element */
-	String FAILOVER = "failover";
-
-	String SESSION_AFFINITY = "sessionAffinity";
-
-	String ALGORITHM_NAME = "policy";
-
-	/** failover group element inside the loadbalance element */
-	String FAILOVER_GROUP_ELEMENT = "failover";
-
-	String DISPATCH_MANAGER = "DISPATCH_MANAGER";
-
-	String DISPATCHERS_ELEMENT = "dispatchers";
-
-	String DISPATCHER_ELEMENT = "dispatcher";
-
-	QName ATT_KEY_Q = new QName(NULL_NAMESPACE, "key");
-
-	QName ATT_ADDRESS_Q = new QName(NULL_NAMESPACE, "address");
-
-	String ONREJECT = "onReject";
+	public static final String SUSPEND_DURATION_ON_FAILURE = "suspendDurationOnFailure";
+	public static final String ALGORITHM_NAME = "policy";
 
-	String ONACCEPT = "onAccept";
+    public static final String ONREJECT = "onReject";
+	public static final String ONACCEPT = "onAccept";
 }

Propchange: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/XMLConfigConstants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/XMLConfigurationSerializer.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/XMLConfigurationSerializer.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/XMLConfigurationSerializer.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/XMLConfigurationSerializer.java Wed Sep 19 02:09:01 2007
@@ -47,8 +47,8 @@
     private static final Log log = LogFactory.getLog(XMLConfigurationSerializer.class);
 
     private static final OMFactory fac = OMAbstractFactory.getOMFactory();
-    private static final OMNamespace synNS = fac.createOMNamespace(Constants.SYNAPSE_NAMESPACE, "syn");
-    private static final OMNamespace nullNS = fac.createOMNamespace(Constants.NULL_NAMESPACE, "");
+    private static final OMNamespace synNS = fac.createOMNamespace(XMLConfigConstants.SYNAPSE_NAMESPACE, "syn");
+    private static final OMNamespace nullNS = fac.createOMNamespace(XMLConfigConstants.NULL_NAMESPACE, "");
 
     /**
      * order of entries is irrelavant, however its nice to have some order

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/XSLTMediatorFactory.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/XSLTMediatorFactory.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/XSLTMediatorFactory.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/XSLTMediatorFactory.java Wed Sep 19 02:09:01 2007
@@ -28,7 +28,7 @@
 import org.apache.synapse.config.xml.OMElementUtils;
 import org.apache.synapse.Mediator;
 import org.apache.synapse.mediators.transform.XSLTMediator;
-import org.apache.synapse.config.xml.Constants;
+import org.apache.synapse.config.xml.XMLConfigConstants;
 import org.apache.synapse.config.xml.AbstractMediatorFactory;
 import org.apache.synapse.config.xml.MediatorPropertyFactory;
 import org.jaxen.JaxenException;
@@ -48,9 +48,9 @@
 public class XSLTMediatorFactory extends AbstractMediatorFactory {
 
     private static final Log log = LogFactory.getLog(XSLTMediatorFactory.class);
-    private static final QName TAG_NAME    = new QName(Constants.SYNAPSE_NAMESPACE, "xslt");
-    public static final QName ATT_NAME_Q  = new QName(Constants.NULL_NAMESPACE, "name");
-    public static final QName ATT_VALUE_Q = new QName(Constants.NULL_NAMESPACE, "value");
+    private static final QName TAG_NAME    = new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "xslt");
+    public static final QName ATT_NAME_Q  = new QName(XMLConfigConstants.NULL_NAMESPACE, "name");
+    public static final QName ATT_VALUE_Q = new QName(XMLConfigConstants.NULL_NAMESPACE, "value");
 
 
     public QName getTagQName() {
@@ -61,8 +61,8 @@
 
         XSLTMediator transformMediator = new XSLTMediator();
 
-        OMAttribute attXslt   = elem.getAttribute(new QName(Constants.NULL_NAMESPACE, "key"));
-        OMAttribute attSource = elem.getAttribute(new QName(Constants.NULL_NAMESPACE, "source"));
+        OMAttribute attXslt   = elem.getAttribute(new QName(XMLConfigConstants.NULL_NAMESPACE, "key"));
+        OMAttribute attSource = elem.getAttribute(new QName(XMLConfigConstants.NULL_NAMESPACE, "source"));
 
         if (attXslt != null) {
             transformMediator.setXsltKey(attXslt.getAttributeValue());
@@ -86,7 +86,7 @@
         // set its common attributes such as tracing etc
         initMediator(transformMediator, elem);
         // set the features 
-        Iterator iter = elem.getChildrenWithName(new QName(Constants.SYNAPSE_NAMESPACE, "feature"));
+        Iterator iter = elem.getChildrenWithName(new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "feature"));
         while (iter.hasNext()) {
             OMElement featureElem = (OMElement) iter.next();
             OMAttribute attName = featureElem.getAttribute(ATT_NAME_Q);

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/AddressEndpointFactory.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/AddressEndpointFactory.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/AddressEndpointFactory.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/AddressEndpointFactory.java Wed Sep 19 02:09:01 2007
@@ -22,7 +22,7 @@
 import org.apache.synapse.endpoints.Endpoint;
 import org.apache.synapse.endpoints.AddressEndpoint;
 import org.apache.synapse.endpoints.utils.EndpointDefinition;
-import org.apache.synapse.Constants;
+import org.apache.synapse.SynapseConstants;
 import org.apache.synapse.SynapseException;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMAttribute;
@@ -68,7 +68,7 @@
 
         if (!anonymousEndpoint) {
             OMAttribute name = epConfig.getAttribute(new QName(
-                    org.apache.synapse.config.xml.Constants.NULL_NAMESPACE, "name"));
+                    org.apache.synapse.config.xml.XMLConfigConstants.NULL_NAMESPACE, "name"));
 
             if (name != null) {
                 addressEndpoint.setName(name.getAttributeValue());
@@ -76,7 +76,7 @@
         }
 
         OMElement addressElement = epConfig.getFirstChildWithName
-                (new QName(Constants.SYNAPSE_NAMESPACE, "address"));
+                (new QName(SynapseConstants.SYNAPSE_NAMESPACE, "address"));
 
         if (addressElement != null) {
             EndpointDefinition endpoint = createEndpointDefinition(addressElement);
@@ -84,8 +84,8 @@
 
             // set the suspend on fail duration.
             OMElement suspendElement = addressElement.getFirstChildWithName(new QName(
-                    Constants.SYNAPSE_NAMESPACE,
-                    org.apache.synapse.config.xml.Constants.SUSPEND_DURATION_ON_FAILURE));
+                    SynapseConstants.SYNAPSE_NAMESPACE,
+                    org.apache.synapse.config.xml.XMLConfigConstants.SUSPEND_DURATION_ON_FAILURE));
 
             if (suspendElement != null) {
                 String suspend = suspendElement.getText();
@@ -126,25 +126,25 @@
     public EndpointDefinition createEndpointDefinition(OMElement elem) {
 
         OMAttribute address = elem.getAttribute(new QName(
-                org.apache.synapse.config.xml.Constants.NULL_NAMESPACE, "uri"));
+                org.apache.synapse.config.xml.XMLConfigConstants.NULL_NAMESPACE, "uri"));
         OMAttribute format = elem.getAttribute(new QName(
-                org.apache.synapse.config.xml.Constants.NULL_NAMESPACE, "format"));
+                org.apache.synapse.config.xml.XMLConfigConstants.NULL_NAMESPACE, "format"));
         OMAttribute optimize = elem.getAttribute(new QName(
-                org.apache.synapse.config.xml.Constants.NULL_NAMESPACE, "optimize"));
+                org.apache.synapse.config.xml.XMLConfigConstants.NULL_NAMESPACE, "optimize"));
 
         EndpointDefinition endpoint = new EndpointDefinition();
         OMAttribute statistics = elem.getAttribute(
-                new QName(org.apache.synapse.config.xml.Constants.NULL_NAMESPACE,
-                        org.apache.synapse.config.xml.Constants.STATISTICS_ATTRIB_NAME));
+                new QName(org.apache.synapse.config.xml.XMLConfigConstants.NULL_NAMESPACE,
+                        org.apache.synapse.config.xml.XMLConfigConstants.STATISTICS_ATTRIB_NAME));
         if (statistics != null) {
             String statisticsValue = statistics.getAttributeValue();
             if (statisticsValue != null) {
-                if (org.apache.synapse.config.xml.Constants.STATISTICS_ENABLE.equals(
+                if (org.apache.synapse.config.xml.XMLConfigConstants.STATISTICS_ENABLE.equals(
                         statisticsValue)) {
-                    endpoint.setStatisticsEnable(org.apache.synapse.Constants.STATISTICS_ON);
-                } else if (org.apache.synapse.config.xml.Constants.STATISTICS_DISABLE.equals(
+                    endpoint.setStatisticsEnable(org.apache.synapse.SynapseConstants.STATISTICS_ON);
+                } else if (org.apache.synapse.config.xml.XMLConfigConstants.STATISTICS_DISABLE.equals(
                         statisticsValue)) {
-                    endpoint.setStatisticsEnable(org.apache.synapse.Constants.STATISTICS_OFF);
+                    endpoint.setStatisticsEnable(org.apache.synapse.SynapseConstants.STATISTICS_OFF);
                 }
             }
         }
@@ -176,7 +176,7 @@
         }
 
         OMElement wsAddr = elem.getFirstChildWithName(new QName(
-                org.apache.synapse.config.xml.Constants.SYNAPSE_NAMESPACE, "enableAddressing"));
+                org.apache.synapse.config.xml.XMLConfigConstants.SYNAPSE_NAMESPACE, "enableAddressing"));
         if (wsAddr != null) {
             endpoint.setAddressingOn(true);
             String useSepList = wsAddr.getAttributeValue(new QName(
@@ -189,31 +189,31 @@
             }
         }
         OMElement wsSec = elem.getFirstChildWithName(new QName(
-                org.apache.synapse.config.xml.Constants.SYNAPSE_NAMESPACE, "enableSec"));
+                org.apache.synapse.config.xml.XMLConfigConstants.SYNAPSE_NAMESPACE, "enableSec"));
         if (wsSec != null) {
             endpoint.setSecurityOn(true);
             OMAttribute policy = wsSec.getAttribute(new QName(
-                    org.apache.synapse.config.xml.Constants.NULL_NAMESPACE, "policy"));
+                    org.apache.synapse.config.xml.XMLConfigConstants.NULL_NAMESPACE, "policy"));
             if (policy != null) {
                 endpoint.setWsSecPolicyKey(policy.getAttributeValue());
             }
         }
         OMElement wsRm = elem.getFirstChildWithName(new QName(
-                org.apache.synapse.config.xml.Constants.SYNAPSE_NAMESPACE, "enableRM"));
+                org.apache.synapse.config.xml.XMLConfigConstants.SYNAPSE_NAMESPACE, "enableRM"));
         if (wsRm != null) {
             endpoint.setReliableMessagingOn(true);
             OMAttribute policy = wsRm.getAttribute(new QName(
-                    org.apache.synapse.config.xml.Constants.NULL_NAMESPACE, "policy"));
+                    org.apache.synapse.config.xml.XMLConfigConstants.NULL_NAMESPACE, "policy"));
             if (policy != null) {
                 endpoint.setWsRMPolicyKey(policy.getAttributeValue());
             }
         }
         // set the timeout configuration
         OMElement timeout = elem.getFirstChildWithName(new QName(
-                org.apache.synapse.config.xml.Constants.SYNAPSE_NAMESPACE, "timeout"));
+                org.apache.synapse.config.xml.XMLConfigConstants.SYNAPSE_NAMESPACE, "timeout"));
         if (timeout != null) {
             OMElement duration = timeout.getFirstChildWithName(new QName(
-                    org.apache.synapse.config.xml.Constants.SYNAPSE_NAMESPACE, "duration"));
+                    org.apache.synapse.config.xml.XMLConfigConstants.SYNAPSE_NAMESPACE, "duration"));
             if (duration != null) {
                 String d = duration.getText();
                 if (d != null) {
@@ -230,19 +230,19 @@
             }
 
             OMElement action = timeout.getFirstChildWithName(new QName(
-                    org.apache.synapse.config.xml.Constants.SYNAPSE_NAMESPACE, "action"));
+                    org.apache.synapse.config.xml.XMLConfigConstants.SYNAPSE_NAMESPACE, "action"));
             if (action != null) {
                 String a = action.getText();
                 if (a != null) {
                     if ((a.trim()).equalsIgnoreCase("discard")) {
-                        endpoint.setTimeoutAction(Constants.DISCARD);
+                        endpoint.setTimeoutAction(SynapseConstants.DISCARD);
 
                         // set timeout duration to 30 seconds, if it is not set explicitly
                         if (endpoint.getTimeoutDuration() == 0) {
                             endpoint.setTimeoutDuration(30000);
                         }
                     } else if ((a.trim()).equalsIgnoreCase("fault")) {
-                        endpoint.setTimeoutAction(Constants.DISCARD_AND_FAULT);
+                        endpoint.setTimeoutAction(SynapseConstants.DISCARD_AND_FAULT);
 
                         // set timeout duration to 30 seconds, if it is not set explicitly
                         if (endpoint.getTimeoutDuration() == 0) {

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/AddressEndpointSerializer.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/AddressEndpointSerializer.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/AddressEndpointSerializer.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/AddressEndpointSerializer.java Wed Sep 19 02:09:01 2007
@@ -25,7 +25,7 @@
 import org.apache.synapse.endpoints.Endpoint;
 import org.apache.synapse.endpoints.AddressEndpoint;
 import org.apache.synapse.SynapseException;
-import org.apache.synapse.Constants;
+import org.apache.synapse.SynapseConstants;
 import org.apache.synapse.endpoints.utils.EndpointDefinition;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -75,7 +75,7 @@
         }
 
         fac = OMAbstractFactory.getOMFactory();
-        OMElement endpointElement = fac.createOMElement("endpoint", Constants.SYNAPSE_OMNAMESPACE);
+        OMElement endpointElement = fac.createOMElement("endpoint", SynapseConstants.SYNAPSE_OMNAMESPACE);
 
         AddressEndpoint addressEndpoint = (AddressEndpoint) endpoint;
         String name = addressEndpoint.getName();
@@ -92,8 +92,8 @@
             // user has set some value for this. let's serialize it.
 
             OMElement suspendElement = fac.createOMElement(
-                    org.apache.synapse.config.xml.Constants.SUSPEND_DURATION_ON_FAILURE,
-                    Constants.SYNAPSE_OMNAMESPACE);
+                    org.apache.synapse.config.xml.XMLConfigConstants.SUSPEND_DURATION_ON_FAILURE,
+                    SynapseConstants.SYNAPSE_OMNAMESPACE);
 
             suspendElement.setText(Long.toString(suspendDuration / 1000));
             addressElement.addChild(suspendElement);
@@ -104,7 +104,7 @@
 
     public OMElement serializeEndpointDefinition(EndpointDefinition endpt) {
 
-        OMElement address = fac.createOMElement("address", Constants.SYNAPSE_OMNAMESPACE);
+        OMElement address = fac.createOMElement("address", SynapseConstants.SYNAPSE_OMNAMESPACE);
 
         if (endpt.isForcePOX()) {
             address.addAttribute(fac.createOMAttribute("format", null, "pox"));
@@ -125,17 +125,17 @@
 
         int isEnableStatistics = endpt.getStatisticsEnable();
         String statisticsValue = null;
-        if (isEnableStatistics == org.apache.synapse.Constants.STATISTICS_ON) {
-            statisticsValue = org.apache.synapse.config.xml.Constants.STATISTICS_ENABLE;
-        } else if (isEnableStatistics == org.apache.synapse.Constants.STATISTICS_OFF) {
-            statisticsValue = org.apache.synapse.config.xml.Constants.STATISTICS_DISABLE;
+        if (isEnableStatistics == org.apache.synapse.SynapseConstants.STATISTICS_ON) {
+            statisticsValue = org.apache.synapse.config.xml.XMLConfigConstants.STATISTICS_ENABLE;
+        } else if (isEnableStatistics == org.apache.synapse.SynapseConstants.STATISTICS_OFF) {
+            statisticsValue = org.apache.synapse.config.xml.XMLConfigConstants.STATISTICS_DISABLE;
         }
         if (statisticsValue != null) {
             address.addAttribute(fac.createOMAttribute(
-                    org.apache.synapse.config.xml.Constants.STATISTICS_ATTRIB_NAME, null, statisticsValue));
+                    org.apache.synapse.config.xml.XMLConfigConstants.STATISTICS_ATTRIB_NAME, null, statisticsValue));
         }
         if (endpt.isAddressingOn()) {
-            OMElement addressing = fac.createOMElement("enableAddressing", Constants.SYNAPSE_OMNAMESPACE);
+            OMElement addressing = fac.createOMElement("enableAddressing", SynapseConstants.SYNAPSE_OMNAMESPACE);
             if (endpt.isUseSeparateListener()) {
                 addressing.addAttribute(fac.createOMAttribute(
                         "separateListener", null, "true"));
@@ -144,7 +144,7 @@
         }
 
         if (endpt.isReliableMessagingOn()) {
-            OMElement rm = fac.createOMElement("enableRM", Constants.SYNAPSE_OMNAMESPACE);
+            OMElement rm = fac.createOMElement("enableRM", SynapseConstants.SYNAPSE_OMNAMESPACE);
             if (endpt.getWsRMPolicyKey() != null) {
                 rm.addAttribute(fac.createOMAttribute(
                         "policy", null, endpt.getWsRMPolicyKey()));
@@ -153,7 +153,7 @@
         }
 
         if (endpt.isSecurityOn()) {
-            OMElement sec = fac.createOMElement("enableSec", Constants.SYNAPSE_OMNAMESPACE);
+            OMElement sec = fac.createOMElement("enableSec", SynapseConstants.SYNAPSE_OMNAMESPACE);
             if (endpt.getWsSecPolicyKey() != null) {
                 sec.addAttribute(fac.createOMAttribute(
                         "policy", null, endpt.getWsSecPolicyKey()));
@@ -161,18 +161,18 @@
             address.addChild(sec);
         }
 
-        if (endpt.getTimeoutAction() != Constants.NONE) {
-            OMElement timeout = fac.createOMElement("timeout", Constants.SYNAPSE_OMNAMESPACE);
+        if (endpt.getTimeoutAction() != SynapseConstants.NONE) {
+            OMElement timeout = fac.createOMElement("timeout", SynapseConstants.SYNAPSE_OMNAMESPACE);
             address.addChild(timeout);
 
-            OMElement duration = fac.createOMElement("duration", Constants.SYNAPSE_OMNAMESPACE);
+            OMElement duration = fac.createOMElement("duration", SynapseConstants.SYNAPSE_OMNAMESPACE);
             duration.setText(Long.toString(endpt.getTimeoutDuration() / 1000));
             timeout.addChild(duration);
 
-            OMElement action = fac.createOMElement("action", Constants.SYNAPSE_OMNAMESPACE);
-            if (endpt.getTimeoutAction() == Constants.DISCARD) {
+            OMElement action = fac.createOMElement("action", SynapseConstants.SYNAPSE_OMNAMESPACE);
+            if (endpt.getTimeoutAction() == SynapseConstants.DISCARD) {
                 action.setText("discard");
-            } else if (endpt.getTimeoutAction() == Constants.DISCARD_AND_FAULT) {
+            } else if (endpt.getTimeoutAction() == SynapseConstants.DISCARD_AND_FAULT) {
                 action.setText("fault");
             }
             timeout.addChild(action);

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/EndpointAbstractFactory.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/EndpointAbstractFactory.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/EndpointAbstractFactory.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/EndpointAbstractFactory.java Wed Sep 19 02:09:01 2007
@@ -20,7 +20,7 @@
 package org.apache.synapse.config.xml.endpoints;
 
 import org.apache.axiom.om.OMElement;
-import org.apache.synapse.Constants;
+import org.apache.synapse.SynapseConstants;
 import org.apache.synapse.SynapseException;
 
 import javax.xml.namespace.QName;
@@ -46,24 +46,24 @@
         }
 
         OMElement addressElement = configElement.getFirstChildWithName
-                (new QName(Constants.SYNAPSE_NAMESPACE, "address"));
+                (new QName(SynapseConstants.SYNAPSE_NAMESPACE, "address"));
         if (addressElement != null) {
             EndpointFactory endpointFactory = AddressEndpointFactory.getInstance();
             return endpointFactory;
         }
 
         OMElement wsdlElement = configElement.getFirstChildWithName
-                (new QName(Constants.SYNAPSE_NAMESPACE, "wsdl"));
+                (new QName(SynapseConstants.SYNAPSE_NAMESPACE, "wsdl"));
         if (wsdlElement != null) {
             EndpointFactory endpointFactory = WSDLEndpointFactory.getInstance();
             return endpointFactory;
         }
 
         OMElement lbElement = configElement.getFirstChildWithName
-                (new QName(Constants.SYNAPSE_NAMESPACE, "loadbalance"));
+                (new QName(SynapseConstants.SYNAPSE_NAMESPACE, "loadbalance"));
         if (lbElement != null) {
             OMElement sessionElement = configElement.
-                    getFirstChildWithName(new QName(Constants.SYNAPSE_NAMESPACE, "session"));
+                    getFirstChildWithName(new QName(SynapseConstants.SYNAPSE_NAMESPACE, "session"));
             if (sessionElement != null) {
                 EndpointFactory endpointFactory = SALoadbalanceEndpointFactory.getInstance();
                 return endpointFactory;
@@ -74,7 +74,7 @@
         }
 
         OMElement foElement = configElement.getFirstChildWithName
-                (new QName(Constants.SYNAPSE_NAMESPACE, "failover"));
+                (new QName(SynapseConstants.SYNAPSE_NAMESPACE, "failover"));
         if (foElement != null) {
             EndpointFactory endpointFactory = FailoverEndpointFactory.getInstance();
             return endpointFactory;

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/FailoverEndpointFactory.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/FailoverEndpointFactory.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/FailoverEndpointFactory.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/FailoverEndpointFactory.java Wed Sep 19 02:09:01 2007
@@ -22,7 +22,7 @@
 import org.apache.synapse.endpoints.Endpoint;
 import org.apache.synapse.endpoints.FailoverEndpoint;
 import org.apache.synapse.SynapseException;
-import org.apache.synapse.Constants;
+import org.apache.synapse.SynapseConstants;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMNode;
 import org.apache.commons.logging.Log;
@@ -56,7 +56,7 @@
     public Endpoint createEndpoint(OMElement epConfig, boolean anonymousEndpoint) {
 
         OMElement failoverElement = epConfig.getFirstChildWithName
-                (new QName(Constants.SYNAPSE_NAMESPACE, "failover"));
+                (new QName(SynapseConstants.SYNAPSE_NAMESPACE, "failover"));
         if (failoverElement != null) {
 
             FailoverEndpoint failoverEndpoint = new FailoverEndpoint();
@@ -90,7 +90,7 @@
 
         ArrayList endpoints = new ArrayList();
         Iterator iter = failoverElement.getChildrenWithName
-                (org.apache.synapse.config.xml.Constants.ENDPOINT_ELT);
+                (org.apache.synapse.config.xml.XMLConfigConstants.ENDPOINT_ELT);
         while (iter.hasNext()) {
 
             OMElement endptElem = (OMElement) iter.next();

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/FailoverEndpointSerializer.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/FailoverEndpointSerializer.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/FailoverEndpointSerializer.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/FailoverEndpointSerializer.java Wed Sep 19 02:09:01 2007
@@ -25,9 +25,8 @@
 import org.apache.synapse.endpoints.Endpoint;
 import org.apache.synapse.endpoints.FailoverEndpoint;
 import org.apache.synapse.SynapseException;
-import org.apache.synapse.Constants;
+import org.apache.synapse.SynapseConstants;
 
-import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -52,9 +51,9 @@
         FailoverEndpoint failoverEndpoint = (FailoverEndpoint) endpoint;
 
         fac = OMAbstractFactory.getOMFactory();
-        OMElement endpointElement = fac.createOMElement("endpoint", Constants.SYNAPSE_OMNAMESPACE);
+        OMElement endpointElement = fac.createOMElement("endpoint", SynapseConstants.SYNAPSE_OMNAMESPACE);
 
-        OMElement failoverElement = fac.createOMElement("failover", Constants.SYNAPSE_OMNAMESPACE);
+        OMElement failoverElement = fac.createOMElement("failover", SynapseConstants.SYNAPSE_OMNAMESPACE);
         endpointElement.addChild(failoverElement);
 
         String name = failoverEndpoint.getName();

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/IndirectEndpointSerializer.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/IndirectEndpointSerializer.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/IndirectEndpointSerializer.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/IndirectEndpointSerializer.java Wed Sep 19 02:09:01 2007
@@ -25,7 +25,7 @@
 import org.apache.synapse.endpoints.Endpoint;
 import org.apache.synapse.endpoints.IndirectEndpoint;
 import org.apache.synapse.SynapseException;
-import org.apache.synapse.Constants;
+import org.apache.synapse.SynapseConstants;
 
 /**
  * Serializes an IndirectEndpoint to an XML configuration.
@@ -43,7 +43,7 @@
         }
 
         fac = OMAbstractFactory.getOMFactory();
-        OMElement endpointElement = fac.createOMElement("endpoint", Constants.SYNAPSE_OMNAMESPACE);
+        OMElement endpointElement = fac.createOMElement("endpoint", SynapseConstants.SYNAPSE_OMNAMESPACE);
 
         IndirectEndpoint indirectEndpoint = (IndirectEndpoint) endpoint;
         String ref = indirectEndpoint.getKey();

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/LoadbalanceEndpointFactory.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/LoadbalanceEndpointFactory.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/LoadbalanceEndpointFactory.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/LoadbalanceEndpointFactory.java Wed Sep 19 02:09:01 2007
@@ -23,7 +23,7 @@
 import org.apache.synapse.endpoints.LoadbalanceEndpoint;
 import org.apache.synapse.endpoints.algorithms.LoadbalanceAlgorithm;
 import org.apache.synapse.SynapseException;
-import org.apache.synapse.Constants;
+import org.apache.synapse.SynapseConstants;
 import org.apache.synapse.config.xml.endpoints.utils.LoadbalanceAlgorithmFactory;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMNode;
@@ -62,7 +62,7 @@
 
         OMElement loadbalanceElement =  null;
         loadbalanceElement = epConfig.getFirstChildWithName
-                (new QName(Constants.SYNAPSE_NAMESPACE, "loadbalance"));
+                (new QName(SynapseConstants.SYNAPSE_NAMESPACE, "loadbalance"));
 
         if(loadbalanceElement != null) {
 
@@ -70,7 +70,7 @@
 
             // set endpoint name
             OMAttribute name = epConfig.getAttribute(new QName(
-                    org.apache.synapse.config.xml.Constants.NULL_NAMESPACE, "name"));
+                    org.apache.synapse.config.xml.XMLConfigConstants.NULL_NAMESPACE, "name"));
 
             if (name != null) {
                 loadbalanceEndpoint.setName(name.getAttributeValue());
@@ -110,7 +110,7 @@
 
         ArrayList endpoints = new ArrayList();
         Iterator iter = loadbalanceElement.getChildrenWithName
-                (org.apache.synapse.config.xml.Constants.ENDPOINT_ELT);
+                (org.apache.synapse.config.xml.XMLConfigConstants.ENDPOINT_ELT);
         while (iter.hasNext()) {
 
             OMElement endptElem = (OMElement) iter.next();

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/LoadbalanceEndpointSerializer.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/LoadbalanceEndpointSerializer.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/LoadbalanceEndpointSerializer.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/LoadbalanceEndpointSerializer.java Wed Sep 19 02:09:01 2007
@@ -27,9 +27,8 @@
 import org.apache.synapse.endpoints.algorithms.LoadbalanceAlgorithm;
 import org.apache.synapse.endpoints.algorithms.RoundRobin;
 import org.apache.synapse.SynapseException;
-import org.apache.synapse.Constants;
+import org.apache.synapse.SynapseConstants;
 
-import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -52,7 +51,7 @@
         }
 
         fac = OMAbstractFactory.getOMFactory();
-        OMElement endpointElement = fac.createOMElement("endpoint", Constants.SYNAPSE_OMNAMESPACE);
+        OMElement endpointElement = fac.createOMElement("endpoint", SynapseConstants.SYNAPSE_OMNAMESPACE);
 
         LoadbalanceEndpoint loadbalanceEndpoint = (LoadbalanceEndpoint) endpoint;
 
@@ -61,7 +60,7 @@
             endpointElement.addAttribute("name", name, null);
         }
 
-        OMElement loadbalanceElement = fac.createOMElement("loadbalance", Constants.SYNAPSE_OMNAMESPACE);
+        OMElement loadbalanceElement = fac.createOMElement("loadbalance", SynapseConstants.SYNAPSE_OMNAMESPACE);
         endpointElement.addChild(loadbalanceElement);
 
         LoadbalanceAlgorithm algorithm = loadbalanceEndpoint.getAlgorithm();
@@ -70,7 +69,7 @@
              algorithmName = "roundRobin";
         }
         loadbalanceElement.addAttribute
-                (org.apache.synapse.config.xml.Constants.ALGORITHM_NAME, algorithmName, null);
+                (org.apache.synapse.config.xml.XMLConfigConstants.ALGORITHM_NAME, algorithmName, null);
 
         // set if failover is turned off in the endpoint
         if (!loadbalanceEndpoint.isFailover()) {

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/SALoadbalanceEndpointFactory.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/SALoadbalanceEndpointFactory.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/SALoadbalanceEndpointFactory.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/SALoadbalanceEndpointFactory.java Wed Sep 19 02:09:01 2007
@@ -22,14 +22,13 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.synapse.endpoints.Endpoint;
-import org.apache.synapse.endpoints.LoadbalanceEndpoint;
 import org.apache.synapse.endpoints.SALoadbalanceEndpoint;
 import org.apache.synapse.endpoints.dispatch.Dispatcher;
 import org.apache.synapse.endpoints.dispatch.SoapSessionDispatcher;
 import org.apache.synapse.endpoints.dispatch.SimpleClientSessionDispatcher;
 import org.apache.synapse.endpoints.dispatch.HttpSessionDispatcher;
 import org.apache.synapse.endpoints.algorithms.LoadbalanceAlgorithm;
-import org.apache.synapse.Constants;
+import org.apache.synapse.SynapseConstants;
 import org.apache.synapse.SynapseException;
 import org.apache.synapse.config.xml.endpoints.utils.LoadbalanceAlgorithmFactory;
 import org.apache.axiom.om.OMElement;
@@ -69,7 +68,7 @@
 
         // get the session for this endpoint
         OMElement sessionElement = epConfig.
-                getFirstChildWithName(new QName(Constants.SYNAPSE_NAMESPACE, "session"));
+                getFirstChildWithName(new QName(SynapseConstants.SYNAPSE_NAMESPACE, "session"));
         if (sessionElement != null) {
 
             String type = sessionElement.getAttributeValue(new QName("type"));
@@ -92,7 +91,7 @@
 
         // set endpoint name
         OMAttribute name = epConfig.getAttribute(new QName(
-                org.apache.synapse.config.xml.Constants.NULL_NAMESPACE, "name"));
+                org.apache.synapse.config.xml.XMLConfigConstants.NULL_NAMESPACE, "name"));
 
         if (name != null) {
             loadbalanceEndpoint.setName(name.getAttributeValue());
@@ -100,7 +99,7 @@
 
         OMElement loadbalanceElement =  null;
         loadbalanceElement = epConfig.getFirstChildWithName
-                (new QName(Constants.SYNAPSE_NAMESPACE, "loadbalance"));
+                (new QName(SynapseConstants.SYNAPSE_NAMESPACE, "loadbalance"));
 
         if(loadbalanceElement != null) {
 
@@ -160,7 +159,7 @@
 
         ArrayList endpoints = new ArrayList();
         Iterator iter = loadbalanceElement.getChildrenWithName
-                (org.apache.synapse.config.xml.Constants.ENDPOINT_ELT);
+                (org.apache.synapse.config.xml.XMLConfigConstants.ENDPOINT_ELT);
         while (iter.hasNext()) {
 
             OMElement endptElem = (OMElement) iter.next();

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/SALoadbalanceEndpointSerializer.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/SALoadbalanceEndpointSerializer.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/SALoadbalanceEndpointSerializer.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/SALoadbalanceEndpointSerializer.java Wed Sep 19 02:09:01 2007
@@ -31,12 +31,10 @@
 import org.apache.synapse.endpoints.algorithms.LoadbalanceAlgorithm;
 import org.apache.synapse.endpoints.algorithms.RoundRobin;
 import org.apache.synapse.SynapseException;
-import org.apache.synapse.Constants;
+import org.apache.synapse.SynapseConstants;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
 import java.util.List;
 
 public class SALoadbalanceEndpointSerializer implements EndpointSerializer {
@@ -55,7 +53,7 @@
         SALoadbalanceEndpoint loadbalanceEndpoint = (SALoadbalanceEndpoint) endpoint;
 
         fac = OMAbstractFactory.getOMFactory();
-        OMElement endpointElement = fac.createOMElement("endpoint", Constants.SYNAPSE_OMNAMESPACE);
+        OMElement endpointElement = fac.createOMElement("endpoint", SynapseConstants.SYNAPSE_OMNAMESPACE);
 
         String name = loadbalanceEndpoint.getName();
         if (name != null) {
@@ -65,22 +63,22 @@
         Dispatcher dispatcher = loadbalanceEndpoint.getDispatcher();
 
         if (dispatcher instanceof SoapSessionDispatcher) {
-            OMElement sessionElement = fac.createOMElement("session", Constants.SYNAPSE_OMNAMESPACE);
+            OMElement sessionElement = fac.createOMElement("session", SynapseConstants.SYNAPSE_OMNAMESPACE);
             sessionElement.addAttribute("type", "soap", null);
             endpointElement.addChild(sessionElement);
 
         } else if (dispatcher instanceof HttpSessionDispatcher) {
-            OMElement sessionElement = fac.createOMElement("session", Constants.SYNAPSE_OMNAMESPACE);
+            OMElement sessionElement = fac.createOMElement("session", SynapseConstants.SYNAPSE_OMNAMESPACE);
             sessionElement.addAttribute("type", "http", null);
             endpointElement.addChild(sessionElement);
 
         } else if (dispatcher instanceof SimpleClientSessionDispatcher) {
-            OMElement sessionElement = fac.createOMElement("session", Constants.SYNAPSE_OMNAMESPACE);
+            OMElement sessionElement = fac.createOMElement("session", SynapseConstants.SYNAPSE_OMNAMESPACE);
             sessionElement.addAttribute("type", "simpleClientSession", null);
             endpointElement.addChild(sessionElement);
         }
 
-        OMElement loadbalanceElement = fac.createOMElement("loadbalance", Constants.SYNAPSE_OMNAMESPACE);
+        OMElement loadbalanceElement = fac.createOMElement("loadbalance", SynapseConstants.SYNAPSE_OMNAMESPACE);
         endpointElement.addChild(loadbalanceElement);
 
         LoadbalanceAlgorithm algorithm = loadbalanceEndpoint.getAlgorithm();

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/WSDLEndpointFactory.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/WSDLEndpointFactory.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/WSDLEndpointFactory.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/WSDLEndpointFactory.java Wed Sep 19 02:09:01 2007
@@ -21,26 +21,20 @@
 
 import org.apache.synapse.endpoints.Endpoint;
 import org.apache.synapse.endpoints.WSDLEndpoint;
-import org.apache.synapse.Constants;
+import org.apache.synapse.SynapseConstants;
 import org.apache.synapse.SynapseException;
 import org.apache.synapse.endpoints.utils.EndpointDefinition;
 import org.apache.synapse.config.xml.endpoints.utils.WSDL11EndpointBuilder;
-import org.apache.synapse.config.xml.endpoints.utils.WSDL20EndpointBuilder;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMAttribute;
 import org.apache.axiom.om.OMNode;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.axis2.description.WSDL2Constants;
 import org.apache.synapse.config.Util;
 
 import javax.xml.namespace.QName;
 import java.net.URL;
-import java.net.URLConnection;
-import java.io.InputStream;
-import java.io.IOException;
 
 /**
  * Creates an WSDL based endpoint from a XML configuration.
@@ -79,7 +73,7 @@
 
         if (!anonymousEndpoint) {
             OMAttribute name = epConfig.getAttribute(new QName(
-                    org.apache.synapse.config.xml.Constants.NULL_NAMESPACE, "name"));
+                    org.apache.synapse.config.xml.XMLConfigConstants.NULL_NAMESPACE, "name"));
 
             if (name != null) {
                 wsdlEndpoint.setName(name.getAttributeValue());
@@ -87,14 +81,14 @@
         }
 
         OMElement wsdlElement = epConfig.getFirstChildWithName
-                (new QName(Constants.SYNAPSE_NAMESPACE, "wsdl"));
+                (new QName(SynapseConstants.SYNAPSE_NAMESPACE, "wsdl"));
 
         if (wsdlElement != null) {
 
             // set the suspend on fail duration.
             OMElement suspendElement = wsdlElement.getFirstChildWithName(new QName(
-                    Constants.SYNAPSE_NAMESPACE,
-                    org.apache.synapse.config.xml.Constants.SUSPEND_DURATION_ON_FAILURE));
+                    SynapseConstants.SYNAPSE_NAMESPACE,
+                    org.apache.synapse.config.xml.XMLConfigConstants.SUSPEND_DURATION_ON_FAILURE));
 
             if (suspendElement != null) {
                 String suspend = suspendElement.getText();
@@ -115,14 +109,14 @@
             // get the service name and port name. at this point we should not worry about the presence
             // of those parameters. they are handled by corresponding WSDL builders.
             String serviceName = wsdlElement.getAttributeValue
-                    (new QName(org.apache.synapse.config.xml.Constants.NULL_NAMESPACE,"service"));
+                    (new QName(org.apache.synapse.config.xml.XMLConfigConstants.NULL_NAMESPACE,"service"));
 
             String portName = wsdlElement.getAttributeValue
-                    (new QName(org.apache.synapse.config.xml.Constants.NULL_NAMESPACE,"port"));
+                    (new QName(org.apache.synapse.config.xml.XMLConfigConstants.NULL_NAMESPACE,"port"));
 
             // check if wsdl is supplied as a URI
             String wsdlURI = wsdlElement.getAttributeValue
-                    (new QName(org.apache.synapse.config.xml.Constants.NULL_NAMESPACE,"uri"));
+                    (new QName(org.apache.synapse.config.xml.XMLConfigConstants.NULL_NAMESPACE,"uri"));
 
             // set serviceName and portName in the endpoint. it does not matter if these are
             // null at this point. we are setting them only for serialization purpose.
@@ -174,17 +168,17 @@
                 // for now, QOS information has to be provided explicitly.
                 extractQOSInformation(endpoint, wsdlElement);
                 OMAttribute statistics = epConfig.getAttribute(
-                        new QName(org.apache.synapse.config.xml.Constants.NULL_NAMESPACE,
-                                org.apache.synapse.config.xml.Constants.STATISTICS_ATTRIB_NAME));
+                        new QName(org.apache.synapse.config.xml.XMLConfigConstants.NULL_NAMESPACE,
+                                org.apache.synapse.config.xml.XMLConfigConstants.STATISTICS_ATTRIB_NAME));
                 if (statistics != null) {
                     String statisticsValue = statistics.getAttributeValue();
                     if (statisticsValue != null) {
-                        if (org.apache.synapse.config.xml.Constants.STATISTICS_ENABLE.equals(
+                        if (org.apache.synapse.config.xml.XMLConfigConstants.STATISTICS_ENABLE.equals(
                                 statisticsValue)) {
-                            endpoint.setStatisticsEnable(org.apache.synapse.Constants.STATISTICS_ON);
-                        } else if (org.apache.synapse.config.xml.Constants.STATISTICS_DISABLE.equals(
+                            endpoint.setStatisticsEnable(org.apache.synapse.SynapseConstants.STATISTICS_ON);
+                        } else if (org.apache.synapse.config.xml.XMLConfigConstants.STATISTICS_DISABLE.equals(
                                 statisticsValue)) {
-                            endpoint.setStatisticsEnable(org.apache.synapse.Constants.STATISTICS_OFF);
+                            endpoint.setStatisticsEnable(org.apache.synapse.SynapseConstants.STATISTICS_OFF);
                         }
                     }
                 }
@@ -210,9 +204,9 @@
     private void extractQOSInformation(EndpointDefinition endpointDefinition, OMElement wsdlElement) {
 
         OMAttribute format = wsdlElement.getAttribute(new QName(
-                org.apache.synapse.config.xml.Constants.NULL_NAMESPACE, "format"));
+                org.apache.synapse.config.xml.XMLConfigConstants.NULL_NAMESPACE, "format"));
         OMAttribute optimize = wsdlElement.getAttribute(new QName(
-                org.apache.synapse.config.xml.Constants.NULL_NAMESPACE, "optimize"));
+                org.apache.synapse.config.xml.XMLConfigConstants.NULL_NAMESPACE, "optimize"));
 
         if (format != null)
         {
@@ -236,7 +230,7 @@
         }
 
         OMElement wsAddr = wsdlElement.getFirstChildWithName(new QName(
-                org.apache.synapse.config.xml.Constants.SYNAPSE_NAMESPACE, "enableAddressing"));
+                org.apache.synapse.config.xml.XMLConfigConstants.SYNAPSE_NAMESPACE, "enableAddressing"));
         if (wsAddr != null) {
             endpointDefinition.setAddressingOn(true);
             String useSepList = wsAddr.getAttributeValue(new QName(
@@ -250,21 +244,21 @@
         }
 
         OMElement wsSec = wsdlElement.getFirstChildWithName(new QName(
-                org.apache.synapse.config.xml.Constants.SYNAPSE_NAMESPACE, "enableSec"));
+                org.apache.synapse.config.xml.XMLConfigConstants.SYNAPSE_NAMESPACE, "enableSec"));
         if (wsSec != null) {
             endpointDefinition.setSecurityOn(true);
             OMAttribute policy = wsSec.getAttribute(new QName(
-                    org.apache.synapse.config.xml.Constants.NULL_NAMESPACE, "policy"));
+                    org.apache.synapse.config.xml.XMLConfigConstants.NULL_NAMESPACE, "policy"));
             if (policy != null) {
                 endpointDefinition.setWsSecPolicyKey(policy.getAttributeValue());
             }
         }
         OMElement wsRm = wsdlElement.getFirstChildWithName(new QName(
-                org.apache.synapse.config.xml.Constants.SYNAPSE_NAMESPACE, "enableRM"));
+                org.apache.synapse.config.xml.XMLConfigConstants.SYNAPSE_NAMESPACE, "enableRM"));
         if (wsRm != null) {
             endpointDefinition.setReliableMessagingOn(true);
             OMAttribute policy = wsRm.getAttribute(new QName(
-                    org.apache.synapse.config.xml.Constants.NULL_NAMESPACE, "policy"));
+                    org.apache.synapse.config.xml.XMLConfigConstants.NULL_NAMESPACE, "policy"));
             if (policy != null) {
                 endpointDefinition.setWsRMPolicyKey(policy.getAttributeValue());
             }
@@ -272,10 +266,10 @@
 
         // set the timeout configuration
         OMElement timeout = wsdlElement.getFirstChildWithName(new QName(
-                org.apache.synapse.config.xml.Constants.SYNAPSE_NAMESPACE, "timeout"));
+                org.apache.synapse.config.xml.XMLConfigConstants.SYNAPSE_NAMESPACE, "timeout"));
         if (timeout != null) {
             OMElement duration = timeout.getFirstChildWithName(new QName(
-                    org.apache.synapse.config.xml.Constants.SYNAPSE_NAMESPACE, "duration"));
+                    org.apache.synapse.config.xml.XMLConfigConstants.SYNAPSE_NAMESPACE, "duration"));
             if (duration != null) {
                 String d = duration.getText();
                 if (d != null) {
@@ -285,19 +279,19 @@
             }
 
             OMElement action = timeout.getFirstChildWithName(new QName(
-                    org.apache.synapse.config.xml.Constants.SYNAPSE_NAMESPACE, "action"));
+                    org.apache.synapse.config.xml.XMLConfigConstants.SYNAPSE_NAMESPACE, "action"));
             if (action != null) {
                 String a = action.getText();
                 if (a != null) {
                     if ((a.trim()).equalsIgnoreCase("discard")) {
-                        endpointDefinition.setTimeoutAction(Constants.DISCARD);
+                        endpointDefinition.setTimeoutAction(SynapseConstants.DISCARD);
 
                         // set timeout duration to 30 seconds, if it is not set explicitly
                         if (endpointDefinition.getTimeoutDuration() == 0) {
                             endpointDefinition.setTimeoutDuration(30000);
                         }
                     } else if ((a.trim()).equalsIgnoreCase("fault")) {
-                        endpointDefinition.setTimeoutAction(Constants.DISCARD_AND_FAULT);
+                        endpointDefinition.setTimeoutAction(SynapseConstants.DISCARD_AND_FAULT);
 
                         // set timeout duration to 30 seconds, if it is not set explicitly
                         if (endpointDefinition.getTimeoutDuration() == 0) {

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/WSDLEndpointSerializer.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/WSDLEndpointSerializer.java?rev=577213&r1=577212&r2=577213&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/WSDLEndpointSerializer.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/WSDLEndpointSerializer.java Wed Sep 19 02:09:01 2007
@@ -25,7 +25,7 @@
 import org.apache.synapse.endpoints.Endpoint;
 import org.apache.synapse.endpoints.WSDLEndpoint;
 import org.apache.synapse.SynapseException;
-import org.apache.synapse.Constants;
+import org.apache.synapse.SynapseConstants;
 import org.apache.synapse.endpoints.utils.EndpointDefinition;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -53,7 +53,7 @@
         }
 
         fac = OMAbstractFactory.getOMFactory();
-        OMElement endpointElement = fac.createOMElement("endpoint", Constants.SYNAPSE_OMNAMESPACE);
+        OMElement endpointElement = fac.createOMElement("endpoint", SynapseConstants.SYNAPSE_OMNAMESPACE);
 
         WSDLEndpoint wsdlEndpoint = (WSDLEndpoint) endpoint;
         String name = wsdlEndpoint.getName();
@@ -61,7 +61,7 @@
             endpointElement.addAttribute("name", name, null);
         }
 
-        OMElement wsdlElement = fac.createOMElement("wsdl", Constants.SYNAPSE_OMNAMESPACE);
+        OMElement wsdlElement = fac.createOMElement("wsdl", SynapseConstants.SYNAPSE_OMNAMESPACE);
         String serviceName = wsdlEndpoint.getServiceName();
         if (serviceName != null) {
             wsdlElement.addAttribute("service", serviceName, null);
@@ -87,8 +87,8 @@
             // user has set some value for this. let's serialize it.
 
             OMElement suspendElement = fac.createOMElement(
-                    org.apache.synapse.config.xml.Constants.SUSPEND_DURATION_ON_FAILURE,
-                    Constants.SYNAPSE_OMNAMESPACE);
+                    org.apache.synapse.config.xml.XMLConfigConstants.SUSPEND_DURATION_ON_FAILURE,
+                    SynapseConstants.SYNAPSE_OMNAMESPACE);
 
             suspendElement.setText(Long.toString(suspendDuration / 1000));
             wsdlElement.addChild(suspendElement);
@@ -116,17 +116,17 @@
 
         int isEnableStatistics = endpointDefinition.getStatisticsEnable();
         String statisticsValue = null;
-        if (isEnableStatistics == org.apache.synapse.Constants.STATISTICS_ON) {
-            statisticsValue = org.apache.synapse.config.xml.Constants.STATISTICS_ENABLE;
-        } else if (isEnableStatistics == org.apache.synapse.Constants.STATISTICS_OFF) {
-            statisticsValue = org.apache.synapse.config.xml.Constants.STATISTICS_DISABLE;
+        if (isEnableStatistics == org.apache.synapse.SynapseConstants.STATISTICS_ON) {
+            statisticsValue = org.apache.synapse.config.xml.XMLConfigConstants.STATISTICS_ENABLE;
+        } else if (isEnableStatistics == org.apache.synapse.SynapseConstants.STATISTICS_OFF) {
+            statisticsValue = org.apache.synapse.config.xml.XMLConfigConstants.STATISTICS_DISABLE;
         }
         if (statisticsValue != null) {
             wsdlElement.addAttribute(fac.createOMAttribute(
-                    org.apache.synapse.config.xml.Constants.STATISTICS_ATTRIB_NAME, null, statisticsValue));
+                    org.apache.synapse.config.xml.XMLConfigConstants.STATISTICS_ATTRIB_NAME, null, statisticsValue));
         }
         if (endpointDefinition.isAddressingOn()) {
-            OMElement addressing = fac.createOMElement("enableAddressing", Constants.SYNAPSE_OMNAMESPACE);
+            OMElement addressing = fac.createOMElement("enableAddressing", SynapseConstants.SYNAPSE_OMNAMESPACE);
             if (endpointDefinition.isUseSeparateListener()) {
                 addressing.addAttribute(fac.createOMAttribute(
                         "separateListener", null, "true"));
@@ -135,7 +135,7 @@
         }
 
         if (endpointDefinition.isReliableMessagingOn()) {
-            OMElement rm = fac.createOMElement("enableRM", Constants.SYNAPSE_OMNAMESPACE);
+            OMElement rm = fac.createOMElement("enableRM", SynapseConstants.SYNAPSE_OMNAMESPACE);
             if (endpointDefinition.getWsRMPolicyKey() != null) {
                 rm.addAttribute(fac.createOMAttribute(
                         "policy", null, endpointDefinition.getWsRMPolicyKey()));
@@ -144,7 +144,7 @@
         }
 
         if (endpointDefinition.isSecurityOn()) {
-            OMElement sec = fac.createOMElement("enableSec", Constants.SYNAPSE_OMNAMESPACE);
+            OMElement sec = fac.createOMElement("enableSec", SynapseConstants.SYNAPSE_OMNAMESPACE);
             if (endpointDefinition.getWsSecPolicyKey() != null) {
                 sec.addAttribute(fac.createOMAttribute(
                         "policy", null, endpointDefinition.getWsSecPolicyKey()));
@@ -152,18 +152,18 @@
             wsdlElement.addChild(sec);
         }
 
-        if (endpointDefinition.getTimeoutAction() != Constants.NONE) {
-            OMElement timeout = fac.createOMElement("timeout", Constants.SYNAPSE_OMNAMESPACE);
+        if (endpointDefinition.getTimeoutAction() != SynapseConstants.NONE) {
+            OMElement timeout = fac.createOMElement("timeout", SynapseConstants.SYNAPSE_OMNAMESPACE);
             wsdlElement.addChild(timeout);
 
-            OMElement duration = fac.createOMElement("duration", Constants.SYNAPSE_OMNAMESPACE);
+            OMElement duration = fac.createOMElement("duration", SynapseConstants.SYNAPSE_OMNAMESPACE);
             duration.setText(Long.toString(endpointDefinition.getTimeoutDuration() / 1000));
             timeout.addChild(duration);
 
-            OMElement action = fac.createOMElement("action", Constants.SYNAPSE_OMNAMESPACE);
-            if (endpointDefinition.getTimeoutAction() == Constants.DISCARD) {
+            OMElement action = fac.createOMElement("action", SynapseConstants.SYNAPSE_OMNAMESPACE);
+            if (endpointDefinition.getTimeoutAction() == SynapseConstants.DISCARD) {
                 action.setText("discard");
-            } else if (endpointDefinition.getTimeoutAction() == Constants.DISCARD_AND_FAULT) {
+            } else if (endpointDefinition.getTimeoutAction() == SynapseConstants.DISCARD_AND_FAULT) {
                 action.setText("fault");
             }
             timeout.addChild(action);



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


Mime
View raw message