WebServiceEndpointNodepublic class WebServiceEndpointNode extends DisplayableComponentNode This node handles the web service endpoint definition |
Fields Summary |
---|
private static final XMLElement | tag |
Constructors Summary |
---|
public WebServiceEndpointNode()Creates a new instance of WebServiceEndpointNode
super();
registerElementHandler
(new XMLElement(WebServicesTagNames.HANDLER),
WebServiceHandlerNode.class, "addHandler");
registerElementHandler
(new XMLElement(WebServicesTagNames.HANDLER_CHAIN),
WebServiceHandlerChainNode.class, "addHandlerChain");
|
Methods Summary |
---|
protected java.util.Map | getDispatchTable()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.
Map table = super.getDispatchTable();
table.put(WebServicesTagNames.PORT_COMPONENT_NAME, "setEndpointName");
table.put(WebServicesTagNames.SERVICE_ENDPOINT_INTERFACE,
"setServiceEndpointInterface");
table.put(WebServicesTagNames.PROTOCOL_BINDING, "setProtocolBinding");
table.put(WebServicesTagNames.ENABLE_MTOM, "setMtomEnabled");
return table;
| protected XMLElement | getXMLRootTag()
return tag;
| public void | setElementValue(XMLElement element, java.lang.String value)receives notification of the value for a particular tag
String elementName = element.getQName();
WebServiceEndpoint endpoint = (WebServiceEndpoint) getDescriptor();
if (WebServicesTagNames.EJB_LINK.equals(elementName)) {
endpoint.setEjbLink(value);
} else if (WebServicesTagNames.SERVLET_LINK.equals(elementName)) {
endpoint.setWebComponentLink(value);
} else if (WebServicesTagNames.WSDL_PORT.equals(elementName)) {
String prefix = getPrefixFromQName(value);
String localPart = getLocalPartFromQName(value);
String namespaceUri = resolvePrefix(element, prefix);
if( namespaceUri == null) {
DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.invalidDescriptorMappingFailure",
new Object[] {prefix , value });
} else {
QName wsdlPort = new QName(namespaceUri, localPart);
endpoint.setWsdlPort(wsdlPort, prefix);
}
} else if(WebServicesTagNames.WSDL_SERVICE.equals(elementName)) {
String prefix = getPrefixFromQName(value);
String localPart = getLocalPartFromQName(value);
String namespaceUri = resolvePrefix(element, prefix);
if( namespaceUri == null) {
DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.invalidDescriptorMappingFailure",
new Object[] {prefix , value });
} else {
QName wsdlSvc = new QName(namespaceUri, localPart);
endpoint.setWsdlService(wsdlSvc, prefix);
}
} else super.setElementValue(element, value);
| public org.w3c.dom.Node | writeDescriptor(org.w3c.dom.Node parent, java.lang.String nodeName, com.sun.enterprise.deployment.WebServiceEndpoint descriptor)write the method descriptor class to a query-method DOM tree
and return it
Node wseNode = super.writeDescriptor(parent, nodeName, descriptor);
writeDisplayableComponentInfo(wseNode, descriptor);
appendTextChild(wseNode,
WebServicesTagNames.PORT_COMPONENT_NAME,
descriptor.getEndpointName());
QName wsdlService = descriptor.getWsdlService();
if((wsdlService!=null) &&
(wsdlService.getLocalPart().length() != 0)) {
appendQNameChild(WebServicesTagNames.WSDL_SERVICE, wseNode,
wsdlService.getNamespaceURI(), wsdlService.getLocalPart(),
descriptor.getWsdlServiceNamespacePrefix());
}
QName wsdlPort = descriptor.getWsdlPort();
if((wsdlPort!=null) &&
(wsdlPort.getLocalPart().length() != 0)) {
appendQNameChild(WebServicesTagNames.WSDL_PORT, wseNode,
wsdlPort.getNamespaceURI(), wsdlPort.getLocalPart(),
descriptor.getWsdlPortNamespacePrefix());
}
appendTextChild(wseNode,
WebServicesTagNames.ENABLE_MTOM,
descriptor.getMtomEnabled());
if(descriptor.hasUserSpecifiedProtocolBinding()) {
appendTextChild(wseNode,
WebServicesTagNames.PROTOCOL_BINDING,
descriptor.getProtocolBinding());
}
appendTextChild(wseNode,
WebServicesTagNames.SERVICE_ENDPOINT_INTERFACE,
descriptor.getServiceEndpointInterface());
if( descriptor.implementedByWebComponent() ) {
Node linkNode =
appendChild(wseNode, WebServicesTagNames.SERVICE_IMPL_BEAN);
appendTextChild(linkNode, WebServicesTagNames.SERVLET_LINK,
descriptor.getWebComponentLink());
} else if( descriptor.implementedByEjbComponent() ) {
Node linkNode =
appendChild(wseNode, WebServicesTagNames.SERVICE_IMPL_BEAN);
appendTextChild(linkNode, WebServicesTagNames.EJB_LINK,
descriptor.getEjbLink());
} else {
DOLUtils.getDefaultLogger().log
(Level.INFO, "Warning : Web service endpoint " +
descriptor.getEndpointName() + " is not tied to a component");
}
WebServiceHandlerNode handlerNode = new WebServiceHandlerNode();
handlerNode.writeWebServiceHandlers(wseNode,
descriptor.getHandlers());
WebServiceHandlerChainNode handlerChainNode = new WebServiceHandlerChainNode();
handlerChainNode.writeWebServiceHandlerChains(wseNode, descriptor.getHandlerChain());
return wseNode;
|
|