How to build clients

Sometimes you wish only to call Soaplab2 services, not to provide them. Of course, you may do it from the full Soaplab2 installation but you can also make it with less steps (for example, you do not need to know how to create services metadata and how to deploy services, you even do not need to run any special server).

This document describes how to install few internal Soaplab2 clients. Even though they cover the full functionality of Soaplab2 services, they are not the best user-friendly clients. Their main purpose is to test Soaplab2 servers, or to be used in batch scripts for running Soaplab2 services repeatedly.

For the real useful and fully user-supportive clients check these other documents:

Soaplab basic clients are installed and built by Ant. The details about built-time properties (however, none of them is mandatory for Soaplab2 clients) and few other Ant tricks are described in the main build guide.

Installing Soaplab2 clients

Once you have Soaplab2 in your directory, by default named soaplab2, type:
ant install-clients
And that's it.

Once finished, it suggests to use the basic Soaplab2 command-line client. In order to do it you need to know a URL of a Soaplab2 server - and you can call its services. Few examples (on Windows machines, change the slashes to backslashes):

build/run/run-cmdline-client -help
build/run/run-cmdline-client -host a.soaplab.server -la
build/run/run-cmdline-client -host a.soaplab.server -w -r -name classic.helloworld
build/run/run-cmdline-client -e http://a.soaplab.server:8080/soaplab2/services/classic.helloworld

Configuration of Soaplab2 clients

The command-line client shown above (and few others, as well) can use a client property file to define which Soaplab2 server to connect to. Having such client property file you save some command-line options.

The client property file is called, very imaginatively, a and should be put into any directory specified in the environment variable CLASSPATH. By default, the installation task of Soaplab2 clients creates this file from a template src/etc/config/ and puts it in the build/classes.

Or, you can put your properties into any file, for example the, and add a line to the file (in the Soaplab2 main directory): =
and then run:
ant config
Here is a simple example of my Soaplab client property file:
# ------------------------------
# where to find service/services
# ------------------------------
host = localhost
port = 8080

# ------------------------------
# how to access service/services
# ------------------------------

# protocol can be 'jaxws' or 'local' (and maybe more later)
protocol = local

# ------------------------------
# properties for batch testing
# ------------------------------
base.dir = @PROJECT_HOME@ = ${base.dir}/data
batch.test.file = ${base.dir}/data/defaultTests.cfg
batch.test.file = ${base.dir}/data/embossTests.cfg
emboss.home = /home/senger/Software/emboss

Last modified: Mon Feb 4 17:24:39 2008