public class DOMWriterService extends GenericService
org.w3c.dom.Element
object and print out the DOM associated wth it.
This is a simple utility class which is intended to be used with
a SOAP server. The SOAP server can register this service to receive
a single org.w3c.dom.Element
object and print it out.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
static java.lang.String |
FAILURE
Code to return if we were unable to serialize the DOM/Element object
to the output stream.
|
static java.lang.String |
RPC_ROUTER_ID |
static java.lang.String |
SUCCESS
Code to return if we were able to serialize the DOM/Element object
to the output stream.
|
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
DOMWriterService() |
Modifier and Type | Method and Description |
---|---|
void |
doStartService()
This method will allow this service to register itself with
a ServiceManager.
|
java.lang.String[] |
getMethods()
Return the methods property.
|
java.lang.String |
getOutputMethod()
The output method that gets set on the transformer.
|
java.io.OutputStream |
getOutputStream()
The outputstream that the Document/Element should be rendered
to.
|
atg.server.soap.DynamoRPCRouterServlet |
getRPCRouterServlet()
Return the RPCRouterServlet property.
|
java.lang.String |
getServiceId()
Return the ServiceId property.
|
boolean |
IsIndent()
If this value is set to true, then the OutputKeys.INDENT property
on the transformer will be set to true.
|
java.lang.String |
receiveDocument(org.w3c.dom.Element pElement)
This is the main method that is exposed to the SOAP
server.
|
void |
setIndent(boolean pIndent)
Set the IsIndent property.
|
void |
setMethods(java.lang.String[] pMethods)
Set the methods property.
|
void |
setOutputMethod(java.lang.String pOutputMethod)
Set the OutputMethod property.
|
void |
setOutputStream(java.io.OutputStream pOutputStream)
Set the OutputStream property.
|
void |
setRPCRouterServlet(atg.server.soap.DynamoRPCRouterServlet pRPCRouterServlet)
Set the RPCRouterServlet property.
|
void |
setServiceId(java.lang.String pServiceId)
Set the ServiceId property.
|
addLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static java.lang.String CLASS_VERSION
public static final java.lang.String RPC_ROUTER_ID
public static final java.lang.String SUCCESS
public static final java.lang.String FAILURE
public java.lang.String getServiceId()
public void setServiceId(java.lang.String pServiceId)
pServiceId
- public java.lang.String[] getMethods()
public void setMethods(java.lang.String[] pMethods)
pMethods
- public boolean IsIndent()
This defaults to true.
public void setIndent(boolean pIndent)
pIndent
- public java.lang.String getOutputMethod()
public void setOutputMethod(java.lang.String pOutputMethod)
pOutputMethod
- public java.io.OutputStream getOutputStream()
System.out
public void setOutputStream(java.io.OutputStream pOutputStream)
pOutputStream
- public atg.server.soap.DynamoRPCRouterServlet getRPCRouterServlet()
public void setRPCRouterServlet(atg.server.soap.DynamoRPCRouterServlet pRPCRouterServlet)
pRPCRouterServlet
- public void doStartService() throws ServiceException
RPCRouterServlet
of this class.
It registers itself by creating a DeploymentDescriptor
and populating that DeploymentDescriptor with the appropriate values.
It set the Id property to that configured in this classes
serviceId
property. It will also set the
methods
property to be that from the getMethods
method.
doStartService
in class GenericService
ServiceException
- if an error occurspublic java.lang.String receiveDocument(org.w3c.dom.Element pElement)
org.w3c.dom.Element
object and print the tree structur of the element object.
This printing is performed by using the
javax.xml.transform
package to create an
identity transformer and render the output.
When rendering the output, the output will be rendered
to a created StreamResult
object. The
StreamResult
object will be created with
the OutputStream returned by getOutputStream
/
pElement
- the element whose tree structure will be
rendered.