[prev in list] [next in list] [prev in thread] [next in thread] 

List:       axis-dev
Subject:    svn commit: r149210 -
From:       deepal () apache ! org
Date:       2005-01-31 3:47:13
Message-ID: 20050131034713.72002.qmail () minotaur ! apache ! org
[Download RAW message or body]

Author: deepal
Date: Sun Jan 30 19:47:12 2005
New Revision: 149210

URL: http://svn.apache.org/viewcvs?view=rev&rev=149210
Log:
throw an exeption if service.xml or module.xml not found

Modified:
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/repository/utill/UnZipJAR.java


Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/repository/utill/UnZipJAR.java
                
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/ \
src/java/org/apache/axis/deployment/repository/utill/UnZipJAR.java?view=diff&r1=149209&r2=149210
 ==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/repository/utill/UnZipJAR.java \
                (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/repository/utill/UnZipJAR.java \
Sun Jan 30 19:47:12 2005 @@ -39,6 +39,7 @@
      */
     public void unzipService(String filename, DeploymentEngine engine, AxisService \
service) throws DeploymentException {  // get attribute values
+        boolean foundServiceXML = false;
         String strArchive = filename;
         ZipInputStream zin;
         try {
@@ -46,6 +47,7 @@
             ZipEntry entry;
             while ((entry = zin.getNextEntry()) != null) {
                 if (entry.getName().equals(SERVICEXML)) {
+                    foundServiceXML = true;
                     DeploymentParser schme = new DeploymentParser(zin, engine, \
filename);  schme.parseServiceXML(service);
                     break;
@@ -53,6 +55,9 @@
             }
             //  zin.closeEntry();
             zin.close();
+            if(! foundServiceXML){
+              throw new DeploymentException("service.xml not found");
+            }
         } catch (Exception e) {
            throw new DeploymentException(e.getMessage());
         }
@@ -60,6 +65,7 @@
 
     public void unzipModule(String filename, DeploymentEngine engine,AxisModule \
module) throws DeploymentException {  // get attribute values
+        boolean foundmoduleXML = false;
         String strArchive = filename;
         ZipInputStream zin;
         try {
@@ -67,6 +73,7 @@
             ZipEntry entry;
             while ((entry = zin.getNextEntry()) != null) {
                 if (entry.getName().equals(MODULEXML)) {
+                    foundmoduleXML = true;
                     DeploymentParser schme = new DeploymentParser(zin, engine, \
filename);  schme.procesModuleXML(module);
                     break;
@@ -74,6 +81,9 @@
             }
             //  zin.closeEntry();
             zin.close();
+            if(! foundmoduleXML){
+              throw new DeploymentException("module.xml not found");
+            }
         } catch (Exception e) {
             throw new DeploymentException(e.getMessage());
         }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic