Chapter to be updated.
This module provides base routines and data structures used throughout the rest of the GROWL library. For convenience we will also describe in this chapter the procedure used to create the various WSDL and XML files, headers and code stubs which will appear in the $(GROWL)/include directory.
Public calls: none
Public modules: libbase.a, libgrowl.a
Other modules required: gSOAP v2.1.4
Origin: Hand-Knitted Software, R.J. Allan, CCLRC Daresbury Laboratory
Conditions on external use: Standard, see separate chapter
This module is used by including the $(GROWL)/lib/libgrowl.a library or the library $(GROWL)/Base/lib/libbase.a. It is not used on its own and there are no callable procedures. It is included in the makefiles for the other user packages.
A sample of the $(GROWL)/include/growl_namespaces.h file which lists the remote methods is shown here:
[frame=single] //gsoap Resources service name: Growl //gsoap Resources schema namespace: http://InfoPortal/Resources int Resources__xmlDescription(char *xmlDescriptionRequest, char **xmlDescriptionResponse); int Resources__mdsLast(char *mdsLastRequest, char **mdsLastResponse); int Resources__xmlAll(char **mdsAllResponse); //gsoap hpcportal service name: Growl //gsoap hpcportal schema namespace: http://HPCPortal/Authentication int hpcportal__get_delegation(char *uid, char *passPrase, int ttl, char *oldId, char **sessionId); int hpcportal__test_delegation(char *oldId, char **sessionId); int hpcportal__rm_delegation(char *oldId, char **response); int hpcportal__job_run(char *sessionId, char *target, char *directory, char *environment, char *executable, char *arguments, char **response); //gsoap R service name: Growl //gsoap R schema namespace: http://R/R int R__testR(char *input1, char *input2, char **testRResponse);
This file is processed by the gSOAP compiler to create a WSDL file, XML files with sample request and result strings for all methods and code stubs and headers required to build the rest of the library.
This is achieved simply by the command
$(GSOAPDIR)/soapcpp2 -c growl_namespaces.h
Please bear in mind that there is no publish-discover mechanism yet in GROWL as there is in some other Web service frameworks, so remote method information is hard coded like this. We are reviewing the use of a local UDDI registry to make this more flexible [#!uddi!#].
[frame=single] #include "growl.h" #include "soapH.h" #include "Growl.nsmap"
The makefile simply builds a namaspace map and associated structure required in the other modules. It is built separately to avoid duplicate entries in the libgrowl.a libary.
A separate header file $(GROWL)/include/growl.h is provided for convenience. It contains advance declarations of all the local GROWL library routines which are callable by the user. A sample is shown:
[frame=single] # ones from InfoPortal #include 'growl_resources.h' # ones from HPCPortal #include 'growl_authentication.h' #include 'growl_jobs.h' # ones from R #include 'growl_r.h'
Each included file is for a specific set of functions which share a common server endpoint. This allows a certain amount of configuration as the server can be easily specified at compile time. The following example shows the growl_r.h file with the single remote test method testR.
[frame=single] // SOAP endpoint for R Web service despatcher #define growl_server "http://tardis.dl.ac.uk/R/SOAP/modules/GROWL.cgi" int testR(char *input1, char *input2, char **result);
Rob Allan 2009-11-10