}
final String endpointClassName = classInfo.name().toString();
final JBossWebMetaData jbossWebMD = getJBossWebMetaData(unit);
if (jbossWebMD != null) {
final JAXWSDeployment jaxwsDeployment = getJaxwsDeployment(unit);
boolean found = false;
for (final ServletMetaData servletMD : getServlets(jbossWebMD)) {
if (endpointClassName.equals(getEndpointClassName(servletMD))) {
found = true;
// creating component description for POJO endpoint
final String endpointName = getEndpointName(servletMD);
final ComponentDescription pojoComponent = createComponentDescription(unit, endpointName, endpointClassName, endpointName);
final ServiceName pojoViewName = registerView(pojoComponent, endpointClassName);
// register POJO endpoint
final String urlPattern = getUrlPattern(endpointName, unit);
jaxwsDeployment.addEndpoint(new POJOEndpoint(endpointName, endpointClassName, pojoViewName, urlPattern));
}
}
if (!found) {
// JSR 109, version 1.3 final spec, section 5.3.2.1 javax.jws.WebService annotation
final ComponentDescription pojoComponent = createComponentDescription(unit, endpointClassName, endpointClassName, endpointClassName);
final ServiceName pojoViewName = registerView(pojoComponent, endpointClassName);
// register POJO endpoint
final String urlPattern = getUrlPattern(classInfo);
jaxwsDeployment.addEndpoint(new POJOEndpoint(endpointClassName, pojoViewName, urlPattern));
}
}
}