What color is your day?
With Boyzoid's Terrorist Threat Level web service topping a million hits this year, I thought I'd try my own aggregate version. This service blends your threat level, weather forecast, UV index, and a host of other color-based indicators to give you an overall forecast of your day based on ZIP code.
WSDL:
http://clearsoftware.net/soap/aggregateColor.cfc?WSDL
Sample Client:
<cfset wAggService = createObject("webservice", "http://clearsoftware.net/soap/aggregateColor.cfc?WSDL") />
<cfset result = wAggService.getForecast(form.zip) />
</cfif>
<cfparam name="form.zip" default="" />
<cfif isDefined("result")>
<cfoutput><h3>Forecast Result:</h3><p>#result#</p></cfoutput>
</cfif>
<cfform name="forecastForm" action="#cgi.script_name#">
<cfoutput>
ZIP code:
<input type="text" name="zip" value="#form.zip#" />
<input type="submit" value="Get Forecast" />
</cfoutput>
</cfform>
3 comments - Posted by Joe Rinehart at 10:58 AM - Categories: ColdFusion MX