Petals-BC-REST 1.2.0+

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

Changes (11)

View Page History
* 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,
** the sub-element '{{transformation}}' defines a preliminar transformation to apply on the XML payload of the response service if the condition matches, before to eventually be converted into JSON through the declaration '{{http-response}}'. Now, only XSL transformations are supported through the sub-element 'xsl'. Placeholders are supported neither to define XSL stylesheet nor into the XSL stylesheet,
{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.
{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,
*** headers can be added through sub-elements '{{header}}''. The header name is provided through attribute '{{name}}',
*** 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,
*** the sub-element {{http-body-to-json-auto-array}} 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-auto-primitive}} 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-pretty-print}} 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-ns-declarations}} drives the conversion of XML to JSON. See https://github.com/beckchr/staxon/wiki/Factory-Configuration. Default value: {{false}}, placeholder not supported.
{tip}
The content type of the HTTP response is defined according to the header '{{Accept}}' of the incoming HTTP REST request. The content-type used for the HTTP response is the first one contained in the header value and compliant with XML or JSON.