public class RPCAdapter
extends javax.servlet.http.HttpServlet
implements javax.servlet.Servlet
init
method). The
deployed RPC Adapter exposes the following directory of URLs:
GET <baseUrl>/httprpc -- directory of registered services GET <baseUrl>/httprpc/<serviceName> -- list of operations on <serviceName> GET <baseUrl>/httprpc/<serviceName>/<operation>[?name=value] -- HTTP RPC invocation POST <baseUrl>/httprpc/<serviceName>/<operation> [BODY: name=value] -- HTTP RPC invocation GET <baseUrl>/jsonrpc/<serviceName> -- Dojo SMD file POST <baseUrl>/jsonrpc/<serviceName> [BODY: JSON-RPC request] -- JSON RPC invocation
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SESSION_APP_PREFIX
Beans marked as
oneInstancePerUser are placed in users'
HttpSessions with names derived by prepending SESSION_PREFIX
to the service name. |
Constructor and Description |
---|
RPCAdapter() |
Modifier and Type | Method and Description |
---|---|
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse rsp)
Implements basic documentation responses (/service,
/service/<serviceName>, and /jsonrpc/<serviceName>) as well
as invoking RPC operations (
processService and
processJsonrpc ) for HTTP GET. |
protected void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse rsp)
Invokes RPC operations (
processService and
processJsonrpc ) for HTTP POST. |
void |
init(javax.servlet.ServletConfig config)
Beans are registered with the RPC Adapter as init parms in web.xml.
|
protected void |
putinSession(javax.servlet.http.HttpServletRequest req,
java.lang.String serviceName,
Ejb service) |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
public static java.lang.String SESSION_APP_PREFIX
oneInstancePerUser
are placed in users'
HttpSessions with names derived by prepending SESSION_PREFIX
to the service name.public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
<serviceName> = <fullyQualifiedBeanClassName>
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp) throws javax.servlet.ServletException, java.io.IOException
processService
and
processJsonrpc
) for HTTP GET.doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
- if an RPC operation was registered as a POST but invoked as a
GET.java.io.IOException
protected void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp) throws javax.servlet.ServletException, java.io.IOException
processService
and
processJsonrpc
) for HTTP POST.doPost
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
- if an RPC operation was registered as a GET but invoked as a
POST.java.io.IOException
protected void putinSession(javax.servlet.http.HttpServletRequest req, java.lang.String serviceName, Ejb service) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException