I assume that you are only interested in web services clients?
Option 1
Calling a web service using Axis2 REST support , for example:
http: // localhost: 8080 / axis2 / services / MyService / myOperation? param1 = one & param2 = two
Option 2
Use SOAPUI . It can generate SOAP messages for you by reading your WSDL service. My client testers have made extensive use of this with a very broad understanding of web services technologies. An impressive tool.
Option 3
Groovy client (same approach for other JVM-based languages)
Use the wsdl2java tool to create a client stub class for the Shakespeare web service:
generate.sh
$AXIS2_HOME/bin/wsdl2java.sh -d adb -s -o build -uri http:
GetSpeech.groovy
// Dependencies // ============ import com.xmlme.webservices.ShakespeareStub @Grapes([ @Grab(group='org.apache.axis2', module='axis2-kernel', version='1.5.1'), @Grab(group='org.apache.axis2', module='axis2-adb', version='1.5.1'), @Grab(group='org.apache.axis2', module='axis2-transport-local', version='1.5.1'), @Grab(group='org.apache.axis2', module='axis2-transport-http', version='1.5.1'), @Grab(group='xerces', module='xercesImpl', version='2.6.2'), @GrabConfig(systemClassLoader=true) ]) // Main program // ============ def stub = new ShakespeareStub() // Request payload def request = new ShakespeareStub.GetSpeech() request.setRequest("Friends, romans, countrymen") // Send request response = stub.getSpeech(request) println response.getGetSpeechResult()
Use the -cp parameter to add the generated code to the script class classpath
groovy -cp build/build/classes GetSpeech
Mark O'Connor Apr 01 '10 at 23:45 2010-04-01 23:45
source share