You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "D.Kreft" <da...@kreft.net> on 2006/12/05 20:23:52 UTC

Best way to log service method accesses?

I'm setting up a table in my database to log accesses to my service.
I'm grabbing the username, client host and script name from the SOAP
header, but I'd also like to log the name of the method called. What's
the best way to do this? Can the SOAPAction HTTP header be reliably
counted on for this task, or must I pick apart the SOAP body?

Or better yet, is there a pre-fabricated solution I could drop into my
service to take care of this for me? Surely this has been done before.
:-)

-dan

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Best way to log service method accesses?

Posted by "D.Kreft" <da...@kreft.net>.
Ne'er mind...I got this figured out based upon a response to another question.

The solution is to create a handler that inherits from BasicHandler. :-)

-dan

On 12/5/06, D. Kreft <da...@kreft.net> wrote:
> On 12/5/06, David Illsley <da...@gmail.com> wrote:
>
> > If this is in Axis2 I'd suggest a handler inserted after the dispatch
> > phase in which case you can get the operation name from the
> > AxisOperation which in turn you can obtain from the MessageContext. In
> > general the SOAPAction can't and shouldn't be relied upon.
>
> Sorry, should have mentioned in my original e-mail that this is under
> Axis 1.4. Is there a sexy way to do what I need in that version of
> Axis?
>
> -dan
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Best way to log service method accesses?

Posted by "D.Kreft" <da...@kreft.net>.
On 12/5/06, David Illsley <da...@gmail.com> wrote:

> If this is in Axis2 I'd suggest a handler inserted after the dispatch
> phase in which case you can get the operation name from the
> AxisOperation which in turn you can obtain from the MessageContext. In
> general the SOAPAction can't and shouldn't be relied upon.

Sorry, should have mentioned in my original e-mail that this is under
Axis 1.4. Is there a sexy way to do what I need in that version of
Axis?

-dan

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Best way to log service method accesses?

Posted by David Illsley <da...@gmail.com>.
If this is in Axis2 I'd suggest a handler inserted after the dispatch
phase in which case you can get the operation name from the
AxisOperation which in turn you can obtain from the MessageContext. In
general the SOAPAction can't and shouldn't be relied upon.

David

On 05/12/06, D. Kreft <da...@kreft.net> wrote:
> I'm setting up a table in my database to log accesses to my service.
> I'm grabbing the username, client host and script name from the SOAP
> header, but I'd also like to log the name of the method called. What's
> the best way to do this? Can the SOAPAction HTTP header be reliably
> counted on for this task, or must I pick apart the SOAP body?
>
> Or better yet, is there a pre-fabricated solution I could drop into my
> service to take care of this for me? Surely this has been done before.
> :-)
>
> -dan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
David Illsley - IBM Web Services Development

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org