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

Update Web Service Source

Update Web Service Source

Use the PUT method to update a Web Service source in RulePoint.

PUT Request in JSON Format

Generate a PUT request. For example, the following PUT request updates a web service source in a RulePoint application:
PUT http://localhost:8080/rulepoint/api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1 Accept: application/json Content-Type: application/json Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format

{ "name": "MyWebServiceSource", "valid": true, "sourceType": "WebSourceService", "connection": { "rel": "connection", "href": "api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052", "title": "WsConnection1", "id": "e9bcc9ae-8e78-4b2c-a3f4-48352e817052" }, "topics": [ { "href": "api/projects/1/topics/8cf9d31e-abd8-4045-89a9-f6d2206ce7a1", "title": "WSTopic1", "objectType": "topics", "id": "8cf9d31e-abd8-4045-89a9-f6d2206ce7a1" } ], "config": { "serviceName": "HelloWorldServices", "operation": "hello", "inputParameters": "hello.name=Rama", "xpathExpr": "//return", "markerId": "", "propertyMetadataMap": "*" }, "marshaller": { "marshallerClassname": null, "marshallerProperties": {}, "marshallerThreadsafe": false } }

PUT Response in JSON Format

Returns the Web Service source object and source code 200 OK. Returns the error object if an error occurs.
{ "id": "c00cb582-cdba-4fc6-98a0-af2e066d4dc1", "name": "MyWebServiceSource", "valid": true, "self": { "rel": "self", "href": "api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1", "title": "MyWebServiceSource", "id": "c00cb582-cdba-4fc6-98a0-af2e066d4dc1" }, "actions": [ { "rel": "update", "href": "api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1", "type": "PUT", "title": "Edit" }, { "rel": "delete", "href": "api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1", "type": "DELETE", "title": "Delete" }, { "rel": "deploy", "href": "api/projects/1/deploy", "type": "POST", "title": "Deploy" }, { "rel": "createSchedule", "href": "api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1/schedules", "type": "POST", "title": "Create Schedule" } ], "acl": { "rel": "acl", "href": "api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1/acl", "title": "acl" }, "owningProject": { "rel": "owningProject", "href": "api/projects/1", "title": "Default Project", "id": "1" }, "type": "sources", "lastModifiedDate": "2013-09-13T16:45:12+05:30", "createDate": "2013-09-13T16:10:38+05:30", "createdBy": "Administrator", "predefined": false, "deployable": true, "deployState": "DRAFT", "force": false, "sourceType": "WebSourceService", "sourceTypeDisplayName": "Web Service Source", "schedulable": true, "config": { "operation": "hello", "inputParameters": "hello.name=Rama", "markerId": "", "xpathExpr": "//return", "propertyMetadataMap": "*", "serviceName": "HelloWorldServices" }, "topics": [ { "href": "api/projects/1/topics/8cf9d31e-abd8-4045-89a9-f6d2206ce7a1", "title": "WSTopic1", "objectType": "topics", "id": "8cf9d31e-abd8-4045-89a9-f6d2206ce7a1" } ], "connection": { "rel": "connection", "href": "api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052", "title": "WsConnection1", "id": "e9bcc9ae-8e78-4b2c-a3f4-48352e817052" }, "schedules": [ { "rel": "schedules", "href": "api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1/schedules/4163", "id": "4163" } ], "marshaller": { "marshallerClassname": null, "marshallerProperties": {}, "marshallerThreadsafe": false } }
Response Code: 200 OK

PUT Request in XML Format

Generate a PUT request. For example, the following PUT request updates a web service source in a RulePoint application:
PUT http:/localhost:8080/rulepoint/api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1 Accept: application/xml Content-Type: application/xml Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <source> <name>WSSource2</name> <type>sources</type> <config> <entry> <key>operation</key> <value>hello</value> </entry> <entry> <key>inputParameters</key> <value>hello.name=Rama</value> </entry> <entry> <key>markerId</key> <value/> </entry> <entry> <key>xpathExpr</key> <value>//return</value> </entry> <entry> <key>propertyMetadataMap</key> <value>*</value> </entry> <entry> <key>serviceName</key> <value>HelloWorldServices</value> </entry> </config> <connection> <href>api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052</href> <id>e9bcc9ae-8e78-4b2c-a3f4-48352e817052</id> <rel>connection</rel> <title>WsConnection1</title> </connection> <marshaller> <marshallerProperties/> <marshallerThreadsafe>false</marshallerThreadsafe> </marshaller> <schedulable>true</schedulable> <schedules> <href>api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1/schedules/4163</href> <id>4163</id> <rel>schedules</rel> </schedules> <sourceType>WebSourceService</sourceType> <topics> <topic> <href>api/projects/1/topics/8cf9d31e-abd8-4045-89a9-f6d2206ce7a1</href> <id>8cf9d31e-abd8-4045-89a9-f6d2206ce7a1</id> <objectType>topics</objectType> <title>WSTopic1</title> </topic> </topics> </source>

PUT Response in XML Format

Returns the Web Service source object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <source> <acl> <href>api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1/acl</href> <rel>acl</rel> <title>acl</title> </acl> <actions> <action> <href>api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1</href> <rel>update</rel> <title>Edit</title> <type>PUT</type> </action> <action> <href>api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1</href> <rel>delete</rel> <title>Delete</title> <type>DELETE</type> </action> <action> <href>api/projects/1/deploy</href> <rel>deploy</rel> <title>Deploy</title> <type>POST</type> </action> <action> <href>api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1/schedules</href> <rel>createSchedule</rel> <title>Create Schedule</title> <type>POST</type> </action> </actions> <id>c00cb582-cdba-4fc6-98a0-af2e066d4dc1</id> <links/> <name>WSSource2</name> <owningProject> <href>api/projects/1</href> <id>1</id> <rel>owningProject</rel> <title>Default Project</title> </owningProject> <self> <href>api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1</href> <id>c00cb582-cdba-4fc6-98a0-af2e066d4dc1</id> <rel>self</rel> <title>WSSource2</title> </self> <valid>true</valid> <createDate/> <createdBy>Administrator</createdBy> <deployState>DRAFT</deployState> <deployable>true</deployable> <force>false</force> <lastModifiedDate/> <predefined>false</predefined> <type>sources</type> <config> <entry> <key>operation</key> <value>hello</value> </entry> <entry> <key>inputParameters</key> <value>hello.name=Rama</value> </entry> <entry> <key>markerId</key> <value/> </entry> <entry> <key>xpathExpr</key> <value>//return</value> </entry> <entry> <key>propertyMetadataMap</key> <value>*</value> </entry> <entry> <key>serviceName</key> <value>HelloWorldServices</value> </entry> </config> <connection> <href>api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052</href> <id>e9bcc9ae-8e78-4b2c-a3f4-48352e817052</id> <rel>connection</rel> <title>WsConnection1</title> </connection> <marshaller> <marshallerProperties/> <marshallerThreadsafe>false</marshallerThreadsafe> </marshaller> <schedulable>true</schedulable> <schedules> <href>api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1/schedules/4163</href> <id>4163</id> <rel>schedules</rel> </schedules> <sourceType>WebSourceService</sourceType> <sourceTypeDisplayName>Web Service Source</sourceTypeDisplayName> <topics> <topic> <href>api/projects/1/topics/8cf9d31e-abd8-4045-89a9-f6d2206ce7a1</href> <id>8cf9d31e-abd8-4045-89a9-f6d2206ce7a1</id> <objectType>topics</objectType> <title>WSTopic1</title> </topic> </topics> </source>
Response Code: 200 OK

0 COMMENTS

We’d like to hear from you!