public class AxisServlet
extends javax.servlet.http.HttpServlet
TransportListener. There are two reasons for this:
TransportListener for each protocol, but this servlet
may implement both HTTP and HTTPS.
TransportListener.destroy() and
Servlet.destroy().
TransportListener implementation is provided by AxisServletListener. An
instance of that class must be declared in axis2.xml for each protocol (HTTP/HTTPS) that
the servlet should accept.| Modifier and Type | Class and Description |
|---|---|
protected class |
AxisServlet.RestRequestProcessor
Ues in processing REST related Requests.
|
protected class |
AxisServlet.ServletRequestResponseTransport |
| Modifier and Type | Field and Description |
|---|---|
protected ListingAgent |
agent |
protected org.apache.axis2.engine.AxisConfiguration |
axisConfiguration |
protected org.apache.axis2.context.ConfigurationContext |
configContext |
static String |
CONFIGURATION_CONTEXT |
protected String |
contextRoot |
protected boolean |
disableREST |
protected javax.servlet.ServletConfig |
servletConfig |
static String |
SESSION_ID |
| Constructor and Description |
|---|
AxisServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.axis2.context.MessageContext |
createMessageContext(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
This method assumes, that the created MessageContext will be used in only SOAP invocation.
|
protected org.apache.axis2.context.MessageContext |
createMessageContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
boolean invocationType) |
void |
destroy()
distroy the ConfigurationContext
|
protected void |
doDelete(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Implementation of DELETE interface
|
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Implementation for GET interface
|
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Implementaion of POST interface
|
protected void |
doPut(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Implementation of PUT interface
|
protected Map<String,String> |
getTransportHeaders(javax.servlet.http.HttpServletRequest req)
Get all transport headers.
|
protected void |
handleFault(org.apache.axis2.context.MessageContext msgContext,
OutputStream out,
org.apache.axis2.AxisFault e) |
void |
init()
Convenient method to re-initialize the ConfigurationContext
|
void |
init(javax.servlet.ServletConfig config)
Main init method
|
protected org.apache.axis2.context.ConfigurationContext |
initConfigContext(javax.servlet.ServletConfig config)
Initialize the Axis configuration context
|
void |
initContextRoot(javax.servlet.http.HttpServletRequest req)
Set the context root if it is not set already.
|
protected void |
initGetRequestProcessors(javax.servlet.ServletConfig config)
Initialize HTTP GET request processors
|
protected void |
initParams()
Initializes the Axis2 parameters.
|
protected void |
initTransports()
Initialize HTTP transports
|
protected void |
showRestDisabledErrorMessage(javax.servlet.http.HttpServletResponse response)
Private method that deals with disabling of REST support.
|
doHead, doOptions, doTrace, getLastModified, service, servicepublic static final String CONFIGURATION_CONTEXT
public static final String SESSION_ID
protected transient org.apache.axis2.context.ConfigurationContext configContext
protected transient org.apache.axis2.engine.AxisConfiguration axisConfiguration
protected transient javax.servlet.ServletConfig servletConfig
protected transient ListingAgent agent
protected transient String contextRoot
protected boolean disableREST
protected void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
doPost in class javax.servlet.http.HttpServletrequest - response - javax.servlet.ServletExceptionIOExceptionprotected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
doGet in class javax.servlet.http.HttpServletrequest - response - javax.servlet.ServletExceptionIOExceptionprotected void doDelete(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
doDelete in class javax.servlet.http.HttpServletrequest - response - javax.servlet.ServletExceptionIOExceptionprotected void doPut(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
doPut in class javax.servlet.http.HttpServletrequest - response - javax.servlet.ServletExceptionIOExceptionprotected void showRestDisabledErrorMessage(javax.servlet.http.HttpServletResponse response)
throws IOException
response - IOExceptionprotected void handleFault(org.apache.axis2.context.MessageContext msgContext,
OutputStream out,
org.apache.axis2.AxisFault e)
throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFaultpublic void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Servletinit in class javax.servlet.GenericServletconfig - The ServletConfigjavax.servlet.ServletExceptionprotected void initGetRequestProcessors(javax.servlet.ServletConfig config)
config - The ServletConfig of this Servletprotected void initTransports()
throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFault - If an error occurs while initializing transportspublic void destroy()
destroy in interface javax.servlet.Servletdestroy in class javax.servlet.GenericServletprotected void initParams()
public void init()
throws javax.servlet.ServletException
init in class javax.servlet.GenericServletjavax.servlet.ServletExceptionprotected org.apache.axis2.context.ConfigurationContext initConfigContext(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
config - Servlet configurationjavax.servlet.ServletExceptionpublic void initContextRoot(javax.servlet.http.HttpServletRequest req)
req - protected Map<String,String> getTransportHeaders(javax.servlet.http.HttpServletRequest req)
req - protected org.apache.axis2.context.MessageContext createMessageContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
boolean invocationType)
throws IOException
request - response - invocationType - : If invocationType=true; then this will be used in SOAP message
invocation. If invocationType=false; then this will be used in REST message invocation.IOExceptionprotected org.apache.axis2.context.MessageContext createMessageContext(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws IOException
req - resp - IOExceptionCopyright © 2004–2016 The Apache Software Foundation. All rights reserved.