You could try to put the logging in one place in the webservice cfc;
in the pseudo-constructor area. Since that's in the CFC, perhaps
isSOAPRequest()  will work there (too lazy to check).

mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/



2009/7/11 Matthew Reinbold <[email protected]>:
>
> I'm currently trying to add logging to a webservice I've created. I'm not 
> crazy about numerous lines of cflog inside the webservice itself; it seemed 
> that I should be able to put a single line in the application.cfc's 
> OnRequestStart method (not OnRequest as that won't work for remote calls) and 
> have any and all calls within the webservice covered.
>
> The first snag was that IsSOAPRequest() only seems to return true when INSIDE 
> a cfc function. I ended up watching the cgi.HTTP_ACCEPT variable for 
> "soap+xml". With my simple examples this seems to give an indication of when 
> I'm dealing with a web service call.
>
> The next problem, however, has me stumped. At a very minimum I want to record 
> which cfc method is being called. I've got access to the target page in the 
> arguments scope. I also haven't exhausted the possibilities of the 
> getSoapXXXX() functions but, like the IsSoapRequest() I'm afraid it might 
> just not be available in the OnRequestStartMethod(). Extra peachy keen if, 
> based on an application debug variable, one could also record the parameters 
> passed in.
>
> How does one find out what method is being called via a SOAP request on the 
> OnRequestStart method?
>
> Matthew Reinbold
> Creative Principal, Vox Pop Design, http://voxpopdesign.com
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324438
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to