axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r231409 - in /webservices/axis/trunk/java/modules/core/src/org/apache/axis2: deployment/repository/util/ArchiveReader.java description/ServiceDescription.java
Date Thu, 11 Aug 2005 06:56:26 GMT
Author: deepal
Date: Wed Aug 10 23:56:05 2005
New Revision: 231409

URL: http://svn.apache.org/viewcvs?rev=231409&view=rev
Log:
fixing Axis2 137

Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java?rev=231409&r1=231408&r2=231409&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
Wed Aug 10 23:56:05 2005
@@ -200,6 +200,11 @@
                     repository.mkdirs();
                     modules = new File(repository, "modules");
                     modules.mkdirs();
+                } else {
+                    modules = new File(repository, "modules");
+                    if(!modules.exists()){
+                        modules.mkdirs();
+                    }
                 }
             } else {
                 modules = new File(axis2repository, "modules");
@@ -212,15 +217,12 @@
             modulearchiveFile = new File(modules, modulearchiveName);
             if (modulearchiveFile.exists()) {
                 return modulearchiveFile;
-            } else {
-                modulearchiveFile.createNewFile();
             }
-            FileOutputStream dest = new
-                    FileOutputStream(modulearchiveFile);
-            ZipOutputStream out = new ZipOutputStream(new
-                    BufferedOutputStream(dest));
-            byte data[] = new byte[BUFFER];
-
+//
+//            else {
+//                modulearchiveFile.createNewFile();
+//            }
+//
             ClassLoader cl = Thread.currentThread().getContextClassLoader();
             InputStream in = cl.getResourceAsStream("modules/" + moduleName + ".mar");
             if (in == null) {
@@ -228,20 +230,28 @@
             }
             if (in == null) {
                 throw new DeploymentException(moduleName + " module is not found");
-            }
-            ZipInputStream zin = null;
-            zin = new ZipInputStream(in);
-            ZipEntry entry;
-            while ((entry = zin.getNextEntry()) != null) {
-                ZipEntry zip = new ZipEntry(entry);
-                out.putNextEntry(zip);
-                int count;
-                while ((count = zin.read(data, 0, BUFFER)) != -1) {
-                    out.write(data, 0, count);
+            } else {
+                modulearchiveFile.createNewFile();
+                FileOutputStream dest = new
+                        FileOutputStream(modulearchiveFile);
+                ZipOutputStream out = new ZipOutputStream(new
+                        BufferedOutputStream(dest));
+                byte data[] = new byte[BUFFER];
+                ZipInputStream zin = null;
+                zin = new ZipInputStream(in);
+                ZipEntry entry;
+                while ((entry = zin.getNextEntry()) != null) {
+                    ZipEntry zip = new ZipEntry(entry);
+                    out.putNextEntry(zip);
+                    int count;
+                    while ((count = zin.read(data, 0, BUFFER)) != -1) {
+                        out.write(data, 0, count);
+                    }
                 }
+                out.close();
+                zin.close();
             }
-            out.close();
-            zin.close();
+
         } catch (Exception e) {
             throw new DeploymentException(e);
         }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java?rev=231409&r1=231408&r2=231409&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java
Wed Aug 10 23:56:05 2005
@@ -18,7 +18,6 @@
 import com.ibm.wsdl.extensions.soap.SOAPAddressImpl;
 import com.ibm.wsdl.extensions.soap.SOAPConstants;
 import org.apache.axis2.AxisFault;
-import org.apache.axis2.Constants;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.ServiceContext;
 import org.apache.axis2.engine.AxisConfiguration;



Mime
View raw message