Petals-BC-REST 2.4.0+

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

Changes (4)

View Page History
| {{http-body-from-json-virtual-root}} | This parameter drives the conversion of JSON to XML. See https://github.com/beckchr/staxon/wiki/Factory-Configuration | {center}-{center} | {center}No{center} | {center}Not applicable{center} |
| {{on-jbi-response}} | Defines the REST response that will be generated according to the JBI service response:
* the sub-elements '{{on-out}}', '{{on-fault}}' or '{{on-error}}' define conditional transformations to apply on the service provider response, fault or error. The first condition evaluated to '{{true}}' determine the transformation that will be applied. The result of the transformation will be used as HTTP response. Several conditional transformations can be defined:
** the attribute '{{order-id}}' permits to order condition evaluations,
** the sub-element '{{condition}}' defines the condition to evaluate. Now, only XPath conditions are supported through the sub-element '{{xpath}}'. XPath condition supports placeholders,
{tip}
If the service response has no XML payload, the XML payload of the service request is used to be transformed instead of the service response XML payload.

Several XSL parameters are set to be used in the XSL transformation:
* each URI parameter is available without namespace,
* 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,
* in case of error response, two additional parameters are set:
** '\{http://petals.ow2.org/bc/rest/xsl/param/output/1.0/placeholders\}error-message' that contains the error message,
** '\{http://petals.ow2.org/bc/rest/xsl/param/output/1.0/placeholders\}error-stack-trace' filled with the error stack trace.
{tip}
** the sub-element '{{http-response}}' defines the transformation to apply if the condition matches to generate the HTTP REST response:
*** the attribute '{{http-code}}' defines the HTTP code returned. Placeholder not supported,
*** the attribute '{{http-body-is-empty}}' defines if the body of the HTTP response must be empty. The default value is '{{false}}' except for '{{on-error}}' and '{{on-default-error}}' for which the default value will be '{{true}}' if no transformation is defined with '{{transformation}}',
*** headers can be added through sub-elements '{{header}}''. The header name is provided through attribute '{{name}}'. Header name does not support placeholder, but they are supported at header value level,
*** the sub-element {{http-body-to-json-multiple-pi}} drives the conversion of XML to JSON. See https://github.com/beckchr/staxon/wiki/Factory-Configuration. Default value: {{false}}, placeholder not supported,
*** the sub-element {{http-body-to-json-virtual-root}} drives the conversion of XML to JSON. See https://github.com/beckchr/staxon/wiki/Factory-Configuration. No default virtual root, placeholder not supported,