README for NetScaler API gSOAP example
--------------------------------------

The example code that accompanies this file uses gSOAP to communicate
with Netscaler, using XML/SOAP.


SOFTWARE REQUIREMENTS
.....................
* C compiler
* gmake (optional on Windows).


INSTALLATION INSTRUCTIONS
.........................

1. Extract files from the archive.  It contains, among other files:
	* gSOAP WSDL processor (wsdl2h)
	* gSOAP SOAP compiler (soapcpp2) and run-time (stdsoap2.c)
	* WSDL filter (filterwsdl)
	* the sample sources

2. Customize the Makefile (or makesamp.bat on Windows), setting the variables
  at the top to match your environment.

3. 	In the directory where you extracted these files, type:

		gmake [ENTER]

	Or, on windows:

		makesamp [ENTER]

	This does the following:

	* Obtain NSConfig.wsdl and NSStat.wsdl from the NetScaler.

	  The wsdl file for the API is located on the Netscaler device,
	  at //Netscaler/api/NSConfig.wsdl.

	* Create a subset of NSConfig.wsdl.

	  The full NSConfig.wsdl file is very large - it can take up to five minutes
	  or more to process it.  This can be avoided by creating a custom subset
	  of the WSDL, containing just the needed methods.  makesamp.bat does this
	  by downloading the full WSDL as NSConfig.fullwsdl and then filtering:

		filterwsdl NSConfig.fullwsdl "addservice" "setservice" "showservice" "bindlbmonitor" "addlbvserver" "bindlbvserver" "showlbvserver" "rmservice" "rmlbvserver" "savensconfig" > NSConfig.wsdl

	* Generate stubs from the WSDL files.

	  Stubs are generated by first creating a C header file from the WSDL with wsdl2h
	  and then running that file through soapcpp2 to create the client stubs (in file
	  soapClient.c).  wsdl2h and soapcpp2 are part of the gSOAP toolkit.

	* Compile the sample and stub sources into setConfig, getConfig, and
	  rmConfig executables.


RUNNING THE EXAMPLES
....................

The parameters to all of the examples are :
	<NS IP> <username> <password>

setConfig uses the Netscaler API to:
	* log in to Netscaler
	* add a service
	* bind a monitor
	* add a vserver
	* bind a service to a vserver
	* save configuration
	* log out

getConfig fetches information about all configured lb vservers,
and prints selected information about each one.

rmConfig removes all of the configuration that was created by setConfig.c.

Additional documentation is available as inline comments in the sample sources.

