CFLib.org – Common Function Library Project

IsViaSoap()

Last updated August 28, 2003

author

Ben Forta

Version: 1 | Requires: CF6 | Library: UtilityLib

Description:
Returns true if the curent request is SOAP based.

Return Values:
Returns a boolean.

Example:

<cfoutput>Is this request a Soap request? #isViaSoap()#</cfoutput>

Parameters:

No arguments.

Full UDF Source:

<!---
 Returns true if the curent request is SOAP based.
 
 @return Returns a boolean. 
 @author Ben Forta (ben@forta.com) 
 @version 1, August 28, 2003 
--->
<cffunction name="isViaSoap" returnType="boolean" output="no">
   <!--- Get current message context --->
   <cfset var ctx = createObject("java", "org.apache.axis.MessageContext").getCurrentContext()>
	
   <!--- Invoke (cheap) method to see if it is null --->
   <cftry>
      <cfset ctx.isclient()>
      <cfcatch type="any">
         <cfreturn false>
      </cfcatch>
   </cftry>

   <cfreturn true>

</cffunction>
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Kevin Cotton added
date2ExcelDate
May 5, 2016

Raymond Camden added
CapFirst
April 25, 2016

Chris Wigginton added
loremIpsum
January 18, 2016

Gary Stanton added
calculateArrival...
November 19, 2015

Sebastiaan Naafs - van Dijk added
getDaysInQuarter
November 13, 2015

Created by Raymond Camden / Design by Justin Johnson