----- Original Message -----
From: Christopher Elkins <[EMAIL PROTECTED]>
To: Turbine <[EMAIL PROTECTED]>
Sent: Friday, December 10, 1999 1:41 PM
Subject: Re: XML-RPC in Turbine


> Brett McLaughlin [[EMAIL PROTECTED]] wrote:
> > We will have a TurbineServices.getInstance() that will eventually take a
> > parameter for another server.  The services class will then turn any
> > requests to that instance into XML-RPC and pass them to a remote machine
for
> > processing, such as comlpex equations, etc.  It will all be behind the
> > scenes, though, so the action will never explictly create an XML
request.
> > It shouldn't have to use a local or remote service differently than the
> > other.  Uncoupling here...
> >
> Okay, based on this, would it require something like this?
>
>   public class XmlRpcService extends TurbineBaseService {
>     public ??? execute(String serverURI, String methodName, Vector
params);
>   }
>
> If so, then I don't know what the method will return. The raw XML
response?
> This is where that "handler mapping" arose. A hashtable of
methodName/className
> pairs so that execute() would know to instantiate MyClass if methodName is
> "MyClass.doSomething". I don't know if this is the proper way to do this.
I'm
> only starting with this idea, because that's how the library (that I
> mentioned in my previous message) does it. Suggestions?
>

The method would return a java.lang.Object since that's what the library's
execute method does.  This Object would be what is returned as the <value>
of the response.  For example, this response:

<?xml version="1.0"?>
<methodResponse>
   <params>
      <param>
         <value><string>South Dakota</string></value>
         </param>
      </params>
   </methodResponse>

the execute method would return an Object but should be cast into a String.
I don't think Turbine *should* ever see the raw XML since the library would
wrap it all up.

Hopefully this makes some sense.  I did some early Java work with XML-RPC
and I think it would be a great addition to Turbine.  I'd love to help with
it.


josh



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to