SOAP Client
Introduction
Apache WSRF includes a lightweight SOAP client that can be used to test your services. The client is invoked using an Ant script, which is located in INSTALL_DIR/template/soapclient.xml. Request and response messages are viewed in the Ant output. This section explains how to use the client and how to build request SOAP messages for the client.
SOAP Files
The client reads a .soap file which contains the SOAP envelope to be sent. Examples of SOAP files are located in INSTALL_DIR/examples/filesystem/requests/. Each file is named appropriately based on the operation it contains. Use these files as models when creating your own .soap files. Make sure you modify the SOAP header element that represents the resource id WS-Addressing reference parameter. The name of the header element should match the entry that is in the JNDI configuration file, and the text value of the element should contain the resource id of the instance you would like to invoke. The id is used by the WSRF resource invocation framework to lookup a particular resource instance.
Running the Client
To invoke the script:
- Make sure your WSRF service is deployed.
- Open a command prompt and change directories to INSTALL_DIR/template.
- Run:
ant -f soapclient.xml sendRequest -Durl=http://localhost:8080/wsrf/services/your_service -Dxml=./requests/QueryResourceProperties_allProps.soap
Where your_service represents your WSRF service endpoint name.