GeoServer : CITE Testing From OWS5
This page last changed on Jun 24, 2008 by aaime.
This document will step through the process of installing GeoServer and testing it against the OGC WFS 1.1 and WCS 1.1.1 specifications.
The first step is to install GeoServer in your environment. These tests require the 1.7.x branch. At the time of writing, the latest version from that branch is 1.7.0-alpha1. You can download GeoServer 1.7.0-beta11, or just check the GeoServer's Latest version page (you might want to look into the Stable page as well, after 1.7.0 final gets released). Alternatively, you can checkout GeoServer from the version control at https://svn.codehaus.org/geoserver/branches/1.7.x/.
Each test requires specific data on the server side in order to run properly. If you checked out GeoServer from the version control, you'll find the needed data directories into the configuration folder of your source checkout, specifically ./configuration/citewfs-1.1 for WFS 1.1 and ./configuration/wcs-1.1 for WCS 1.1. Otherwise you can download the data directories here:
Point your GeoServer's data directory to this directory. You can do this by editing the web.xml file in the ./webapps/geoserver/WEB-INF directory. Look for the block of text that looks something like this:
Note that this block is very likely commented out. Remove the comment lines on the top and bottom, and and change the lower <param-value> to the location of your test data. Save and close the file.
The WFS test requires one further step in that the data is contained within a SQL file inside the data directory. You will see two files, in fact:
That data will need to be converted into a database. In this example, we will be using PostGIS/PostgreSQL, not MySQL, so we will be working with the dataset-sf0.sql file.
This document will assume you have PostgreSQL and PostGIS installed. If you do not, please use the following links:
From the data directory mentioned above, run the following commands (make sure you have the correct permissions):
This command creates a database called "cite". The WFS test expects that database name, so please don't change it. The database is encoded using UTF8 due to non-English characters in the dataset. The final option sets the database to contain PostGIS extensions. The second command adds PL/pgSQL to the database. Note that this command may not be necessary on all operating systems.
This adds the contents of the SQL file into our database. In this case, the file creates three tables, with the following names:
(This explains the UTF8 encoding mentioned above.) Note that it is assumed that you are running from the data directory specified above.
The next step is to make sure that GeoServer is accessing the database using the proper credentials. Open the catalog.xml file inside the data directory and you will see the following two lines:
Unless you have a username and password called "cite" and "cite", respectively, you would want to change this to whatever your system uses for authentication. For example, if your postgres username is "postgres" and your password is blank, you would change the lines to:
Now we can start GeoServer and run the tests.
Open a browser and point to http://cite.geoenterpriselab.com/teamengine . The welcome screen will display.
Scroll down to the bottom and click Start Testing. You will be asked to login. You can use geoserver/openplans1 for the username and password. After login, you will see a list of testing sessions. You will be creating your own session; click on Create a new session. In the next screen, a list of test suites will be displayed. Click the radio box next to WFS 1.1.0 Compliance Test Suite and enter a Session Description in the box below. When done, click OK.
On the next screen, you will enter details about your GeoServer instance, and the type of test that you want to run.
In the box marked Capabilities URL, you want to enter the path to your WFS capabilities. This URL is of the form hxxp://hostname:port/path?query, but an easy way to get this URL is to go to the Welcome Page of your GeoServer instance, and copy the location of the WFS Capabilities link.
Check the boxes marked WFS-Transaction and WFS-XLink. Also change the GML compliance level from SF-0 to SF-1. Click OK to start the test!
You will see a "please wait" graphic. If the graphic only appears for a split-second and then a test failed notification is displayed, make sure to double-check that the capabilities URL was valid. The test will run for a short while, and the results will display on the next page.
This test does not require any database manipulation, so it is simpler to set up than WFS. The data directory we want to use for this test is ./configuration/wcs-1.1 (not ./configuration/citewcs-1.0!) Please stop your GeoServer instance before making any changes below.
Change the data directory in the same way as with the WFS test above. Edit the web.xml file in the ./webapps/geoserver/WEB-INF directory. Look for the block of text that looks like this:
Change the lower <param-value> to the location of your test data. That should be the only change necessary. Now you can restart you GeoServer instance and continue below.
Open a browser and point to http://cite.geoenterpriselab.com/teamengine . The welcome screen will display as before. Scroll down to the bottom and click Start Testing. If you haven't already, you will be asked to login. (Again, you can use geoserver/openplans1 for the username and password.) You will want to Create a new session In the next screen, a list of test suites will be displayed.; Click the radio box next to Web Coverage Service (WCS) 1.1.1 and enter a Session Description in the box below. When done, click OK.
On the next screen, you will enter the WCS Capabilities URL. As above, it is probably easiest to go to the Welcome Page of your GeoServer instance, and copy the location of the WCS Capabilities link. Click Next to start the test.
You will see a "please wait" graphic as before. The results of the test will be displayed on the next page.
|Document generated by Confluence on May 14, 2014 22:59|