JavaScript client

Overview

The opencds-js-client is an OpenCDS client that provides a starting point for developing JavaScript applications that require CDS support. 

Download code

git clone https://bitbucket.org/opencds/opencds-js-client

Deploy application

The repository contains the following resources:

opencds-js-client/
├── pom.xml
└── src
    └── main
        ├── resources
        │   └── wsdl
        │       └── evaluate.wsdl
        └── webapp
            └── static
                └── opencds-js-client
                    ├── index.html
                    └── js
                        ├── cxf-utils.js
                        ├── DecisionSupportService.js
                        └── EvaluationServiceImp.js

Copy the content of static folder (opencds-js-client) and put it inside of webapps folder of your tomcat instance, next to opencds-decision-support-service.war.  You will have end up with something like the following in your tomcat/webapp/ folder: 

├── webapps
│   ├── opencds-decision-support-service
│   ├── opencds-decision-support-service.war
│   ├── opencds-js-client
│   └── ROOT

Test application

Open a browser on http://localhost:8080/opencds-js-client.  By default the required fields are populated to call the "Bounce Rule" that simply copies all of the input data to the output data structure.

Click on "Invoke" to send a SOAP request to opencds.  The evaluation response will appear in a textArea as is shown below.