Groovy Example Without Using Wiki Macro Bridge

Last modified by Site Administrator on 2012/04/01 22:57

Example originally inspired by IBM DeveloperWorks. Note wiki-macro-bridge version of this code - WeatherMacroTest - has an error in that it cannot call the groovy macro successfully more than once in a document. Just to make sure that isn't an underlying groovy issue, but more likely a problem with the macro bridge, note the code itself displays its results after multiple calls within the same document.

Parameter zip=""

Failed to execute the [groovy] macro. Click on this message for details.
Note: if you see an error message from "Yahoo! Weather" above, then groovy executed succefully, however, correct usage requres request.zip parameter, e.g 92625 92660 10001...

http://weather.yahooapis.com/forecastrss?p=90001

Failed to execute the [groovy] macro. Click on this message for details.

http://weather.yahooapis.com/forecastrss?p=94131

Failed to execute the [groovy] macro. Click on this message for details.
Tags:
Created by Site Administrator on 2009/08/03 03:39
    
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 6.4.4 - Documentation