Search in sources :

Example 1 with InjectionTargetNode

use of com.sun.enterprise.deployment.node.InjectionTargetNode in project Payara by payara.

the class ServiceReferenceNode method writeDeploymentDescriptor.

public Node writeDeploymentDescriptor(Node parent, ServiceReferenceDescriptor descriptor) {
    Node serviceRefNode = super.writeDescriptor(parent, WebServicesTagNames.SERVICE_REF, descriptor);
    writeDisplayableComponentInfo(serviceRefNode, descriptor);
    appendTextChild(serviceRefNode, WebServicesTagNames.SERVICE_REF_NAME, descriptor.getName());
    appendTextChild(serviceRefNode, WebServicesTagNames.SERVICE_INTERFACE, descriptor.getServiceInterface());
    appendTextChild(serviceRefNode, TagNames.LOOKUP_NAME, descriptor.getLookupName());
    appendTextChild(serviceRefNode, WebServicesTagNames.SERVICE_REF_TYPE, descriptor.getInjectionTargetType());
    appendTextChild(serviceRefNode, WebServicesTagNames.WSDL_FILE, descriptor.getWsdlFileUri());
    appendTextChild(serviceRefNode, WebServicesTagNames.JAXRPC_MAPPING_FILE, descriptor.getMappingFileUri());
    if (descriptor.hasServiceName()) {
        QName serviceName = descriptor.getServiceName();
        appendQNameChild(WebServicesTagNames.SERVICE_QNAME, serviceRefNode, serviceName.getNamespaceURI(), serviceName.getLocalPart(), descriptor.getServiceNameNamespacePrefix());
    }
    for (Iterator iter = descriptor.getPortsInfo().iterator(); iter.hasNext(); ) {
        ServiceRefPortInfo next = (ServiceRefPortInfo) iter.next();
        String sei = next.getServiceEndpointInterface();
        Node portComponentRefNode = appendChild(serviceRefNode, WebServicesTagNames.PORT_COMPONENT_REF);
        appendTextChild(portComponentRefNode, WebServicesTagNames.SERVICE_ENDPOINT_INTERFACE, sei);
        appendTextChild(portComponentRefNode, WebServicesTagNames.ENABLE_MTOM, next.getMtomEnabled());
        if (descriptor.getAddressing() != null) {
            AddressingNode adNode = new AddressingNode();
            adNode.writeDescriptor(portComponentRefNode, WebServicesTagNames.ADDRESSING, descriptor.getAddressing());
        }
        appendTextChild(portComponentRefNode, WebServicesTagNames.PORT_COMPONENT_LINK, next.getPortComponentLinkName());
    }
    WebServiceHandlerNode handlerNode = new WebServiceHandlerNode();
    handlerNode.writeWebServiceHandlers(serviceRefNode, descriptor.getHandlers());
    WebServiceHandlerChainNode handlerChainNode = new WebServiceHandlerChainNode();
    handlerChainNode.writeWebServiceHandlerChains(serviceRefNode, descriptor.getHandlerChain());
    appendTextChild(serviceRefNode, WebServicesTagNames.MAPPED_NAME, descriptor.getMappedName());
    if (descriptor.isInjectable()) {
        InjectionTargetNode ijNode = new InjectionTargetNode();
        for (InjectionTarget target : descriptor.getInjectionTargets()) {
            ijNode.writeDescriptor(serviceRefNode, TagNames.INJECTION_TARGET, target);
        }
    }
    return serviceRefNode;
}
Also used : InjectionTargetNode(com.sun.enterprise.deployment.node.InjectionTargetNode) QName(javax.xml.namespace.QName) JndiEnvRefNode(com.sun.enterprise.deployment.node.JndiEnvRefNode) InjectionTargetNode(com.sun.enterprise.deployment.node.InjectionTargetNode) Node(org.w3c.dom.Node) DisplayableComponentNode(com.sun.enterprise.deployment.node.DisplayableComponentNode) Iterator(java.util.Iterator) InjectionTarget(com.sun.enterprise.deployment.InjectionTarget) ServiceRefPortInfo(com.sun.enterprise.deployment.ServiceRefPortInfo)

Aggregations

InjectionTarget (com.sun.enterprise.deployment.InjectionTarget)1 ServiceRefPortInfo (com.sun.enterprise.deployment.ServiceRefPortInfo)1 DisplayableComponentNode (com.sun.enterprise.deployment.node.DisplayableComponentNode)1 InjectionTargetNode (com.sun.enterprise.deployment.node.InjectionTargetNode)1 JndiEnvRefNode (com.sun.enterprise.deployment.node.JndiEnvRefNode)1 Iterator (java.util.Iterator)1 QName (javax.xml.namespace.QName)1 Node (org.w3c.dom.Node)1