|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.GenericServlet | +--javax.servlet.http.HttpServlet | +--project.XmlRpcServlet
This servlet facilitates development of HTTP/HTTPS based XML messaging services, which add application-specific behaviours and handle specific kinds of request and response documents. It is only "RPC" in the sense that it is a synchronous exchange of structured messages, directed at a specific object (identified by the target of the POST).
Constructor Summary | |
protected |
XmlRpcServlet()
The default constructor does nothing. |
Method Summary | |
protected void |
customizeDocument(com.sun.xml.tree.SimpleElementFactory factory,
boolean trustDocuments)
The request document that's built from the request can be customized, so that the generic DOM functionality can be augmented with behaviour specific to each element type. |
protected void |
customizeResolver(org.xml.sax.EntityResolver r)
Subclasses can provide a customized entity resolver to be used when resolving external entities such as DTDs. |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
The POST input and output are normally both XML documents. |
boolean |
getCheckTypes()
Returns true (the default) if client messages are validated to ensure that certain basic content errors are not made. |
protected com.sun.xml.tree.XmlDocument |
getRequestDocument(javax.servlet.http.HttpServletRequest request)
Returns the XML document sent in the request. |
protected abstract com.sun.xml.tree.XmlDocument |
rpc(java.lang.String pathInfo,
com.sun.xml.tree.XmlDocument request)
This method must be overridden in a subclass in order to handle the XML messaging request. |
protected void |
sendResponseDocument(com.sun.xml.tree.XmlDocument doc,
javax.servlet.http.HttpServletResponse response)
Sends the given XML document as the response to this request. |
void |
setCheckTypes(boolean value)
This method is used to control whether client messages are type checked (validated). |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete,
doGet,
doOptions,
doPut,
doTrace,
getLastModified,
service,
service |
Methods inherited from class javax.servlet.GenericServlet |
destroy,
getInitParameter,
getInitParameterNames,
getServletConfig,
getServletContext,
getServletInfo,
init,
log |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
protected XmlRpcServlet()
Since this servlet implements the single thread model, it won't handle more than one request at a time.
Method Detail |
protected abstract com.sun.xml.tree.XmlDocument rpc(java.lang.String pathInfo, com.sun.xml.tree.XmlDocument request)
A more functional version would provide session context to the message handling code.
pathInfo
- identifes the object being addressed, within the
scope of the URIs handled by this servlet.request
- XML Document describing the requestpublic void setCheckTypes(boolean value)
public boolean getCheckTypes()
protected void customizeDocument(com.sun.xml.tree.SimpleElementFactory factory, boolean trustDocuments)
factory
- used to acquire customized element nodestrustDocuments
- if true, the document can add its own
mappings from element names to Java element node classesprotected void customizeResolver(org.xml.sax.EntityResolver r)
protected com.sun.xml.tree.XmlDocument getRequestDocument(javax.servlet.http.HttpServletRequest request) throws java.io.IOException, org.xml.sax.SAXException
protected void sendResponseDocument(com.sun.xml.tree.XmlDocument doc, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |