Using CURL to invoke web service
Posted by Vivek on February 10, 2013
CURL is an interesting tool that provides command line option to send requests over HTTP/ HTTPS. It is a handy tool when there is a requirement to send requests in bulk or through a scheduled job using scripts.
To invoke a service using CURL, you just need to create web service request, place it in a directory and run curl command as a client. For example, to send binary data using CURL:
curl –data-binary @MySOAPRequest.xml http://<host>:<port>/MyService
There are various command line options. A comprehensive list and exit codes can be found here: http://curl.haxx.se/docs/manpage.html
You can download CURL binaries from – http://curl.haxx.se/download.html
After downloading, make sure that you add CURL to the PATH environment variable.
If there is a need to execute some security functiona, download OpenSSL and place libssl32.dll file into the CURL directory.