Deploying to the Agent
To deploy to the HydraExpress Agent, simply start the Agent as usual. The rwsfserver script starts and stops the Agent and accepts a variety of options. On Windows systems, the installer places shortcuts to the scripts in the Start menu. In the installation, this script is located in your <installdir>\bin directory. For UNIX systems, run the script from the command line only.
Starting and Stopping the Agent
The command below shows the sequence to stop and restart the Agent on both Windows and UNIX:
Windows | rwsfserver start rwsfserver stop |
UNIX/Linux | rwsfserver start rwsfserver stop |
Agent Ports
The Agent uses several default ports. The most common is 8090 used for HTTP requests and 8443 for HTTPS requests.
Deploying your Service with the Makefile
The generated makefile includes a
deploy target to deploy the sample service and associated client. (See
Chapter 22, “Options for Compiling,” for more information on building your applications using the makefiles.) If you have compiled the service using MSVC on Windows, a deployment batch file is generated for your convenience. See
“Deploying your Service Using MSVC Files” .
To deploy the service, follow the steps in this section.
NOTE >> Make sure that you have set up your environment as described in Chapter 2, “Setup,” in the HydraExpress User Guide. On Windows, be sure you have set up your command window with the MSVC environment.
If the Agent is currently running, stop it using the rwsfserver stop command:
Windows | rwsfserver stop |
UNIX/Linux | rwsfserver stop |
Run nmake (Windows) or make (UNIX or Linux) at the command prompt with the target deploy:
Windows | nmake deploy |
UNIX/Linux | make deploy |
The makefile deploys the service and client into your HydraExpress installation, as follows:
• The service WSDL file, configuration files, and service descriptor web.xml are deployed to the <installdir>\apps\servlets\<servicecontextname> directory.
• The DLL or shared library for the service and client is placed in <installdir>\apps-bin on Windows and <installdir>/apps-lib on UNIX/Linux.
For example:
Table 14 – Location of deployed files
Deployment Directory | Deployed Files |
<installdir>\apps\servlet\<servicecontextname> | myWSDL.wsdl handlers.xml transports.xml WEB-INF [subdirectory] objects.xml web.xml |
<installdir>\apps-bin (Windows) <installdir>/apps-lib (UNIX/Linux) | <bindingname>ClientLibrary12d.dll or <bindingname>ClientLibrary12d.so <portname>Service12d.dll or <portname>Service12d.so HandlersServiceSample12d.dll or HandlersServiceSample12d.so |
Restart the Agent to load the new service. To restart the Agent, run the rwsfserver start command as shown below:
Windows | rwsfserver start |
UNIX/Linux | rwsfserver start |
Deploying your Service Using MSVC Files
For services built using the MSVC project files, run the deployment batch file generated in the top level code generation directory as a convenience: deployDebug.bat (for debug builds) or deployRelease.bat (for release builds). Do not use nmake deploy to deploy these projects.
Agent Options
The syntax of the rwsfserver script is: rwsfserver [options] [start|stop]. Options are:
• -? | -h | --help or no arguments, to display help
• -d | --debug, to start the Agent in debug mode (Windows only)
NOTE >> If you start the Agent in debug mode on Windows, it loads only services and named objects compiled in debug mode, as identified by the tag 15d in the file name.
The client request is automatically sent to the location defined in the WSDL file. To direct the client request to some other location, enter the location on the command line immediately after the client invocation. For example, to send the request using a secure transport to the Agent’s SSL port, enter:
<prompt> MyClient https://localhost:8443/<path_to_service>
The HydraExpress examples located in your <installdir>\examples\webservices directory specify localhost:8090 as the service port in the WSDL file. Therefore, if you run one of the example clients without a specific path, the request is automatically routed to the default port.