Result result = getInitializedResult();
ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
boolean pass = true;
try {
javax.xml.namespace.QName wsdlport = descriptor.getWsdlPort();
// check to see that wsdl-port is specified in the service endpoint.
if ( wsdlport != null) {
// get the local part
String localpart = wsdlport.getLocalPart();
// String namespaceuri = wsdlport.getNamespaceURI();
if ( localpart == null || localpart.equals("") ) {
// Error: localpart is not specified
pass = false;
}
//if ( namespaceuri == null || namespaceuri.equals("")) {
//pass = false;
//}
} else {
// Error: wsdl-port is missing for this endpoint
pass = false;
}
if (pass) {
result.addGoodDetails(smh.getLocalString ("tests.componentNameConstructor",
"For [ {0} ]", new Object[] {compName.toString()}));
result.passed(smh.getLocalString (getClass().getName() + ".passed",
"The wsdl-port in the webservices.xml file for [{0}] is specified for the endpoint",
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 wsdl-port in the webservices.xml file for [{0}] is not correctly specified for the endpoint",
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;