FileDocCategorySizeDatePackage
WebServiceNode.javaAPI DocGlassfish v2 API5309Fri May 04 22:31:38 BST 2007com.sun.enterprise.deployment.node

WebServiceNode

public class WebServiceNode extends DisplayableComponentNode
This node is responsible for loading web services reference information
author
Kenneth Saks

Fields Summary
private static final XMLElement
tag
Constructors Summary
public WebServiceNode()


      
        super();
        registerElementHandler
            (new XMLElement(WebServicesTagNames.PORT_COMPONENT),
             WebServiceEndpointNode.class);
    
Methods Summary
protected voidInit()
initilizer method after instance creation

    
public voidaddDescriptor(java.lang.Object descriptor)
Adds a new DOL descriptor instance to the descriptor instance associated with this XMLNode

param
descriptor the new descriptor

    
        WebServiceEndpoint endpoint = (WebServiceEndpoint) descriptor;
        WebService webService = (WebService) getDescriptor();
        webService.addEndpoint(endpoint);
    
protected java.util.MapgetDispatchTable()
all sub-implementation of this class can use a dispatch table to map xml element to method name on the descriptor class for setting the element value.

return
map with the element name as a key, the setter method as a value

        Map table = super.getDispatchTable();
        table.put(WebServicesTagNames.WEB_SERVICE_DESCRIPTION_NAME, 
                  "setName");
        table.put(WebServicesTagNames.WSDL_FILE, "setWsdlFileUri");
        table.put(WebServicesTagNames.JAXRPC_MAPPING_FILE, "setMappingFileUri");
        return table;
    
protected XMLElementgetXMLRootTag()

return
the XML tag associated with this XMLNode

        return tag;
    
public org.w3c.dom.NodewriteDescriptor(org.w3c.dom.Node parent, java.lang.String nodeName, com.sun.enterprise.deployment.WebService descriptor)
write the method descriptor class to a query-method DOM tree and return it

param
parent node in the DOM tree
param
node name for the root element of this xml fragment
param
the descriptor to write
return
the DOM tree top node

        
        Node topNode = 
            super.writeDescriptor(parent, nodeName, descriptor);

        writeDisplayableComponentInfo(topNode, descriptor);

        appendTextChild(topNode, 
                        WebServicesTagNames.WEB_SERVICE_DESCRIPTION_NAME,
                        descriptor.getName());
        appendTextChild(topNode, WebServicesTagNames.WSDL_FILE,
                        descriptor.getWsdlFileUri());
        appendTextChild(topNode, WebServicesTagNames.JAXRPC_MAPPING_FILE,
                        descriptor.getMappingFileUri());
        
        WebServiceEndpointNode endpointNode = new WebServiceEndpointNode();
        for(WebServiceEndpoint next : descriptor.getEndpoints()) {
            endpointNode.writeDescriptor
                (topNode, WebServicesTagNames.PORT_COMPONENT, next);
        }

        return topNode;