Grokbase Groups Ant dev March 2010
FAQ
Here's another version showing setting properties:

<?xml version="1.0" encoding="UTF-8"?>
<project name="SOAP example" default="main" basedir=".">
<property environment="env"/>
<property name="celsius" value="0"/>
<target name="main">
<taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy">
<classpath>
<fileset dir="${env.GROOVY_HOME}" includes="embeddable/groovy-all-*.jar,lib/ivy*.jar"/>
</classpath>
</taskdef>
<groovy>
@Grab(group='org.codehaus.groovy.modules', module='groovyws', version='0.5.1')
import groovyx.net.ws.WSClient
def url = 'http://www.w3schools.com/webservices/tempconvert.asmx?WSDL'
def proxy = new WSClient(url, this.class.classLoader)
proxy.initialize()
ant.echo "I'm freezing at ${properties.celsius} degrees Celsius"
properties.result = proxy.CelsiusToFahrenheit(properties.celsius)
</groovy>
<antcall target="results"/>
</target>
<target name="results">
<echo message="I'm freezing at ${result} degrees Fahrenheit"/>
</target>
</project>

Happy to answer more questions but they probably belong on some other list.

Cheers, Paul.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 6 | next ›
Discussion Overview
groupdev @
categoriesant
postedMar 15, '10 at 9:08p
activeMar 17, '10 at 7:49p
posts6
users2
websiteant.apache.org

2 users in discussion

Paul King: 3 posts Gilbert Rebhan: 3 posts

People

Translate

site design / logo © 2017 Grokbase