axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r547041 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: context/ConfigurationContext.java deployment/util/Utils.java description/java2wsdl/DefaultSchemaGenerator.java
Date Wed, 13 Jun 2007 21:47:54 GMT
Author: deepal
Date: Wed Jun 13 14:47:53 2007
New Revision: 547041

URL: http://svn.apache.org/viewvc?view=rev&rev=547041
Log:
fixing AXIS2-2780
- We should not generate schema for AxisFault

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java?view=diff&rev=547041&r1=547040&r2=547041
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
Wed Jun 13 14:47:53 2007
@@ -529,8 +529,32 @@
         if (listenerManager != null) {
             listenerManager.stop();
         }
+        cleanupTemp();
     }
 
+    /**
+     * This include all the major changes we have done from 1.2
+     * release to 1.3 release. This will include API changes , class
+     * deprecating etc etc.
+     */
+    private void cleanupTemp(){
+        File tempFile =  (File)axisConfiguration.getParameterValue(
+                Constants.Configuration.ARTIFACTS_TEMP_DIR);
+        if(tempFile==null){
+            tempFile = new File(System.getProperty("java.io.tmpdir"), "_axis2");
+        }
+        deleteTempFiles(tempFile);
+    }
+
+    private void deleteTempFiles(File dir) {
+        if (dir.isDirectory()) {
+            String[] children = dir.list();
+            for (int i=0; i<children.length; i++) {
+                deleteTempFiles(new File(dir, children[i]));
+            }
+        }
+        dir.delete();
+    }
 
     public String getServiceContextPath() {
         if (cachedServicePath == null) {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java?view=diff&rev=547041&r1=547040&r2=547041
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
Wed Jun 13 14:47:53 2007
@@ -167,8 +167,9 @@
         int count;
         File f;
         if(tmpDir == null) {
-        new File(System.getProperty("java.io.tmpdir")).mkdirs();
-            f = File.createTempFile("axis2", suffix);
+            new File(System.getProperty("java.io.tmpdir"), "_axis2").mkdirs();
+            File tempFile = new File(System.getProperty("java.io.tmpdir"), "_axis2");
+            f = File.createTempFile("axis2", suffix,tempFile);
         } else {
             f = File.createTempFile("axis2", suffix, tmpDir);
         }
@@ -367,8 +368,11 @@
                 if (jmethod.getExceptionTypes().length > 0) {
                     JClass[] extypes = jmethod.getExceptionTypes() ;
                     for (int j= 0 ; j < extypes.length ; j++) {
-                        AxisMessage faultMessage = new AxisMessage();
                         JClass extype = extypes[j] ;
+                        if(AxisFault.class.getName().equals(extype.getQualifiedName())){
+                            continue;
+                        }
+                        AxisMessage faultMessage = new AxisMessage();
                         String exname = extype.getSimpleName() ;
                         if(extypes.length>1){
                             faultMessage.setName(jmethod.getSimpleName() + "Fault" + j);
@@ -421,8 +425,11 @@
         if (jmethod.getExceptionTypes().length > 0) {
             JClass[] extypes = jmethod.getExceptionTypes() ;
             for (int j= 0 ; j < extypes.length ; j++) {
-                AxisMessage faultMessage = new AxisMessage();
                 JClass extype = extypes[j] ;
+                if(AxisFault.class.getName().equals(extype.getQualifiedName())){
+                    continue;
+                }
+                AxisMessage faultMessage = new AxisMessage();
                 String exname = extype.getSimpleName() ;
                 if(extypes.length >1){
                     faultMessage.setName(jmethod.getSimpleName() + "Fault" + j);

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?view=diff&rev=547041&r1=547040&r2=547041
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
Wed Jun 13 14:47:53 2007
@@ -17,6 +17,7 @@
 import org.apache.axis2.description.java2wsdl.TypeTable;
 import org.apache.axis2.description.java2wsdl.AnnotationConstants;
 import org.apache.axis2.description.java2wsdl.Java2WSDLConstants;
+import org.apache.axis2.AxisFault;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.codehaus.jam.JAnnotation;
@@ -250,6 +251,9 @@
                 JClass[] extypes = jMethod.getExceptionTypes() ;
                 for (int j= 0 ; j < extypes.length ; j++) {
                     JClass extype = extypes[j] ;
+                    if(AxisFault.class.getName().equals(extype.getQualifiedName())){
+                        continue;
+                    }
                     methodSchemaType = createSchemaTypeForMethodPart(extype.getSimpleName()+
"Fault");
                     sequence = new XmlSchemaSequence();
                     generateSchemaForType(sequence, extype, extype.getSimpleName());
@@ -569,6 +573,9 @@
         }
         if (isArrayType) {
             type = type.getArrayComponentType();
+        }
+        if(AxisFault.class.getName().equals(type)){
+            return null;
         }
         String classTypeName;
         if (type == 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