Class XmlRpcServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.xmlrpc.webserver.XmlRpcServlet
- All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class XmlRpcServlet
extends javax.servlet.http.HttpServlet
A default servlet implementation The typical use would
be to derive a subclass, which is overwriting at least the
method newXmlRpcHandlerMapping().
The servlet accepts the following init parameters:
| Name | Description |
|---|---|
| enabledForExtensions | Sets the value
XmlRpcConfig.isEnabledForExtensions()
to true. |
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.commons.logging.Logprivate RequestProcessorFactoryFactoryprivate static final longprivate XmlRpcServletServerprivate TypeConverterFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoPost(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse) Creates a new instance ofRequestDatafor the request.Returns the servletsAbstractReflectiveHandlerMapping.AuthenticationHandler.Returns the servletsRequestProcessorFactoryFactory.Returns the servletsTypeConverterFactory.Returns the servlets instance ofXmlRpcServletServer.private voidhandleInitParameters(javax.servlet.ServletConfig pConfig) voidinit(javax.servlet.ServletConfig pConfig) voidvoidprotected PropertyHandlerMappingCreates a new instance ofPropertyHandlerMappingby loading the property file from the given URL.protected XmlRpcHandlerMappingCreates a new handler mapping.protected XmlRpcServletServernewXmlRpcServer(javax.servlet.ServletConfig pConfig) Creates a new instance ofXmlRpcServer, which is being used to process the requests.voidSets the servletsAbstractReflectiveHandlerMapping.AuthenticationHandler.voidSets the servletsRequestProcessorFactoryFactory.voidsetTypeConverterFactory(TypeConverterFactory pFactory) Sets the servletsTypeConverterFactory.Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, serviceMethods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
log
private static final org.apache.commons.logging.Log log -
server
-
authenticationHandler
-
requestProcessorFactoryFactory
-
typeConverterFactory
-
-
Constructor Details
-
XmlRpcServlet
public XmlRpcServlet()
-
-
Method Details
-
getXmlRpcServletServer
Returns the servlets instance ofXmlRpcServletServer.- Returns:
- The configurable instance of
XmlRpcServletServer.
-
handleInitParameters
private void handleInitParameters(javax.servlet.ServletConfig pConfig) throws javax.servlet.ServletException - Throws:
javax.servlet.ServletException
-
init
public void init(javax.servlet.ServletConfig pConfig) throws javax.servlet.ServletException - Specified by:
initin interfacejavax.servlet.Servlet- Overrides:
initin classjavax.servlet.GenericServlet- Throws:
javax.servlet.ServletException
-
setAuthenticationHandler
public void setAuthenticationHandler(AbstractReflectiveHandlerMapping.AuthenticationHandler pHandler) Sets the servletsAbstractReflectiveHandlerMapping.AuthenticationHandler. -
getAuthenticationHandler
Returns the servletsAbstractReflectiveHandlerMapping.AuthenticationHandler. -
setRequestProcessorFactoryFactory
Sets the servletsRequestProcessorFactoryFactory. -
getRequestProcessorFactoryFactory
Returns the servletsRequestProcessorFactoryFactory. -
setTypeConverterFactory
Sets the servletsTypeConverterFactory. -
getTypeConverterFactory
Returns the servletsTypeConverterFactory. -
newXmlRpcServer
protected XmlRpcServletServer newXmlRpcServer(javax.servlet.ServletConfig pConfig) throws XmlRpcException Creates a new instance ofXmlRpcServer, which is being used to process the requests. The default implementation will simply invokenewXmlRpcServer.- Parameters:
pConfig- The servlets configuration.- Throws:
XmlRpcException
-
newXmlRpcHandlerMapping
Creates a new handler mapping. The default implementation loads a property file from the resourceorg/apache/xmlrpc/webserver/XmlRpcServlet.properties- Throws:
XmlRpcException
-
newPropertyHandlerMapping
protected PropertyHandlerMapping newPropertyHandlerMapping(URL url) throws IOException, XmlRpcException Creates a new instance ofPropertyHandlerMappingby loading the property file from the given URL. Called fromnewXmlRpcHandlerMapping().- Throws:
IOExceptionXmlRpcException
-
doPost
public void doPost(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse) throws IOException, javax.servlet.ServletException Creates a new instance ofRequestDatafor the request.- Overrides:
doPostin classjavax.servlet.http.HttpServlet- Throws:
IOExceptionjavax.servlet.ServletException
-
log
-
log
- Overrides:
login classjavax.servlet.GenericServlet
-