--yiup30KVCQiHUZFC
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Nov 13, 2005 at 06:39:17AM +0900, Adam Keys wrote:
> Here's how I get at the request and response objects in xmlrpc4r.
> 
> ---
> class MyServlet < XMLRPC::WEBrickServlet
>   def service(request, response)
>     # do whatever I want with the request
>     super
>     # do whatever I want with the response
>   end
> end
> ---
> 
> The call to #super will invoke whatever handlers you've added to your  
> servlet.  Its not quite what you're looking for, but hopefully its a  
> start.  Maybe you could put the relevant certificate information in  
> an instance variable from #service and then revisit it in your handler?

Thanks for the tip, it has put me one step closer to my goal.  I can gather
info about the certificate in the service method, but I haven't figured out
how to pass it into the handler.. 

class MyServlet < XMLRPC::WEBrickServlet
    def service(request, response)
        @client_cert_subject=request.client_cert.subject
        puts client_cert_subject   # this works
        super
    end
end

servlet = MyServlet.new

something = SomeObject.new 

servlet.add_handler("something.do_something") do
    puts @client_cert_summary    # this prints "nil"
    something.do_something
end

And also if I "puts self.inspect" inside the add_handler block, I get "main".
Which wasn't quite what I expected.  

-jason

--yiup30KVCQiHUZFC
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDeMt4w2QEY5tkPw0RAqldAJwI4ifpiw6g1TJ2M0G7vBC0TeBKzwCeLhS7
VamGLaUnEU1uV9jUhdX6WT8
TY -----END PGP SIGNATURE----- --yiup30KVCQiHUZFC--