« Return to Thread: XMLRPC, GroovyWS with cookies and auth

Re: XMLRPC, GroovyWS with cookies and auth

by tugwilson :: Rate this Message:

Reply to Author | View in Thread


Steve Tekell wrote:
How do you add cookies or request headers to clients being used for XMLRPC and GroovyWS?
I am currently trying to delegate an existing cookie for a JOSSO secured webapp.

For XMLRPC, I see how I might hack my own version of XMLRPCServerProxy, but it'd be nice if there was some sort of hooks for doing this.  If either I could pass in my own HttpClient (apache) or set of cookies or have a hook to do stuff with the connection before the request is sent, then I could avoid replacing the entire invokeMethod and more.  

Any chance future versions of GroovyXMLRPC would use something like the apache HttpClient instead of URLConnection, so state like cookies could be maintained over a series of requests?

With GroovyWS, I am not sure how to even hack support.  Is there some client somewhere I can get ahold of and add cookies to?

What will these Groovy modules support in the future for authentication?
I hope to get away from JOSSO, but I'll be needed to delegate credentials, like a kerberos ticket.
What methods for credential authentication and non username/password based authentication will be supported?

BTW you should allow username and password to be set per client rather than using system properties as it is in WSClient.    Like that, every service has to use the same account.

Hi Steve!

I can only speak for XML-RPC.

The XML-RPC spec is for a very simple protocol. Arguably it explicitly precludes cookie support (I have been the moderator of the XML-RPC mailing list for many years and this discussion comes up now and again - this seems to be the consensus).

My position is that XML-RPC should be as simple as possible so I have no plans to support cookies ever. If  you would like to subclass XMLRPCServerProxy or take some other route to produce an implementation which does support cookies I'd be happy to give you advice and change XMLRPCServerProxy to make life easier for you (actually, replacing XMLRPCServerProxy would probably be your best bet - the message processing [which is the tricky bit] is packaged up as as separate class).

John Wilson

 « Return to Thread: XMLRPC, GroovyWS with cookies and auth