OpenVMS Source-Code Demos

BUILD_SIMPLE_SERVICE_STEP1_COMMON.COM

$!======================================================================
$! script: build_SIMPLE_SERVICE_step1_common.com
$! author: Neil Rieck
$! notes : 1) a script to build a gSOAP application
$!======================================================================
$ set on						!
$ service  = "simple_service"				! change as required
$ wsdl2h   :== $gsoap$root:[000000.bin]wsdl2h.exe	!
$ soapcpp2 :== $gsoap$root:[bin]soapcpp2.exe		!
$ say      :== write sys$output				!
$ ask      :== inquire /nopunct				!
$!
$ p1 = service + ".wsdl"				!
$ p2 = service + "_gsw.h"				! "gsw" means created by tool "gsoap wsdl2h"
$ say "================================================="
$ say "phase 1 (read .wsdl, write .h)"
$ say "tool   : wsdl2h"
$ say "service: ",service
$ say "read   : ",p1
$ say "write  : ",p2
$ say "================================================="
$ ask choice "continue (n/Y) "
$ if choice .eqs. "N" then exit
$ say "-i-opening wsdl: ", p1				!
$!
$! some wsdl2h options:	"-c" want 'c' only
$!			"-d" want DOM capabilities
$!	 		"-s" no std library
$!			"-?" view help
$!			"-v" verbose
$! c-only, DOM, no STL code (eg. no std::string and no std::vector)
$!
$!wsdl2h "-c" "-d" "-s"      "-o" 'p2' 'p1' "-I"gsoap$root:[include],gsoap$root:[import]
$ wsdl2h "-c" "-d" "-s"      "-o" 'p2' 'p1'
$ say "================================================="
$ say "phase 2 (read .h)"
$ say "tool       : soapcpp2"
$ say "service    : ",service
$ say "read       : ",p2
$ say "write files: ",service,"_gsc_*"			! "gsc" means "gsoap common"
$ say "           : lots of xml stuff (optional)"
$ say "================================================="
$ ask choice "continue (n/Y) "
$ if choice .eqs. "N" then exit
$!--------------------------------------------------------------
$! switches:
$! -c	c-only
$! -S	server-side only
$! -C	client-side only
$! -1	SOAP-1.1 only
$! -2	SOAP-1.2 only
$! -i	generate service proxies and objects inherited from soap struct
$! -I	use path(s) for #import
$! note: by leaving out "-1" and "-2", you can support both. The client determines which one by sending old/new namespace
$!--------------------------------------------------------------
$!soapcpp2 "-c" "-S" -1                                        'p2'	! "C", server only, soap-11 only
$!soapcpp2 "-c" "-S" -2                                        'p2'	! "C", server only, soap-12 only
$!soapcpp2 "-c" "-S"                   "-I"gsoap$root:[import] 'p2'	! "C", server only
$ soapcpp2 "-c" "-p"'service'"_gsc_"   "-I"gsoap$root:[import] 'p2'	! "C"
$ say "==========================================================="
$ exit								!