You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by de...@apache.org on 2005/01/31 04:47:13 UTC
svn commit: r149210 -
webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/deployment/repository/utill/UnZipJAR.java
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());
}