< Previous | Next >

Task 5: Retrieving a WSDL description and calling the decision service with a generated client

You call the RuleApp through the SOAP hosted transparent decision service from an Axis client.

About this task

To run the SOAP hosted transparent decision service, you can use an Axis client that is generated by using the Apache Axis software.

Step 1: Downloading the WSDL file

About this task

You download the WSDL file that is used with the Axis client.

Procedure

  1. In the Navigator pane of the Explorer tab in Rule Execution Server, expand the RuleApps.
  2. Expand /PreTradeChecksRuleApp/1.0 RuleApp, and click PreTradeChecks/1.0.
  3. In the Ruleset View page, click Show HTDS Options. You can see options such as namespace and endpoint. You can edit the options.
  4. Click Retrieve HTDS Description File.
  5. Select SOAP as the format for the file.
  6. Select the Decision trace information option, and then click Download.
  7. Save the file by renaming it pretradecheck.wsdl and replacing the following file: <InstallDir>/executionserver/samples/decisionservice/data/pretradecheck.wsdl.

Step 2: Building the Axis client

About this task

You build the Axis client in the Samples Console.

Procedure

  1. In the Samples Commands in the Samples Console, expand Samples Commands > Rule Execution Server  > Executing a hosted transparent decision service.
  2. Double-click the build target. It does as follows:
    • Calls an Axis Ant task to generate proxy classes from the WSDL description file. The classes are used by the custom classes that call the decision service. You can find the custom classes in <InstallDir>/executionserver/samples/decisionservice/src/decisionservice/axisclient.
    • Compiles the Java™ class files. When the compilation finishes, the Console shows BUILD SUCCESSFUL.

Step 3: Running the client

About this task

You run the Axis client from the Samples Console.

Procedure

  1. In the Samples Commands view, expand Samples Commands > Rule Execution Server  > Executing a hosted transparent decision service.
  2. Double-click the run.axisclient target.
    The following message is displayed in the Console tab:
    Nb rules fired 4
    Report reason = Black Listed Stocks
    Completed: run.axisclient
    BUILD SUCCESSFUL
    The Ant task runs the main method in the decisionservice.axisclient.Client class, with the following results:
    • The task creates a customer parameter and an order parameter in Java™.
    • The task calls the transparent decision service with the parameters. As a result, it produces relevant execution information from the response by using the output parameter and the trace, such as the number of rules that were run.

What to do next

In the next task, you continue working in the Rule Execution Server console. You inspect the performance of the hosted transparent decision service.
< Previous | Next >