use of com.sun.enterprise.deployment.WebServicesDescriptor in project Payara by payara.
the class ServletNode method writeDescriptor.
/**
* write the descriptor class to a DOM tree and return it
*
* @param parent node for the DOM tree
* @param nodeName node name
* @param descriptor the descriptor to write
* @return the DOM tree top node
*/
@Override
public Node writeDescriptor(Node parent, String nodeName, WebComponentDescriptor descriptor) {
WebServicesDescriptor webServices = descriptor.getWebBundleDescriptor().getWebServices();
// or the servlet is exposed as a web service
if ((descriptor.getRunAsIdentity() != null) || webServices.hasEndpointsImplementedBy(descriptor)) {
Node servletNode = appendChild(parent, nodeName);
appendTextChild(servletNode, RuntimeTagNames.SERVLET_NAME, descriptor.getCanonicalName());
if (descriptor.getRunAsIdentity() != null) {
appendTextChild(servletNode, RuntimeTagNames.PRINCIPAL_NAME, descriptor.getRunAsIdentity().getPrincipal());
}
WebServiceEndpointRuntimeNode wsRuntime = new WebServiceEndpointRuntimeNode();
wsRuntime.writeWebServiceEndpointInfo(servletNode, descriptor);
return servletNode;
}
return null;
}
Aggregations