Modgraph Consultants Limited.
NMRPredict 'cgi' client application.
This page was last updated on 19 May 2008.
- Overview. The main program 'nmrcgi.cgi' receives a 'cgi' GET type request from a web page and passes the request to the NMRPredict server acting as a client. It then formats the results as HTML tables.
-
You will need to download gSOAP. The makefile assumes GSOAPDIR is set up like this:
export GSOAPDIR=/home/mike/nmrpredict/soap/gsoap-linux-2.7
The great thing about gSOAP is that it generates .cpp or .c files which convert the structs and classes which define your interface into XML, handle sending it down the line, and then convert the XML back into classes at the other end.
Files provided:
- makefile - unix type makefile
- carboninfo.cpp, carboninfo.h - the next two files and their headers contain functions to help interpret the output.
- protoninfo.cpp, protoninfo.h
-
nmrcgi.cpp - the main program. Called by apache. It compiles to nmrcgi. Copy it to for cgi-bin directory.
cp nmrcgi /var/www/cgi-bin/nmrcgi.cgi
- nmrcgi.html - a simple web page to send the cgi GET request. I use '#' to delimit the MOL file. If you change this, change the program as well.
- nmrsoapif-403.h - copy this ...
- nmrsoapif-402.h -- or this ...
-
nmrsoapif.h ---- to this, depending on your server version. This is the gSOAP input file. It defines the protocol used. The makefile executes the gSOAP compiler. Mine looks like
/home/mike/nmrpredict/soap/gsoap-linux-2.7/soapcpp2 nmrsoapif.h
which generates the .cpp (or.c) files and header fiules necesary to call the protocol.
- cgiutil.cpp - cgi utilities.
Links: