Simon -- this is pretty cool! It's a perfect candidate for the WebWork
extras project. Right now we have two projects on java.net:
webwork-optional and webwork-extras. I'm going to trash one of them and
then you should request developer access to the other so that you have a
place to store this stuff for others to get to.

Patrick

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Simon Stewart
> Sent: Monday, February 16, 2004 8:07 PM
> To: [EMAIL PROTECTED]
> Subject: [OS-webwork] XMLRPC dispatcher and view
> 
> I've put together an XMLRPC dispatcher and view for Webwork 2, and
> thought that maybe some of you would like to know that it's available,
> and how it works. Read on if you're interested....
> 
> http://jira.opensymphony.com/secure/ViewIssue.jspa?key=WW-467
> 
> It's composed of several parts, but the key ones are the
> XmlRpcDispatcher, which can be used in place of the normal
> ServletDispatcher and the XmlRpcDispatcherResult, which maps results
to
> an XMLRPC "methodResponse" and a PositionalParameterInterceptor.
> 
> The PositionalParameterInterceptor (other than having a snappy name)
> takes the parameters of an XMLRPC method call and maps them from their
> positions to a set of space separated OGNL paths, using the static
> Action parameter "XmlRpcPaths":
> 
> <action name="manyParams"
>    class="org.pubbitch.actions.ManyParamsAction">
>      <param name="XmlRpcPaths">username password</param>
>      <result name="success">
>        <param name="location">result</param>
>      </result>
> </action>
> 
> In this case, the first parameter is mapped to "username", and the
> second to "password". More examples are included in the attached
> "xwork.xml" file.
> 
> Assuming that the XmlRpcDispatcherResult is being used, the "location"
> parameter of the results is again an OGNL path, which is adapted to an
> XMLRPC "methodResponse" by the DefaultObjectAdapter. There are some
more
> examples of how to use the XmlRpc classes included in the "src/test"
> directory of the archives attached to the JIRA issue.
> 
> The only other thing to note is that the dispatcher uses the name of
the
> method to try and determine the package; a call to
"blogger.getUserInfo"
>   would look for an action named "getUserInfo" in the package called
> "blogger"
> 
> So, what are the disadvantages and advantages of using this dispatcher
> rather than (say) Apache's XMLRPC code?
> 
> *) It integrates nicely with Webwork, meaning that you don't need to
> learn another API
> 
> *) This XMLRPC code doesn't contain any extra dependencies, which
means
> fewer jars are needed in your application
> 
> *) This XMLRPC code is missing certain features, specifically support
> for Base64 encoded parameters.
> 
> *) The Apache code has been better tested. For instance, the Date code
> in the "SpecBasedParser" definitely needs some more hostile testing.
> 
> *) It's a nice "proof of concept" for XWork/Webwork since very little
> additional work needed to be done once the XMLRPC adapter and parser
had
> been written.
> 
> Shout if you have questions!
> 
> Regards,
> 
> Simon


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to