James, You are correct, the RPC *method* has no clue of the network details associated w/ callee. If you wanted the *method* to know, you'd have to pass that info in as a parameter. However, if you just wanted the RPC *server* to know about the callee's network info, you will need to modify the Server code to do something once a seversocket has been accepted. Take a look at WebServer.java's run method (where the server calls "checkSocket" after accepting a socket).
Michael ----- Original Message ----- From: "James Russo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 30, 2004 3:42 PM Subject: Re: Way to obtain client IP / Port? Jochen, I think my original question was not clear. I want the server to be able to obtain the IP address of the client calling the RPC method. I want to be able to get this information from within the RPC method itself. Right now, I don't think it is possible with the current way things are implemented. Other then userpassword (via AuthenticatedXmlRpcHandler, or ContextXmlRpcHandler) no information about the underlying transport is available at the RpcMethod layer. -jr Jochen Wiedmann wrote: > James Russo wrote: > >> I agree. The port is subject to change, but the IP should remain >> the same. (or at least in my application it will) I think this >> information could be as useful as the userid/password. Other >> information which could be useful could be the client certificate >> information if the connection is SSL and a client certificate was >> presented. This could allow the rpc method to do >> authentication/authorization based on that data too. > > > If that's sufficient for you, simply create a socket to the HTTP > server: This will use the same IP address. SSL is a little bit more > tricky, but possible in the same manner. (If the client certificate > obtained in this way is *not* the same, then you're stick with the > same problem that holds for the port numbers.) > > Jochen >