Petals-BC-REST 2.1.0+

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (3)

View Page History
| 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. The component placeholders are available as parameters from namespace '{{http://petals.ow2.org/bc/rest/xsl/param/output/1.0/placeholders}}'. The parameter name is the placeholder name, and its value the placeholder value. | {center}-{center} | {center}No{center} |
| xsl/@is-json-result | If {{true}}, the output of the XSL transforming the incoming XML payload will be considered as JSON to put in the HTTP body of the REST request. | {center}false{center} | {center}No{center} |
| response-body-as | Defined the body content type. By default, the body content-type is auto-detected according to the content-type of the HTTP response, but in few case it is necessary to specify it. Possible values are:
* {{auto}}: The body content type is auto-detected from the HTTP response content-type,
* {{xml}}: The body contains XML,
* {{json}}: The body contains JSON,
* {{attachment}}: The body is an attachment. | {center}{{auto}}{center} | {center}No{center} |
| on-http-status | Define how to process a given HTTP status:
* the attribute {{code}} is the HTTP code associated to this processing,
* the sub-elements '{{out}}', '{{fault}}' or '{{error}} define conditional transformations to apply on the HTTP body response if exists. The first condition evaluted to '{{true}}' determine the transformation that will be applied. The result of the transformation will be used as OUT response, fault or error. Several conditional transformations can be defined:
** the attribute '{{order-id}}' permits to order condition evaluations,
** the attribute '{{process-http-response-as}}' defines how the HTTP response body must be processed. By default, the body content-type is auto-detected according to the content-type of the HTTP response. Possible values are:
*** {{auto}} (default value): The body content type is auto-detected from the HTTP response content-type,
*** {{xml}}: The body contains XML that will be put be put in the service provider response as a XML payload,
*** {{json}}: The body contains JSON that will be put be put in the service provider response as a XML payload,
*** {{attachment}}: The body will be put in the service provider response as an attachment.
** the sub-element '{{condition}}' defines the condition to evaluate. Now, only XPath conditions are supported through the sub-element '{{xpath}}',
** the sub-element '{{transformation}}' defines the transformation to apply if the condition matches. Now, only XSL transformations are supported through the sub-element '{{xsl}}',
{tip}
* the sub-elements '{{otherwise-out}}', '{{otherwise-fault}}' or '{{otherwise-error}} define the default transformation to apply when no condition transformation matches the HTTP body response. The result of the transformation will be used as OUT response, fault or error. Only one default transformation can be defined:
** the attribute '{{process-http-response-as}}' defines how the HTTP response body must be processed. By default, the body content-type is auto-detected according to the content-type of the HTTP response. Possible values are:
*** {{auto}} (default value): The body content type is auto-detected from the HTTP response content-type,
*** {{xml}}: The body contains XML that will be put be put in the service provider response as a XML payload,
*** {{json}}: The body contains JSON that will be put be put in the service provider response as a XML payload,
*** {{attachment}}: The body will be put in the service provider response as an attachment.
** the sub-element '{{transformation}}' defines the transformation to apply if the condition matches. Now, only XSL transformations are supported through the sub-element '{{xsl}}'. The available XSL parameters available are the same as the ones for '{{out}}', '{{fault}}' and '{{error}},
* if no default transformation is defined: