Testing Your Service
Introduction
This section will describe how to test your service running in the Tomcat servlet container.
Starting Tomcat
Tomcat can be started by utilizing the scripts under the TOMCAT_HOME/bin directory. The script most typically used is "startup.bat" (Windows) or "startup.sh" (Unix).
Once Tomcat is started you can navigate to: http://localhost:8080/wsrf/services to view the list of deployed Web services.
Testing the FileSystem Service
The provided example FileSystem includes some scripts for sending requests to the service. The scripts can be leveraged in order to test your own services.
In order to test the FileSystem service you will need to change to the tutorial directory under docs. The Ant build script contains a target for sending a SOAP request. The name of the target is "sendRequest" and in order to invoke it you must specify a request XML file. The request XML files are located in the requests subdirectory. You can invoke the call by doing the following:
>ant sendRequest -Dxml=./requests/QueryResourceProperties_allProps.soap
Using the Provided Scripts to Invoke Your Service
Invoking your service will entail selecting the appropriate .soap file to use. Each file is named appropriately based on the operation it contains. You will need to make a copy of the file and modify the WS-Addressing header for the resource id to match the entry you put in the JNDI config and the resource id number for the instance you would like to invoke. Remember this has to do with the home's implementation of getInstance() and allows you to "decide" which instances are valid for sending requests to. Once done, in order to invoke your service with your modified scripts, you will need to call:
>ant -f soapclient.xml sendRequest -Durl=http://localhost:8080/wsrf/services/your_service -Dxml=./requests/QueryResourceProperties_allProps.soap where "your_service" represents your service endpoint name, and the script name should be the name of your modified script.