Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get the name of current Web Service method

Status
Not open for further replies.

stevexff

Programmer
Mar 4, 2004
2,110
GB
This is really a .NET question, but I'm posting it here instead because it's also a design issue.

I have an existing application that needs to be enhanced to add auditing. The simplest place to hook this up is in the Web Service classes. These all inherit from a Layer Supertype [Fowler] that itself inherits from System.Web.Services.WebService.

All the subclasses make a call back to a layer supertype method, so by adding some code to this method, I can easily add auditing to the inherited classes without having to change them all. But most of these expose a number of WebMethods, and I really need to know which one is being called so that I can log it out.

I've had a look at the contents of the HTTPRequest object, and it looks as if I can probably extract the information by substringing some of the available fields, but does anyone know if there is a cleaner way of doing this?

Thanks in advance

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top