@Deprecated public abstract class AbstractDomPayloadEndpoint extends TransformerObjectSupport implements PayloadEndpoint
Offers the message payload as a DOM Element, and allows subclasses to create a response by returning an
Element.
An AbstractDomPayloadEndpoint only accept one payload element. Multiple payload elements are not in
accordance with WS-I.
invokeInternal(org.w3c.dom.Element,org.w3c.dom.Document)logger| Constructor and Description |
|---|
AbstractDomPayloadEndpoint()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected DocumentBuilder |
createDocumentBuilder(DocumentBuilderFactory factory)
Deprecated.
Create a
DocumentBuilder that this endpoint will use for parsing XML documents. |
protected DocumentBuilderFactory |
createDocumentBuilderFactory()
Deprecated.
Create a
DocumentBuilderFactory that this endpoint will use for constructing XML documents. |
protected Element |
getDocumentElement(Source source,
DocumentBuilder documentBuilder)
Deprecated.
Returns the payload element of the given source.
|
Source |
invoke(Source request)
Deprecated.
Invokes the endpoint with the given request payload, and possibly returns a response.
|
protected abstract Element |
invokeInternal(Element requestElement,
Document responseDocument)
Deprecated.
Template method that subclasses must implement to process the request.
|
void |
setAlwaysTransform(boolean alwaysTransform)
Deprecated.
|
void |
setExpandEntityReferences(boolean expandEntityRef)
Deprecated.
Set if the XML parser should expand entity reference nodes.
|
void |
setNamespaceAware(boolean namespaceAware)
Deprecated.
Set whether or not the XML parser should be XML namespace aware.
|
void |
setValidating(boolean validating)
Deprecated.
Set if the XML parser should validate the document.
|
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transformpublic void setNamespaceAware(boolean namespaceAware)
true.public void setValidating(boolean validating)
false.public void setExpandEntityReferences(boolean expandEntityRef)
false.public void setAlwaysTransform(boolean alwaysTransform)
public final Source invoke(Source request) throws Exception
PayloadEndpointinvoke in interface PayloadEndpointrequest - the payload of the request message, may be nullnull to indicate no responseException - if an exception occursprotected DocumentBuilder createDocumentBuilder(DocumentBuilderFactory factory) throws ParserConfigurationException
DocumentBuilder that this endpoint will use for parsing XML documents. Can be overridden in
subclasses, adding further initialization of the builder.factory - the DocumentBuilderFactory that the DocumentBuilder should be created withDocumentBuilderParserConfigurationException - if thrown by JAXP methodsprotected DocumentBuilderFactory createDocumentBuilderFactory() throws ParserConfigurationException
DocumentBuilderFactory that this endpoint will use for constructing XML documents. Can be
overridden in subclasses, adding further initialization of the factory. The resulting
DocumentBuilderFactory is cached, so this method will only be called once.ParserConfigurationException - if thrown by JAXP methodsprotected Element getDocumentElement(Source source, DocumentBuilder documentBuilder) throws TransformerException
Default implementation checks whether the source is a DOMSource, and returns the
node of that. In all other cases, or when alwaysTransform is true, the source is transformed into a DOMResult, which is more expensive. If
the passed source is null, null is returned.
source - the source to return the root element of; can be nulldocumentBuilder - the document builder to be used for transformationsTransformerException - in case of errorsprotected abstract Element invokeInternal(Element requestElement, Document responseDocument) throws Exception
Offers the request payload as a DOM Element, and allows subclasses to return a response Element.
The given DOM Document is to be used for constructing Nodes, by using the various create
methods.
requestElement - the contents of the SOAP message as DOM elementsresponseDocument - a DOM document to be used for constructing Nodesnull to specify no response.ExceptionCopyright © 2023 VMware, Inc.. All rights reserved.