2.3: Test
Testing our web service is very simple because PxP includes a client testing utility called XClient. This is a simple HTTP and SOAP test client.
First, we must start XClient by starting the runtime web server (use the link in the c:\jprogramfiles\hyfinity\Runtime Links directory) and loading the following file in a web browser: c:\jprogramfiles\hyfinity\runtime\tomcat-runtime\webapps\dashboard\XClient.html. (This file is also linked from the 'Runtime Links' directory.) This will bring up the XClient screen:
This page does all of the work of testing the service for us. All we need to do is to type in the Service (URL/Endpoint) and the Action / Method, and then click on the Call Service button. In this tutorial, the Service URL is that of the Example service that we have just deployed, http://localhost:7080/ExampleServices, and the action is Use. Optionally, we can use the Browse... button to locate an XML file to send to the service, and the Show File Contents button to replace the contents of the Request window with the contents of the selected file, or by typing your own well-formed XML fragment (see default example).
When we click on the Call Service button, XClient will send the contents of the Request window to the service specified, and the result will be visible in the Response window underneath.
In the case of our example, the Response will be the same as the Request because the agent isn't processing the data at this stage. However, the fact that the contents of the Response window have changed to echo the contents of the Request window means that XClient has used our web service.
This concludes our basic web service example. In the following sections, we will build on this to include business rules and a call to an external web service.