OpenVMS Source Code Demos

BUILD_SIMPLE_SERVICE_STEP2_SERVER.COM

$!========================================================================
$! title  : build_SIMPLE_SERVICE_step2_server.com
$! purpose: builds the server app
$! author : Neil Rieck
$!========================================================================
$ wsdl2h   :== $gsoap$root:[000000.bin]wsdl2h.exe		!
$ soapcpp2 :== $gsoap$root:[bin]soapcpp2.exe			!
$ say      :== write sys$output					!
$ ask      :== inquire/nopunc					!
$ flavor   = "SERVER"						!
$ service  = "SIMPLE_SERVICE"					!
$ myfsp     = service +"_"+ flavor				! my file spec (partial)
$!
$ if p1 .eqs. ""						!
$ then								!
$	say "-w- no P1 provided"
$	say "-d- directory:"					!
$	dir/col=1/nohead/notrail 'myfsp'_*.c			!
$	ask choice "Version (default=abort) "			!
$	choice = f$edit$(choice,"COLLAPSE")			!
$	if choice .eqs. ""					!
$	then							!
$		say "-i-no version given so aborting"		!
$		exit						!
$	endif							!
$	myfs = myfsp +"_"+ choice				!
$ else								!
$	myfs = myfsp +"_"+ p1					!
$ endif								!
$ say "-i-compiling ", myfs,".c"				!
$ say "==========================================================="
$ set ver							!
$!
$!	note: the build scripts provided by Brett Cameron (in the gSOAP sample directory) say to use HP-C
$!
$ cc/names=(as_is,shortened)/prefix=all/float=ieee/ieee=denorm	-
        /warning=(disable=EMPTYSTRUCT)				-
        /include=gsoap$root:[include]				-
	'myfs'.c						!
$ set nover							!
$ say "==========================================================="
$ ask junk "Continue with full build? (y/N/Link) "		!
$ if junk .eqs. "L"    then goto do_link
$ if junk .eqs. "LINK" then goto do_link
$ if junk .nes. "Y"    then exit
$!
$!////////////////////////////////////////////////////////////////
$! this command:
$!	soapcpp2 "-x" "-c" calc.h
$! will generate these files:
$!	CALC.NSMAP  CALC.WSDL  NS.XSD SOAPC.C  SOAPCLIENT.C
$!	SOAPCLIENTLIB.C  SOAPH.H  SOAPSERVER.C  SOAPSERVERLIB.C
$!	SOAPSTUB.H
$! so I guess it is meant for use "without a WSDL". Likewise,
$! the tool "WSDL2H" produces the files above
$!////////////////////////////////////////////////////////////////
$ say "==========================================================="
$ set ver
$!	/define=(WITH_DOM)		-
$ cc/names=(as_is,shortened)/prefix=all/float=ieee/ieee=denorm -
        /warning=(disable=EMPTYSTRUCT) 	-
        /include=gsoap$root:[include]	'service'_gsc_c.c
$ cc/names=(as_is,shortened)/prefix=all/float=ieee/ieee=denorm -
        /warning=(disable=EMPTYSTRUCT) 		-
        /include=gsoap$root:[include]	'service'_gsc_'flavor'.c
$ cc/names=(as_is,shortened)/prefix=all/float=ieee/ieee=denorm -
        /warning=(disable=EMPTYSTRUCT) 		-
        /include=gsoap$root:[include]	'service'_gsc_'flavor'lib.c
$ cc/names=(shortened)/prefix=all/float=ieee/ieee=denorm -
        /warning=(disable=EMPTYSTRUCT)		-
	/define=(MOD_GSOAP,__NO_HTTPD_H__)	-
        /include=(gsoap$root:[include])  'service'_wrapper.c
$!------------------------------------------------
$!	link
$!------------------------------------------------
$do_link:
$!	gsoap$root:[lib]gsoapdbg.olb/lib	<<<--- contains debugging routines
$!	gsoap$root:[lib]gsoap.olb/lib		<<<--- no debugging routines
$!	gsoap$root:[lib]gsoapdom.olb/lib	<<<--- optional DOM routines
$ say "Linking"
$	link/share='myfsp'.exe				-
	'myfs'.obj,					-
	'service'_wrapper.obj,				-
	'service'_gsc_'flavor'.obj,			-
	'service'_gsc_c.obj,				-
        sys$input/opt
	gsoap$root:[lib]gsoap.olb/lib
	gsoap$root:[lib]gsoapdom.olb/lib
    GSMATCH=LEQUAL,1,0
    case_sensitive=YES
    SYMBOL_VECTOR=(APACHE_INIT_SOAP_INTERFACE=PROCEDURE)
$!-------------------------------------------------
$ path == f$environment("DEFAULT")
$ yada == "$" + path + myfsp +".EXE"
$!-------------------------------------------------
$ say "defined 'yada' so you can test this app from DCL"
$ show sym yada
$ say "example: yada 8123 (to listen on port 8123)"
$ say "or consider this: @SYS$STARTUP:APACHE$STARTUP GRACEFUL"
$ say "or this: @SYS$STARTUP:APACHE$SHUTDOWN"
$ say "followed by this: @SYS$STARTUP:APACHE$STARTUP RUN"
$ say "or this: ed APACHE$COMMON:[000000.CONF]HTTPD.CONF"