Result result = getInitializedResult();
ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
boolean pass = true;
String portcomponentname = null;
try {
portcomponentname = descriptor.getEndpointName();
if ( portcomponentname == null )
pass = false;
if ( portcomponentname.equals("") )
pass = false;
if (pass) {
result.addGoodDetails(smh.getLocalString ("tests.componentNameConstructor",
"For [ {0} ]", new Object[] {compName.toString()}));
result.passed(smh.getLocalString (getClass().getName() + ".passed",
"The webservices.xml file for [ {0} ] has the port-component-name element specified.",
new Object[] {compName.toString()}));
}
else {
result.addErrorDetails(smh.getLocalString ("tests.componentNameConstructor",
"For [ {0} ]", new Object[] {compName.toString()}));
result.failed(smh.getLocalString (getClass().getName() + ".failed",
"The webservices.xml file for [ {0} ] does not have the port-component-name element specified.",
new Object[] {compName.toString()}));
}
}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()}));
}
return result;