Thank you,
It was the $xwiki.ipresolver that caused me some problems.
So basically, if I create my own plugin called BarFooPlugin and if I
put BarFooPluginAPI.class in
webapps/xwiki/WEB-INF/classes/com/xpn/xwiki/plugin/barfoo and register
it in the xwiki.cfg file, I will be able to access its methods via
$xwiki.barfoo.myWonderfulMethod(), right?
On 23/03/06, Robin Fernandes <rewbs.soal(a)gmail.com> wrote:
Hi,
Try something like this:
##-------------------------------
#set($url="www.soal.org")
#set($ip=$xwiki.ipresolver.getIP($url))
IP for $url is $ip.<br/>
Resolved to country:
$xwiki.ipresolver.resolveIP("myKey", $ip).getCountry()
##-------------------------------
Somehow this seems to work as is, even though "myKey" probably isn't a
valid key for this webservice. :)
The $xwiki.ipresolver.resolveIP("myKey", $ip) call returns a
com.cdyne.ipresolver.IPInformation object for which I can't find the
API doc anywhere, but this page gives an idea of what fields to
expect:
http://ws.cdyne.com/ip2geo/ip2geo.asmx?op=ResolveIP
Hope that's of some help,
Robin
On 23/03/06, Julien Bourdon <bourdux(a)gmail.com> wrote:
Hi all!
I'm a newbie in XWiki application development and I'm trying to make
sense of these plugins. I tried with the IPResolverPlugin which looks
quite simple but I don't know how to access it from the Velocity
context. Is this possible at least?
Thanks a lot!
--
_ _ Julien Bourdon
(o)(o)--.
http://purl.org/net/JulienBourdon
\../ ( ) self isAddictedTo:(#Squeak&#linux)
m\/m--m'`--. ^true
--
You receive this message as a subscriber of the xwiki-users(a)objectweb.org mailing list.
To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws
--
You receive this message as a subscriber of the xwiki-users(a)objectweb.org mailing list.
To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws
--
_ _ Julien Bourdon
(o)(o)--.
http://purl.org/net/JulienBourdon
\../ ( ) self isAddictedTo:(#Squeak&#linux)
m\/m--m'`--. ^true