skip to main content
Corticon Server: Deploying Web Services with Java : Corticon Java Server files and API tools : Testing the installed Corticon Server : Testing the installed Corticon Server as a J2EE SOAP servlet
 

Try Corticon Now
Testing the installed Corticon Server as a J2EE SOAP servlet
To test that Corticon Server deployed as a SOAP Servlet is running correctly, all you need is a SOAP client or the sample batch file provided and described below.
Testing the Servlet installation here assumes you have already installed and started Corticon Server as a Web Service in the bundled Progress Application Server or using the .war file in another web server.
Because a SOAP Servlet is listening for SOAP calls, we need a way to invoke an API method via a SOAP message then send that message to Corticon Server using a SOAP client. In the sample code supplied in the default installation, Corticon provides an easy way to make API calls to it via a SOAP message.
The included batch file, testServerAxis.bat, will help ensure that Corticon Server is installed properly and listening for calls. Located in the [CORTICON_HOME]\Server\bin directory, this script provides a menu of available Corticon Server methods to call into the SOAP Servlet. Running testServerAxis.bat (or .sh in a UNIX environment) does the following:
*Sets classpaths needed by the CcServerTest class, which is acting as our menu-driven SOAP client. The source code (.java) is included in the [CORTICON_WORK_DIR]\Samples\Clients\SOAP directory.
*Defines variables for web server location and ports. Port changes may be necessary depending on the type of application or web server you are using to host the Servlet.
Note: The bundled Progress Application Server uses localhost as the application server's location, and defaults to port settings of 8850 for HTTP and 8851 for HTTPS.
*Starts a JVM for our SOAP client class, CcServerTest, to run inside.
*Calls the CcServerTest class (our simple SOAP client) with arguments for web server location and port. Notice that the rest of the URI has been hard-coded in this batch file.
To use the server test script:
1. Open a Corticon Command Prompt from the Windows Start menu by choosing All Programs > Progress > Corticon 5.7 > Corticon Command Prompt
2. At the command prompt, enter testServerAxis, as shown:
Note: When you launch Corticon Command Prompt, it calls corticon_env.bat, adds several [CORTICON_HOME] script paths to the PATH so that you can launch scripts by name from several locations -- \bin, \Server\bin, \Server\pas\bin, \Studio\bin, and, \Studio\eclipse -- and then relocates the prompt to the root of the Corticon work directory.
3. When the Enter transaction number: prompt displays, enter help, as shown:
4. The 100 series commands are listed.
In the lower portion of the Windows console, shown in the figure above, we see the available API methods of the Common Functions (the 100 series) listed by number. You can list the commands in the other series by entering their series number:
*Enter 200 to list the Decision Service Functions command set
*Enter 300 to list the Monitoring Functions command set
*Enter 400 to list the CcServer Functions command set
*Enter 100 to again list the Common Functions command set
Since we have not deployed any Ruleflows yet, we will use an administrative method to test if Corticon Server is correctly installed as a SOAP Servlet inside our web server.
Note: Even though the script is running, a server connection has not yet been attempted. If you enter any command when the application server is not running, you will get a Connection refused exception.
A good administrative method to call is transaction #121, Get CcServer current info. This choice corresponds directly to the Java API method getCcServerInfo(), described in complete detail in the JavaDocs provided in the standard Corticon Server installation.
To try this, confirm that Corticon Server is running, and then enter 121 in the testServerAxis window. The CcServerAxisTest class makes a call to the server's SOAP Servlet. It asks for a list of configuration parameters and returns them to the Windows console. The results of the call are shown in the following figures:
Figure 365. testServerAxis Response to command 121: License information
Figure 366. testServerAxis Response to command 121: Info on one of the deployed Decision Services
Figure 367. testServerAxis Response to command 121: Additional Server information
The response verifies that our Corticon Server is running correctly as a SOAP Servlet and is listening for -- and responding to -- calls. At this stage in the deployment, this is all we want to verify.