axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r412067 - in /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context: ConfigurationContext.java ConfigurationContextFactory.java
Date Tue, 06 Jun 2006 10:29:00 GMT
Author: deepal
Date: Tue Jun  6 03:28:57 2006
New Revision: 412067

URL: http://svn.apache.org/viewvc?rev=412067&view=rev
Log:
- small fix in context path problem

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java?rev=412067&r1=412066&r2=412067&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java
Tue Jun  6 03:28:57 2006
@@ -60,7 +60,7 @@
     //To specify url mapping for services
     private String servicePath = "services";
     //To have your own context path
-    private String contextPath = "/axis2";
+    private String contextPath = "axis2";
 
     public ConfigurationContext(AxisConfiguration axisConfiguration) {
         super(null);
@@ -374,12 +374,19 @@
         return servicePath;
     }
 
-    public void setServicePath(String servicePath) {
+    public void setServicePath(String servicePath) throws AxisFault {
+        if (servicePath == null || "".equals(servicePath)) {
+            throw new AxisFault("service path can not be null");
+        }
         this.servicePath = servicePath;
     }
 
     public String getContextPath() {
-        return contextPath + "/" + servicePath;
+        if (contextPath != null && !"".equals(contextPath)) {
+            return "/" + contextPath + "/" + servicePath;
+        } else {
+            return "/" + servicePath;
+        }
     }
 
     public void setContextPath(String contextPath) {

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java?rev=412067&r1=412066&r2=412067&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java
Tue Jun  6 03:28:57 2006
@@ -57,7 +57,7 @@
         }
     }
 
-    private static void setContextPath(AxisConfiguration axisConfig, ConfigurationContext
configContext) {
+    private static void setContextPath(AxisConfiguration axisConfig, ConfigurationContext
configContext)  throws AxisFault{
         // Checking for context path
         Parameter servicePath = axisConfig.getParameter(Constants.SERVICE_PATH);
         if (servicePath != null) {



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


Mime
View raw message