GT 4.2.0 Samples for C WS Core

Table of Contents

1. Counter Client

1. Counter Client

The Counter Client consists of a set of client programs that can be run to interact with the CounterService by creating new counter resources, calling add on those resources, and finally destroying those resources. The reference to each resource (the EPR) is stored in a file.

The sample is a good way to get going fast with C WS-Core client programming, as the user does not have to install/deploy the CounterService—it is installed by default in GT4 containers.

  • create_count.c - this program invokes the createCounter operation on the CounterService and stores the resulting EPR that points to the new counter resource in a file.

  • add_count.c - this program reads the EPR file and invokes the add operation on the resource (of the CounterService) pointed to by the EPR.

  • destroy_count.c - this program reads the EPR file and destroys the resource pointed to by the EPR. Once the resource is destroyed, the EPR is no longer valid, so the file is removed.

  • Makefile.example - a Makefile to use for building the counter samples.

Building the Example

Environment variables

GLOBUS_LOCATION
Path where the Globus Toolkit 4.2.0 is installed.
GLOBUS_FLAVOR_NAME
GPT flavor to build the samples with (e.g. gcc32dbg).
  1. Generate makefile-header

    globus-makefile-header --flavor=$GLOBUS_FLAVOR_NAME globus_c_wsrf_sample_counter_bindings > makefile_header
  2. Build the examples

    make -f Makefile.example