xml-rpc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Evers" <aev...@redwood.nl>
Subject Re: recent patches
Date Fri, 13 Sep 2002 15:50:24 GMT
> I see...presumably a subsequent patch which adds code to actually set
> the context on the client side will be forthcoming?  Then if the server
>  side handler is a ContextHandler, it will be called with the extra
> context  param, if I am understanding correctly?  I assume this context
> will be  passed in some sort of HTTP header...perhaps serialized or
> something (if you  really want to support arbitrary Objects).

The context itself is set by the XmlRpcServer's or XmlRpcWorker's
caller. This might be WebServer, or a Servlet, the SecureWebServer,
or a custom HTTP framework. The former two might just create a
DefaultXmlRpcContext, but the latter two might pass in a different
implementation that may provide extra information (SSL credentials,
or a Session like interface). This extra information can be passed
in with no framework changes, and no need to modify the XmlRpcRequest
itself (or the XmlRpcRequestProcessor).

There is no need to change the client at all. These patches allow
server embedders to decode (or pull out of the air) extra information
and pass it along with a request. Relatively standard information
(like HTTP headers) should become part of the XmlRpcContext interface,
extra information can be added by an implementation and handled
using casting.

If you were implementing a request chaining system, you may want to
add information to the XmlRpcContext as it passes through the
request chain. In this case the context information is changing, but
the request itself is not modified.

It would certainally be worth modifying the client so that it took
an XmlRpcContext (although the getHandlerMapping() is irrelevant
here and may be ignored) and encoded the standard information (like
username, password, http headers) into the request.

Since XML-RPC is already an RPC mechanism, complex context information
should really be passed as parameters to the RPC's themselves. The
XmlRpcContext provides a way to access server-related information,
and connection details mainly useful for authentication.

Andrew.




Mime
View raw message