Getting Started with Apollo
Introduction
This page lists the steps required to run the Apollo tutorial sample application, assuming that you have already
- installed Apollo binary distribution obtained by unzipping the zip file.
- installed Apache Tomcat or an another similar Web container.
- installed a recent version of Apache Ant and environment variable PATH includes its bin directory.
For simplicity, let us assume that everything runs on the same machine and Tomcat is configured to listen at the default HTTP port 8080. Also, we will refer to Tomcat home directory (say, c:\jakarta-tomcat-4.1.30) by TOMCAT_HOME and Apollo home directory (say, c:\apollo-incubating-1.0-alpha3-SNAPSHOT) by APOLLO_HOME.
Getting Started Steps
Carry out the following steps to see your Apollo installation in action:
-
Deploy the WSRF webapp to Tomcat: Copy directory tree
APOLLO_HOME/webapps/wsrf to TOMCAT_HOME/webapps directory.
At this stage, if you start Tomcat and point your browser to
http://localhost:8080/wsrf, you should
be able to see the Apache-Axis welcome page (Yes, WSRF webapp is just Axis webapp and
some additional stuff). Clicking on
View the list of
deployed Web services should show two default
Axis services -- 'AdminService' and 'Version'.
-
Property changes for Tomcat installation and HTTP Proxy: Change
directory to APOLLO_HOME/docs/tutorial and edit
build.properties file, following the instructions in the file.
-
Generate Java code from WSDL: Issue the command
ant generate. Successful execution of this command
will create a bunch of directories and files under generated sub-directory.
-
Supply Application specific code: Some of the generated source files
need application specific code to be supplied. Change directory to
generated/filesystem/src/java/org/apache/ws/resource/example/filesystem, and
edit files FilesystemHome.java, FilesystemResource.java and
FilesystemService.java
as per the embedded instructions. Just do a Copy-Paste of code fragments available in
directory APOLLO_HOME/docs/tutorial/method_impls. Which fragment goes
in which
source file can be inferred from code fragment filenames.
The code fragments use additional classes. To get the source files for these classes at appropriate place, copy sub directories backend and callback from APOLLO_HOME/docs/tutorial/src/example/filesystem to APOLLO_HOME/docs/tutorial/generated/filesystem/src/java/org/apache/ws/resource/example/filesystem.
-
Compile and deploy filesystem service: Change directory to
APOLLO_HOME/docs/tutorial/generated/filesystem and issue the
command: ant compile deploy.
-
Verify service deployment: Restart Tomcat and point your browser
to
http://localhost:8080/wsrf/servlet/AxisServlet. You should see the additional
service
'filesystem'. You should be able to drill down into the link labelled 'wsdl' and retrieve
the WSDL document of the newly deployed WSRF service.
-
Perform WSRF operations: Change directory to
APOLLO_HOME/docs/tutorial
directory and issue the following command:
ant -f soapclient.xml -Durl=http://localhost:8080/wsrf/services/filesystem -Dxml=requests/GetMultipleResourceProperties.soap
You should also try other request messages kept under requests sub-directory.
For a more detailed description about what happens behind the scene at each step, refer to the Apollo Tutorial.