Result result = getInitializedResult();
ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
// boolean pass = true;
// File f = Verifier.getArchiveFile(descriptor.getBundleDescriptor().
// getModuleDescriptor().getArchiveUri());
// JarFile jarFile = null;
InputStream deploymentEntry=null;
// wsdl file
String wsdlUri = descriptor.getWebService().getWsdlFileUri();
try {
// if (f == null) {
String uri = getAbstractArchiveUri(descriptor);
// try {
FileArchive arch = new FileArchive();
arch.open(uri);
deploymentEntry = arch.getEntry(wsdlUri);
// }catch (IOException e) { throw e;}
// }
// else {
//
// jarFile = new JarFile(f);
// ZipEntry deploymentEntry1 =
// jarFile.getEntry(wsdlUri);
// deploymentEntry = jarFile.getInputStream(deploymentEntry1);
// }
if (deploymentEntry == null) {
//result.fail,
result.addErrorDetails(smh.getLocalString ("tests.componentNameConstructor",
"For [ {0} ]", new Object[] {compName.toString()}));
result.failed(smh.getLocalString (getClass().getName() + ".failed",
"WSDL file does not exist in the archive at uri [{0}].",
new Object[] {wsdlUri}));
// pass = false;
}
else {
//result.pass
result.addGoodDetails(smh.getLocalString ("tests.componentNameConstructor",
"For [ {0} ]", new Object[] {compName.toString()}));
result.passed(smh.getLocalString (getClass().getName() + ".passed",
"WSDL file exists in the archive at uri [{0}].",
new Object[] {wsdlUri}));
}
}catch (Exception e) {
// result.fail
result.addErrorDetails(smh.getLocalString
("com.sun.enterprise.tools.verifier.tests.webservices.Error",
"Error: Unexpected error occurred [ {0} ]",
new Object[] {e.getMessage()}));
// pass = false;
}
finally {
try {
if (deploymentEntry != null)
deploymentEntry.close();
}catch(IOException e) {}
}
return result;