* @exception XDocletException
* @doc.tag type="content"
*/
public String serviceEndpoint(Properties props) throws XDocletException
{
XClass clazz = getCurrentClass();
String pkg = PackageTagsHandler.getPackageNameFor(clazz.getContainingPackage(), true);
XTag ejbTag = null;
String spec = null;
if (clazz.getDoc().hasTag("ejb.bean")) {
ejbTag = clazz.getDoc().getTag("ejb.interface");
if (ejbTag != null) {
spec = ejbTag.getAttributeValue("service-endpoint-class");
}
// if we haven't explicitly defined a service interface name, try to build the default name.
if (spec == null || "".equals(spec)) {
spec = pkg + "." + clazz.getName();
if (spec.endsWith("Bean"))
spec = spec.substring(0, spec.length() - 4);
}
}
else {
ejbTag = clazz.getDoc().getTag("web.servlet");
if (ejbTag != null) {
spec = ejbTag.getAttributeValue("service-endpoint-class");
}
if (spec == null || "".equals(spec)) {
spec = pkg + "." + clazz.getName();
spec += "Service";
}
}
return spec;