|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (6)
View Page History** 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}
{tip}
If the HTTP body response is a XML or JSON payload, it is used as XML to be transformed according to the current {{on-http-status}} definition. Several XSL parameters are set to be used in the XSL transformation:
* the IN message payload can be loaded by the XSL through a variable using the XSL statement: {{<xsl:variable name="inPayload" select="document('petals-bc-rest:in-payload')"/>}}
* each URI parameter is available without namespace,
* each URI parameter is available without namespace,
{include:0 CDK SU Consume Configuration 5.7.0}
\\
{anchor:service-unit-attributes-consume}
{center}{*}Service Unit attributes to consume services{*}{center}
{table-plus}
{table-plus}
{tip} | {center}-{center} | {center}No{center} |
| {{http-body-from-json-multiple-pi}} | This parameter drives the conversion of JSON to XML. See https://github.com/beckchr/staxon/wiki/Factory-Configuration | {center}false{center} | {center}No{center} |
| {{http-body-from-json-multiple-pi}} | This parameter drives the conversion of JSON to XML. See https://github.com/beckchr/staxon/wiki/Factory-Configuration | {center}false{center} | {center}No{center} |
| {{http-body-to-json-multiple-pi}} | This parameter drives the conversion of XML to JSON. See https://github.com/beckchr/staxon/wiki/Factory-Configuration | {center}false{center} | {center}No{center} |
| {{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} |
| {{http-body-to-json-virtual-root}} | This parameter drives the conversion of XML to JSON. See https://github.com/beckchr/staxon/wiki/Factory-Configuration | {center}-{center} | {center}No{center} |
| {{http-body-to-json-auto-array}} | This parameter drives the conversion of XML to JSON. See https://github.com/beckchr/staxon/wiki/Factory-Configuration | {center}false{center} | {center}No{center} |
| {{http-body-to-json-auto-primitive}} | This parameter drives the conversion of XML to JSON. See https://github.com/beckchr/staxon/wiki/Factory-Configuration | {center}false{center} | {center}No{center} |
| {{http-body-to-json-pretty-print}} | This parameter drives the conversion of XML to JSON. See https://github.com/beckchr/staxon/wiki/Factory-Configuration | {center}false{center} | {center}No{center} |
| {{http-body-to-json-ns-declarations}} | This parameter drives the conversion of XML to JSON. See https://github.com/beckchr/staxon/wiki/Factory-Configuration | {center}false{center} | {center}No{center} |
| {{http-body-to-json-auto-array}} | This parameter drives the conversion of XML to JSON. See https://github.com/beckchr/staxon/wiki/Factory-Configuration | {center}false{center} | {center}No{center} |
| {{http-body-to-json-auto-primitive}} | This parameter drives the conversion of XML to JSON. See https://github.com/beckchr/staxon/wiki/Factory-Configuration | {center}false{center} | {center}No{center} |
| {{http-body-to-json-pretty-print}} | This parameter drives the conversion of XML to JSON. See https://github.com/beckchr/staxon/wiki/Factory-Configuration | {center}false{center} | {center}No{center} |
| {{http-body-to-json-ns-declarations}} | This parameter drives the conversion of XML to JSON. See https://github.com/beckchr/staxon/wiki/Factory-Configuration | {center}false{center} | {center}No{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}}',
** 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',
{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,
*** headers can be added through sub-elements '{{header}}''. The header name is provided through attribute '{{name}}',
*** 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}},
*** 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,
*** 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}},
*** 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}},
*** 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}},
*** 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}}.
{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.
{tip}
* the sub-elements '{{on-default-out}}' defines the default HTTP response to generate on a nominal response of service provider when no condition matches it,
* the sub-elements '{{on-default-fault}}' defines the default HTTP response to generate on a fault returned by the service provider when no condition matches it,
* the sub-elements '{{on-default-error}}' defines the default HTTP response to generate on an error returned by the service provider when no condition matches it.
{tip} | {center}-{center} | {center}Yes{center}|
* 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}}',
** 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',
{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,
*** headers can be added through sub-elements '{{header}}''. The header name is provided through attribute '{{name}}',
*** 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}},
*** 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,
*** 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}},
*** 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}},
*** 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}},
*** 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}}.
{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.
{tip}
* the sub-elements '{{on-default-out}}' defines the default HTTP response to generate on a nominal response of service provider when no condition matches it,
* the sub-elements '{{on-default-fault}}' defines the default HTTP response to generate on a fault returned by the service provider when no condition matches it,
* the sub-elements '{{on-default-error}}' defines the default HTTP response to generate on an error returned by the service provider when no condition matches it.
{tip} | {center}-{center} | {center}Yes{center}|
h3. Service Unit descriptor