Search in sources :

Example 6 with WebServicesDescriptor

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;
}
Also used : WebServicesDescriptor(com.sun.enterprise.deployment.WebServicesDescriptor) WebServiceEndpointRuntimeNode(com.sun.enterprise.deployment.node.runtime.WebServiceEndpointRuntimeNode) WebServiceEndpointRuntimeNode(com.sun.enterprise.deployment.node.runtime.WebServiceEndpointRuntimeNode) Node(org.w3c.dom.Node) DeploymentDescriptorNode(com.sun.enterprise.deployment.node.DeploymentDescriptorNode)

Aggregations

WebServicesDescriptor (com.sun.enterprise.deployment.WebServicesDescriptor)6 WebComponentDescriptor (com.sun.enterprise.deployment.WebComponentDescriptor)3 BundleDescriptor (com.sun.enterprise.deployment.BundleDescriptor)2 WebBundleDescriptor (com.sun.enterprise.deployment.WebBundleDescriptor)2 WebService (com.sun.enterprise.deployment.WebService)2 WebServiceEndpoint (com.sun.enterprise.deployment.WebServiceEndpoint)2 ComponentEnvManager (com.sun.enterprise.container.common.spi.util.ComponentEnvManager)1 EjbBundleDescriptor (com.sun.enterprise.deployment.EjbBundleDescriptor)1 EjbDescriptor (com.sun.enterprise.deployment.EjbDescriptor)1 JndiNameEnvironment (com.sun.enterprise.deployment.JndiNameEnvironment)1 EjbContext (com.sun.enterprise.deployment.annotation.context.EjbContext)1 EjbsContext (com.sun.enterprise.deployment.annotation.context.EjbsContext)1 WebBundleContext (com.sun.enterprise.deployment.annotation.context.WebBundleContext)1 WebComponentContext (com.sun.enterprise.deployment.annotation.context.WebComponentContext)1 DeploymentDescriptorNode (com.sun.enterprise.deployment.node.DeploymentDescriptorNode)1 WebServiceEndpointRuntimeNode (com.sun.enterprise.deployment.node.runtime.WebServiceEndpointRuntimeNode)1 SystemHandlerDelegate (com.sun.xml.rpc.spi.runtime.SystemHandlerDelegate)1 AnnotatedElement (java.lang.reflect.AnnotatedElement)1 MalformedURLException (java.net.MalformedURLException)1 URL (java.net.URL)1