>Still I am not sure on the scope and effort required.
If you could help coming up with a solution that will be great. 

It'd be really easy if there were just a global pointer to the apache
request_rec struct - and if I were just coding this for myself, I might
do it that quick and dirty way.

But within the C++ heirarchy defined by Axiscpp, transport-specific
stuff isn't carried down to the levels where application stuff gets
done.  Makes it kind of hard to code a quick fix for something like
this.

I thought of just adding a CLIENT_IP_ADDRESS property that could be
returned via Axis2Transport::getTransportProperty().  But even if that
could be coded, the handler doesn't have access to the axis transport.
It looks like all that's available to a service app is the pointer to an
IMessageData that's passed into the soap wrapper's invoke() method.  And
IMessageData doesn't seem to carry around any direct knowledge of the
transport.  All I see in there are pointers to the Soap serializer and
deserializer.  These, in turn, may have knowledge of the transport (or
something that knows about it), but that's getting way beyond where I
trust myself to poke around.

This is one of the things I hate about C++ (and OO programming in
general).  If you don't design features in from the beginning, it's
really hard to add them in later.

I guess if the IMessageData class is the interface to the application
code, I'd suggest putting an m_sClient_ip_address in there, along with
the m_sUserName and m_sOperationName.  Don't know where that would
happen,  but it'd have to be set up upfront where the transport has
access to it.  Or just putting a pointer to the Transport in there so it
could be queried from application code.  Transport info isn't strictly
'message data', but neither is the user name or the operation name.

Would that be a big deal to implement?

-----Original Message-----
From: Samisa Abeysinghe [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 01, 2005 11:19 PM
To: Apache AXIS C User List
Subject: RE: Filtering requests by client IP address?

Supporting this in next release: We did not have any plans around this.
However, now that you have requested this, we could have a look into
implementing this. Still I am not sure on the scope and effort required.
If you could help coming up with a solution that will be great.

SSL : I think that should be possible. However need to try and see.

Thanks,
Samisa...

-----Original Message-----
From: Yampolsky, Robert [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 01, 2005 8:28 PM
To: Apache AXIS C User List
Subject: RE: Filtering requests by client IP address?

>However, as we are running with Apache it should be possible to get
this
>from the server side module and expose that to the service. 

Is this something you're willing to change in the next axis version, or
are you saying that I should just edit my service wrapper to dig into
the message heirarchy and pass in the socket handle member from the
Channel down to my service handler, which can do the rest?

By the way, if I use the SSL Channel, will there be an equivalent to the
socket handle in the HTTP Channel?  (I'm not familiar with the workings
of SSL - it looks like SecureChannel inherits from Channel, so I guess
there would be a socket handle available).

-----Original Message-----
From: Samisa Abeysinghe [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 01, 2005 7:45 AM
To: Apache AXIS C User List
Subject: Re: Filtering requests by client IP address?

To my knowledge, it is not possible to extract client IP from server
side.

However, as we are running with Apache it should be possible to get this
from the server side module and expose that to the service.

Thanks,
Samisa...



On Tue, 2005-05-31 at 16:03, Yampolsky, Robert wrote:
> Is it possible in an Axis C++ service to determine the IP address of
the
> client.  My service is supposed to filter on this and match it up
> against a database of registered clients.
> 
> It looks like it might be possible to dig into the call heirarchy and
> get the socket handle from the Channel, but I'm wondering if there's a
> standard way to query for the client IP address.  If not, is this
> something that *should* be available?
> 
> R o b   Y a m p o l s k y
> Harris Corporation
> [EMAIL PROTECTED]
> (212) 303 - 4250
-- 
Samisa Abeysinghe <[EMAIL PROTECTED]>
Virtusa Corporation

Reply via email to