OpenVMS Source-Code Demos

BUILD_SIMPLE_SERVICE_STEP3_CLIENT.COM

$!========================================================================
$! title  : build_SIMPLE_SERVICE_step3_client.com
$! purpose: builds the server app
$! author : Neil Rieck
$! note   : wrapper.c is only used to fire 'server apps' from Apache
$!========================================================================
$ wsdl2h   :== $gsoap$root:[000000.bin]wsdl2h.exe		!
$ soapcpp2 :== $gsoap$root:[bin]soapcpp2.exe			!
$ say      :== write sys$output					!
$ ask      :== inquire/nopunc					!
$ flavor   = "CLIENT"						!
$ 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 "==========================================================="
$!
$!	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						!
$ 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 "==========================================================="
$!	/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
$!------------------------------------------------
$!	link
$!------------------------------------------------
$do_link:
$!	gsoap$root:[lib]gsoapdbg.olb/lib	<<<--- contains debugging code
$!	gsoap$root:[lib]gsoap.olb/lib		<<<--- no debugging code
$ say "Linking"
$	link/share='myfsp'.exe				-
	'myfs'.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
$!       gsoap$root:[lib]gsoap.olb/lib
$!-------------------------------------------------
$ path == f$environment("DEFAULT")
$ yada == "$" + path + myfsp +".EXE"
$!-------------------------------------------------
$ say "defined 'yadaC' so you can test this client app from DCL"
$ show sym yadac
$ say "example: yadac param1 param2 param3"