Table of Contents

Search

  1. Preface
  2. RulePoint Interfaces
  3. RulePoint Services
  4. Custom Service API
  5. Java Adapter for REST API
  6. RulePoint REST API
  7. Sample XML and JSON Requests and Responses
  8. RulePoint Pluggable Authentication Module
  9. HTTP Request and Response Attributes

Developer Guide

Developer Guide

Create JMS Response

Create JMS Response

Use the POST method to create a JMS response in RulePoint.

POST Request in JSON Format

Generate a POST request. For example, the following POST request creates a JMS response in a RulePoint application.
POST http://localhost:8080/rulepoint/api/projects/1/responses Accept: application/json Content-Type: application/json Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format

{ "name": "jmsresponder_response", "type": "responses", "responseType": "JMSResponder", "responder": { "rel": "responder", "href": "api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7", "title": "jmsresponder", "id": "ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7" }, "multithreaded": false, "config": { "body": "test message", "retryCount": "3", "priority": "4", "retryDelay": "1000", "deliveryMode": "2", "params": null, "timeToLive": "0", "destination": "jmsQueue" } }

POST Response in JSON Format

Returns the JMS response object and response code 201 OK. Returns the error object if an error occurs.
{ "id": "acb4152d-d034-468d-be96-d95178200755", "name": "jmsresponder_response", "valid": true, "self": { "rel": "self", "href": "api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755", "title": "jmsresponder_response", "id": "acb4152d-d034-468d-be96-d95178200755" }, "actions": [ { "rel": "update", "href": "api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755", "type": "PUT", "title": "Edit" }, { "rel": "delete", "href": "api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755", "type": "DELETE", "title": "Delete" } ], "acl": { "rel": "acl", "href": "api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755/acl", "title": "acl" }, "owningProject": { "rel": "owningProject", "href": "api/projects/1", "title": "Default Project", "id": "1" }, "type": "responses", "lastModifiedDate": "2013-08-23T15:20:20+05:30", "createDate": "2013-08-23T15:20:20+05:30", "createdBy": "Administrator", "predefined": false, "deployable": true, "deployState": "DRAFT", "force": false, "responseType": "JMSResponder", "responseTypeDisplayName": "JMS Responder", "responder": { "rel": "responder", "href": "api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7", "title": "jmsresponder", "id": "ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7" }, "multithreaded": false, "config": { "body": "test message", "retryCount": "3", "priority": "4", "retryDelay": "1000", "deliveryMode": "2", "params": null, "timeToLive": "0", "destination": "jmsQueue" } }
Response Code: 201 Created

POST Request in XML Format

Generate a POST request. For example, the following POST request creates a JMS response in a RulePoint application.
POST http://localhost:8080/rulepoint/api/projects/1/responses Accept: application/xml Content-Type: application/xml Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response> <name>jmsresponder_response</name> <type>responses</type> <config> <entry> <key>body</key> <value>test message</value> </entry> <entry> <key>retryCount</key> <value>3</value> </entry> <entry> <key>priority</key> <value>4</value> </entry> <entry> <key>retryDelay</key> <value>1000</value> </entry> <entry> <key>deliveryMode</key> <value>2</value> </entry> <entry> <key>params</key> </entry> <entry> <key>timeToLive</key> <value>0</value> </entry> <entry> <key>destination</key> <value>jmsQueue</value> </entry> </config> <multithreaded>false</multithreaded> <responder> <href>api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</href> <id>ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</id> <rel>responder</rel> <title>jmsresponder</title> </responder> <responseType>JMSResponder</responseType> <responseTypeDisplayName>JMS Responder</responseTypeDisplayName> </response>

POST Response in XML Format

Returns the JMS response object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response> <acl> <href>api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755/acl</href> <rel>acl</rel> <title>acl</title> </acl> <actions> <action> <href>api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755</href> <rel>update</rel> <title>Edit</title> <type>PUT</type> </action> <action> <href>api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755</href> <rel>delete</rel> <title>Delete</title> <type>DELETE</type> </action> </actions> <id>acb4152d-d034-468d-be96-d95178200755</id> <links/> <name>jmsresponder_response</name> <owningProject> <href>api/projects/1</href> <id>1</id> <rel>owningProject</rel> <title>Default Project</title> </owningProject> <self> <href>api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755</href> <id>acb4152d-d034-468d-be96-d95178200755</id> <rel>self</rel> <title>jmsresponder_response</title> </self> <valid>true</valid> <createDate/> <createdBy>Administrator</createdBy> <deployState>DRAFT</deployState> <deployable>true</deployable> <force>false</force> <lastModifiedDate/> <predefined>false</predefined> <type>responses</type> <config> <entry> <key>body</key> <value>test message</value> </entry> <entry> <key>retryCount</key> <value>3</value> </entry> <entry> <key>priority</key> <value>4</value> </entry> <entry> <key>retryDelay</key> <value>1000</value> </entry> <entry> <key>deliveryMode</key> <value>2</value> </entry> <entry> <key>params</key> </entry> <entry> <key>timeToLive</key> <value>0</value> </entry> <entry> <key>destination</key> <value>jmsQueue</value> </entry> </config> <multithreaded>false</multithreaded> <responder> <href>api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</href> <id>ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</id> <rel>responder</rel> <title>jmsresponder</title> </responder> <responseType>JMSResponder</responseType> <responseTypeDisplayName>JMS Responder</responseTypeDisplayName> <templates /> <rules /> </response>
Response Code : 201 Created

0 COMMENTS

We’d like to hear from you!