It's a real web service, I use this script to call it using the
cfinvoke web service way;
<cfinvoke webservice="http://address-to-file/lib_util.cfc?WSDL";
method="mymethod" timeout="10" returnVariable="returnVar">

The headers show it's a web service. I've seen references around the
net that you can only use isSOAPRequest() in the actual cfc that the
remote method is contained in, so checking for it anywhere outside of
that such as the application.cfc doesn't work.'

I have ended up getting round the issue by just checking for
'application/soap' in the cgi.HTTP_ACCEPT variable (not thoroughly
tested yet though, but should be fine)

Barry.

On May 6, 2:18 pm, Phil Haeusler <philhaeus...@gmail.com> wrote:
> That's a little odd. Are you doing real webservices or is it actually an 
> Ajax/rest call to your cfc?
>
> On 06/05/2011, at 11:35, BarryC <barrychester...@gmail.com> wrote:
>
> > hmmm, It would be ideal to check within our Application.cfc if the
> > request is a SOAP request, but using IsSOAPRequest() inside
> > application.cfc doesn't work, it always returns false. Is there a way
> > to check if the request is a web service request within
> > Application.cfc? Ben Nadel posted that the FORM scope doesn't exist
> > when a web service is called, but checking against that seems a bit of
> > an odd way to go about it - there must be a better way?
>
> > On May 6, 10:46 am, BarryC <barrychester...@gmail.com> wrote:
> >> excellent I never thought of doing that, thanks, I'll have a go and
> >> see if it works out. :)
>
> >> On May 6, 9:27 am, Phil Haeusler <philhaeus...@gmail.com> wrote:
>
> >>> Hi Barry
>
> >>> Have your empty Application.cfc extends your base on and then override
> >>> OnRequestEnd() with an empty method.  That will give you all the other
> >>> methods you want.
>
> >>> Or make use of the IsSOAPRequest() function and use it to ignore the
> >>> code you are not wanting to run for your web services.
>
> >>> Phil
>
> >>> On 6/05/11 7:02 AM, BarryC wrote:
>
> >>>> Hi,
>
> >>>> We have an application.cfc at the root of our website, it contains a
> >>>> function OnRequestEnd() that does some stuff at the end of page
> >>>> generation, but this seems to get called for our web service files.
>
> >>>> I have a web service in a cfc file in a sub-folder within the site,
> >>>> but in our logs we get error messages when web services are called,
> >>>> the error is an empty string, but it gives the file and line number
> >>>> the error is coming from which shows it is our OnRequestEnd() function
> >>>> when web services are called.
>
> >>>> So our structure looks kind of like this;
>
> >>>> /webroot/
> >>>> Application.cfc
> >>>>     /subfolder/
> >>>>         /service/
> >>>>               webservice.cfc
>
> >>>> Is there a way to get the web services to ignore or somehow override
> >>>> the OnRequestEnd() function? I put an Application.cfc file into the
> >>>> service/ folder and created an empty OnRequestEnd() function but it
> >>>> seems that the other functions we have in our root Application.cfc no
> >>>> longer get called either such as OnRequestStart().
>
> >>>> We're on Coldfusion 9.
>
> >>>> Thanks
> >>>> Barry
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "cfaussie" group.
> > To post to this group, send email to cfaussie@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > cfaussie+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/cfaussie?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.

Reply via email to