You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by Sanjiva Weerawarana <sa...@watson.ibm.com> on 2000/06/22 09:44:57 UTC

more details about what I just committed

I committed the mods to remove much of the logic that was in rpcrouter.jsp
to a new class called org.apache.soap.server.RPCRouter. There's still more
work to do; in particular, I noticed that the lifecycle management stuff
that's in the code is HTTP-centric. That is, the objects that are created
and managed for doing the services are managed according to servlet
lifecycles (of request/page/session/application scope). Obviously that
only works if the transport is HTTP. 

So what I did is to leave the lifecycle management part of stuff in 
rpcrouter.jsp and move 3 things to RPCRouter.java: extract a Call object
from a SOAP envelope, check whether the call is good (is it on a published
method) and do the call on the given target object. When a request is 
received by rpcrouter.jsp, it:
    1. parses to the XML doc
    2. unmarshalls the envelope
    3. uses the java class RPCRouter to extract a call object
    4. checks whether the call is good (using RPCRouter)
    5. does some work internally to determine the class to instantiate
       and its lifecycle
    6. init the service provider class if needed
    7. use RPCRouter to invoke the call on the service provider object
    8. builds an envelope out of the response
    9. marshalls out the response on the wire as XML

To implement a router for another transport we would now have to re-impl
this process, but at least several of the key parts are shared. I don't
think the cleanup process is done yet - so if someone wants to take a
deeper crack go ahead please.

After moving the logic to org.apache.soap.server.RPCRouter, I realized
that much of the stuff in the org/apache/soap/server dir had nothing to
do with the server side part of the code. So I created a webapps dir
and made two subdirs - admin and rpcrouter. I moved all the html form
based admin stuff to the admin webapp and the rpcrouter.jsp file to
the rpcrouter webapp. I am not very familiar with the webapp dir
structure, so I'm sure I didn't do that part right; I would appreciate
if someone could please organize that part. 

Note that while there were many files moved around when I committed 
the stuff, only a little bit of the functionality changed: some logic
got moved into RPCRouter.java. Everything else was just moving the
files to (IMO) better places. Given that I'm new to open-source dev
I'm not sure whether I broke protocol by doing that without asking;
if so please let me know and I'll be much more careful in the future.

When it comes to do a new distribution we'll have to update the 
build script to build WAR files out of the two webapps so that 
deployment to a servlet 2.2 container becomes relatively trivial.

I have update the TODO file a bit too to reflect the status of the
restructuring effort. 

Sanjiva.