Package org.openbravo.service.web
Class BaseWebServiceServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.openbravo.service.web.BaseWebServiceServlet
-
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
- Direct Known Subclasses:
JsonRestServlet
,WebServiceServlet
public class BaseWebServiceServlet extends javax.servlet.http.HttpServlet
This servlet has two main responsibilities: 1) authenticate, 2) set the correctOBContext
, and 3) translate Exceptions into the correct Http response code.In regard to authentication: there is support for basic-authentication as well as url parameter based authentication.
- Author:
- mtaal
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
LOGIN_PARAM
static String
PASSWORD_PARAM
-
Constructor Summary
Constructors Constructor Description BaseWebServiceServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
callServiceInSuper(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected void
doService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected WebService
getWebService(javax.servlet.http.HttpServletRequest request)
protected void
service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
-
-
-
-
Field Detail
-
LOGIN_PARAM
public static final String LOGIN_PARAM
- See Also:
- Constant Field Values
-
PASSWORD_PARAM
public static final String PASSWORD_PARAM
- See Also:
- Constant Field Values
-
-
Method Detail
-
service
protected final void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
- Overrides:
service
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
-
getWebService
protected WebService getWebService(javax.servlet.http.HttpServletRequest request)
-
callServiceInSuper
protected void callServiceInSuper(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
- Throws:
javax.servlet.ServletException
IOException
-
doService
protected void doService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
- Throws:
javax.servlet.ServletException
IOException
-
-