ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul King <pa...@asert.com.au>
Subject Re: ant+soap+ssl
Date Tue, 16 Mar 2010 10:13:21 GMT

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


Mime
View raw message