You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Gilbert Rebhan <an...@schillbaer.de> on 2010/03/15 22:07:40 UTC

ant+soap+ssl

Hi,

i want to access a IBM DataPower xml management interface
from within ant to send status and configuration requests
via soap messages.
Has anyone experience with such a setting ?

@IBM site only has an article that uses curl and openssl
as external commands called with exec from ant =
http://www.ibm.com/developerworks/websphere/library/techarticles/0904_rasmussen/0904_rasmussen.html
But i prefer a solution, where all tasks are running in jvm,
there are java apis for soap, f.e. JAX-WS 2.0 or Apache Axis

Are there any ant tasks in the wild for that purpose ?
Need to know which tools will do the job.
Some keywords =
http post, base64 encoding, soap, ssl, basic authentication

Any hints on that ?


Regards, Gilbert



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


Re: ant+soap+ssl

Posted by Paul King <pa...@asert.com.au>.
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


Re: ant+soap+ssl

Posted by Paul King <pa...@asert.com.au>.
Don't know if this helps or not:

<?xml version="1.0" encoding="UTF-8"?>
<project name="SOAP example" basedir=".">
     <property environment="env"/>
     <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()
         result = proxy.CelsiusToFahrenheit(0)
         new AntBuilder().echo "Help, I'm freezing at ${result} degrees Fahrenheit"
     </groovy>
</project>

I was using Groovy 1.7.0.

Cheers, Paul.

On 16/03/2010 8:01 AM, Gilbert Rebhan wrote:
> -------- Original Message  --------
> Subject: Re: ant+soap+ssl
> From: Paul King<pa...@asert.com.au>
> To: Ant Developers List<de...@ant.apache.org>
> Date: 15.03.2010 22:29
>
>>
>> I'd probably use Groovy or whatever your favorite JVM scripting language
>> is.
>> Groovy-WS is the library you would need. It uses Apache CXF under the
>> covers.
>> If you have trouble getting started I can try to find one of my existing
>> examples that does something similar.
>>
>> Cheers, Paul.
>
> Hi, Paul
>
> Thanks for your quick reponse.
> Thought of groovy already, because i'm a great fan of (j)ruby and both
> have similarities, but have never tried groovy seriously before.
> Also i have no further experience with webservices, i know the theory
> and some basics, but have not really dealt with it.
> Groovy is on my list for years, so maybe now is the time, any examples
> are appreciated !
>
>
> Regards, Gilbert
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>


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


Re: ant+soap+ssl

Posted by Gilbert Rebhan <an...@schillbaer.de>.
-------- Original Message  --------
Subject: Re: ant+soap+ssl
From: Paul King <pa...@asert.com.au>
To: Ant Developers List <de...@ant.apache.org>
Date: 15.03.2010 22:29

> 
> I'd probably use Groovy or whatever your favorite JVM scripting language
> is.
> Groovy-WS is the library you would need. It uses Apache CXF under the
> covers.
> If you have trouble getting started I can try to find one of my existing
> examples that does something similar.
> 
> Cheers, Paul.

Hi, Paul

Thanks for your quick reponse.
Thought of groovy already, because i'm a great fan of (j)ruby and both
have similarities, but have never tried groovy seriously before.
Also i have no further experience with webservices, i know the theory
and some basics, but have not really dealt with it.
Groovy is on my list for years, so maybe now is the time, any examples
are appreciated !


Regards, Gilbert


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


Re: ant+soap+ssl

Posted by Paul King <pa...@asert.com.au>.
I'd probably use Groovy or whatever your favorite JVM scripting language is.
Groovy-WS is the library you would need. It uses Apache CXF under the covers.
If you have trouble getting started I can try to find one of my existing
examples that does something similar.

Cheers, Paul.

On 16/03/2010 7:07 AM, Gilbert Rebhan wrote:
> Hi,
>
> i want to access a IBM DataPower xml management interface
> from within ant to send status and configuration requests
> via soap messages.
> Has anyone experience with such a setting ?
>
> @IBM site only has an article that uses curl and openssl
> as external commands called with exec from ant =
> http://www.ibm.com/developerworks/websphere/library/techarticles/0904_rasmussen/0904_rasmussen.html
> But i prefer a solution, where all tasks are running in jvm,
> there are java apis for soap, f.e. JAX-WS 2.0 or Apache Axis
>
> Are there any ant tasks in the wild for that purpose ?
> Need to know which tools will do the job.
> Some keywords =
> http post, base64 encoding, soap, ssl, basic authentication
>
> Any hints on that ?
>
>
> Regards, Gilbert
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>


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


Re: ant+soap+ssl

Posted by Gilbert Rebhan <an...@schillbaer.de>.
-------- Original Message  --------
Subject: Re: ant+soap+ssl
From: Antoine Levy-Lambert <an...@gmx.de>
To: ant@schillbaer.de
Date: 16.03.2010 02:12

> > Hi,
> >
> > in fact there is a document at this location
> >
http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.javadoc.doc/web/mbeanDocs/DataPowerMgrMBeanDescriptor.html
> > showing the MBean API.

Thanks Paul and Antoine for all the hints,tips and sugestions !!
Didn't know about that MBean api, in fact i never heard of DataPower
before ;-) IBM bought it just some years ago and now starts
to push it

Still searching for the right tools i'm curious about
the lack of examples in that direction (ant+soap+ssl..)


Regards, Gilbert

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


Re: ant+soap+ssl

Posted by Gilbert Rebhan <an...@schillbaer.de>.
-------- Original Message  --------
Subject: Re: ant+soap+ssl
From: Antoine Levy-Lambert <an...@gmx.de>
To: ant@schillbaer.de
Date: 16.03.2010 02:12

> > Hi,
> >
> > in fact there is a document at this location
> >
http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.javadoc.doc/web/mbeanDocs/DataPowerMgrMBeanDescriptor.html
> > showing the MBean API.

Thanks Paul and Antoine for all the hints,tips and sugestions !!
Didn't know about that MBean api, in fact i never heard of DataPower
before ;-) IBM bought it just some years ago and now starts
to push it

Still searching for the right tools i'm curious about
the lack of examples in that direction (ant+soap+ssl..)


Regards, Gilbert

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


Re: ant+soap+ssl

Posted by Antoine Levy-Lambert <an...@gmx.de>.
Hello Gilbert,

Does IBM not provide a JMX java api for DataPower ? I have never used
DataPower, but I have created ant tasks wrapping around the JMX APIs of
WebSphere (to do tasks like deploying a ear file or restarting servers
or clusters).

It could be similar. What I did is only working in an IBM JVM though,
and the classpath setup is special (you have to load all the IBM
libraries that you use and your custom ant task on the system
classloader or something like that when you use SSL to connect).

Regards,

Antoine

Gilbert Rebhan wrote:
> Hi,
>
> i want to access a IBM DataPower xml management interface
> from within ant to send status and configuration requests
> via soap messages.
> Has anyone experience with such a setting ?
>
> @IBM site only has an article that uses curl and openssl
> as external commands called with exec from ant =
> http://www.ibm.com/developerworks/websphere/library/techarticles/0904_rasmussen/0904_rasmussen.html
> But i prefer a solution, where all tasks are running in jvm,
> there are java apis for soap, f.e. JAX-WS 2.0 or Apache Axis
>
> Are there any ant tasks in the wild for that purpose ?
> Need to know which tools will do the job.
> Some keywords =
> http post, base64 encoding, soap, ssl, basic authentication
>
> Any hints on that ?
>
>
> Regards, Gilbert
>
>
>   


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