When you have your Web service application configured correctly and running on the GWS,
you are now ready to package the files required to deploy it as a Web service on the Genero
Application Server.
For the purposes of this quick start, you can use the configuration files created for the
Calculator Web service
, see
Configure a Web service.
-
Update the Web service configuration file, i.e.Calculator.xcf
<PATH> element as follows:
<PATH>$(res.deployment.path)/server</PATH>
-
Create a new directory where you will archive the Web service source files (e.g. you can name
it "calculator_deploy") and in it create a sub-directory called
"server"
.
-
Copy the application source files to the archive directory as follows:
-
Copy all the files from FGLASDIR/demo/WebServices/calculator/server to the
server subdirectory in your archive directory
-
Copy the updated Web service configuration file, Calculator.xcf, to the
server subdirectory.
-
Create a MANIFEST file and save it with the name "MANIFEST" (without extension) to the
directory that contains the application source files. For more information see The MANIFEST file.
<MANIFEST>
<DESCRIPTION>This archive contains one service</DESCRIPTION>
<SERVICE xcf="Calculator.xcf" />
</MANIFEST>
-
Create an archive (gar) file to deploy your application with the following
steps:
-
From the command line, navigate to the archive directory that contains the application source
files AND the MANIFEST file.
-
Enter the command: fglgar --gar.
A Genero archive (gar) file is created in your current directory
that has the same name as the directory.
Test the deployment on your standalone dispatcher.
-
To deploy your (gar) file locally on your GAS, unpack its files in your
$(res.deployment.path) deployment directory.
To deploy an archive named calculator_deploy.gar:
gasadmin --deploy-archive calculator_deploy.gar
A subdirectory is created in your $(res.deployment.path) directory
identified by the archive name and the date and time deployed, e.g.
calculator_deploy-20150423-130838. All the files contained in archive
(gar) are placed in the directory.
-
To enable your deployed Web service locally on your GAS, perform the following steps:
To list all deployed archives:
gasadmin --list-archives
To enable the archive, reference it by its archive name:
gasadmin --enable-archive calculator_deploy
This enables
the Web server by copying the configuration file to the $(res.path.services)
directory.
To test the deployed Web service, start the Calculator server and run a client
application that uses the service by performing the following steps:
-
Start the standalone dispatcher from the command line, for details about starting
httpdispatch see Dispatcher: httpdispatch.
-
To start the Calculator web service, in a browser tab enter the address of the web service
application:
http://localhost:6394/ws/r/Calculator
-
To interact with the Calculator service and show it is working, open another browser tab and
enter the address of the demo applications:
http://localhost:6394/ua/r/gwc-demo
-
In the Topic tree, navigate to . Double-click on the demo Calculator Soap 1.2.
The Web Services URL dialog appears.
-
From the drop down menu select one of the following options:
Click OK when finished
You should see a calculator screen and be able to interact with it. You have
successfully deployed a Web service.
The steps to configure and deploy a web service
on your own machine shown here, can be adapted for deployment on GAS
installation on other hosts.