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

Re: XMLRPC, GroovyWS with cookies and auth

by Steve Tekell :: Rate this Message:

Reply to Author | View in Thread

tugwilson wrote:
be happy to give you advice and change XMLRPCServerProxy to make life easier for you
The only thing I need to do is add this:
connection.setRequestProperty("Cookie", "JOSSO_SESSIONID=" + jossoSessionId);

The problem is I don't know of a good way to do this since the connection is buried in invokeMethod.  So I end up with an alternative version XMLRPCServerProxy that will require maintenance with every upgrade.  Which I did and it works, but,....

Any small change you'd be willing to make to XMLRPCServerProxy to make some cleaner way to do this would be appreciated.  Maybe if (connection was property and) there was a getConnection method that just returned this.serverURL.openConnection, then I could override just that.  Or maybe it'd be more Groovy to accept a closure in a constructor { connection -> doSomethingWithConnectionBeforeRequest }.  Any hook you provide to execute something like connection.setRequestProperty would allow those of us who need cookies to implement it in a better way.

thx,

Steve


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