mandag 18. juli 2011

Using soap webservices with curl

So I was in this situation where I was going to use a webservice that I didn't have any access to, since the service was located in a production like environment. What I did have was access to ssh to the server, so I found I could use the websevice like this in groovy;

def payload = ?
def user = ?
def host = ?
def response = "ssh ${user}@${host} curl -d \"${payload}\" -H \"Content-Type: text/xml\" ${wsUrl}".execute.text

That's a very short post from me :)
Copyright © >> /dev/null
Blogger Theme by BloggerThemes Design by