|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (6)
View Page HistoryThe REST request is created like this:
* The REST URI is created from the address extension, the JBI operation and JBI message content (The JBI message content must contains the information about the path, the matrix and query parameters),
* The HTTP headers are set according to the provided configuration,
* The HTTP body is created differently according the HTTP method to used:
** GET/DELETE: There is no HTTP body
** GET/DELETE: There is no HTTP body
*** The JBI message content contains only a reference to a JBI attachment: The HTTP body is created from a JBI attachment (binary data)
*** The JBI message content does not contains a reference to a JBI attachment: The HTTP body is created from the JBI message content (form parameters)
*** The JBI message content does not contains a reference to a JBI attachment: The HTTP body is created from the JBI message content (form parameters)
** PUT: The HTTP body is created from a JBI attachment.
* The headers present in the protocol header JBI message property are added to the HTTP headers.
For example the following JBI message will produces the URI {{http://localhost:8088/library/My+Documents/documents/6/metadata}}:
<rest:http-body-type>NO_BODY</rest:http-body-type>
<rest:uri>http://localhost:8088/library/{library}/documents/{reference}/metadata</rest:uri>
<rest:uri>http://localhost:8088/library/{library}/documents/{reference}/metadata</rest:uri>
<rest:headers>
<rest:header name="Accept">
<rest:constant>application/json</rest:constant>
</rest:header>
</rest:headers>
<rest:header name="Accept">
<rest:constant>application/json</rest:constant>
</rest:header>
</rest:headers>
<rest:xpath-param name="library">//*[local-name()='library']</rest:xpath-param>
<rest:xpath-param name="reference">//*[local-name()='reference']</rest:xpath-param>
<rest:xpath-param name="reference">//*[local-name()='reference']</rest:xpath-param>
Value of substitutable parameters are retrieved from XPath expressions given by '{{xpath-param}}', or retrieved from JBI message properties. | - | {center}Yes\*{center} |
| xpath-param | Define how to retrieve an URI template parameter as an XPath expression executed on the incoming payload. The attribute {{name}} is the name of the parameter in the URI template, and the value is the XPath expression to apply. | - | {center}Yes, if at least one parameter is included into the URI template{center} |
| xpath-param | Define how to retrieve an URI template parameter as an XPath expression executed on the incoming payload. The attribute {{name}} is the name of the parameter in the URI template, and the value is the XPath expression to apply. | - | {center}Yes, if at least one parameter is included into the URI template{center} |
| headers | Defines the HTTP headers to set on the REST request:
* each header defines through a sub-element '{{<header />}}' for which the attribute '{{name}}' is the name of the header,
* the value to set is defined by the content of the sub-element '{{<header />}}':
** '{{<constant />}}', the constant of this tag will be used as header value,
** '{{<xpath />}}', the header value is extracted from the incoming payload by an XPath expression | - | No |
* each header defines through a sub-element '{{<header />}}' for which the attribute '{{name}}' is the name of the header,
* the value to set is defined by the content of the sub-element '{{<header />}}':
** '{{<constant />}}', the constant of this tag will be used as header value,
** '{{<xpath />}}', the header value is extracted from the incoming payload by an XPath expression | - | No |
| xsl | A XSL style-sheet used to transform the incoming XML payload before to generate the HTTP body of the REST request. The result of this transformation will be used to be converted into JSON or to be set as XML payload. | - | No |
| on-http-status | Define how to process a given HTTP status:
| on-http-status | Define how to process a given HTTP status: