Petals-BC-REST 1.1.0+

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

Changes (6)

View Page History
** 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 the transformation to apply if the condition matches. Now, only XSL transformations are supported through the sub-element '{{xsl}}':,
*** if the HTTP body response is an XML or JSON payload, it is used as XML to transform, and the IN message payload can be loaded by the XSL through a variable {{<xsl:variable name="inPayload" select="document('petals-bc-rest:in-payload')"/>'}}
*** otherwise the IN message payload is used, and the content identifier of the attachment is available as parameter '{{content-id}}' from namespace 'http://petals.ow2.org/bc/rest/xsl/param/output/1.0',
*** each URI parameter is available as transformation parameter,
* 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 sub-element '{{transformation}}' defines the transformation to apply if the condition matches. Now, only XSL transformations are supported through the sub-element '{{xsl}}':,
*** if the HTTP body response is an XML or JSON payload, it is used as XML to transform, and the IN message payload can be loaded by the XSL through a variable {{<xsl:variable name="inPayload" select="document('petals-bc-rest:in-payload')"/>'}}
*** otherwise the IN message payload is used, and the content identifier of the attachment is available as parameter '{{content-id}}' from namespace 'http://petals.ow2.org/bc/rest/xsl/param/output/1.0',
*** each URI parameter is available as transformation parameter,
** if no default transformation is defined:
*** if the HTTP code returned is 20X:
**** if the exchange is an InOut exchange, the HTTP body is put as OUT message,
**** otherwise (the exchange is InOnly or RobustInOnly), the status DONE is returned,
*** otherwise, a status ERROR is returned. | {center}-{center} | {center}No{center} |

If the HTTP body response is a XML or JSON payload, it is used as XML to be transformed according to the current {{on-htt-status}} definition. Several XSL parameters are set to be used in the XSL transformation:
* each URI parameter is available without namespace,
* the HTTP response status is available as parameters '{{http-status-code}}' and '{{http-status-reason}}' from namespace '{{http://petals.ow2.org/bc/rest/xsl/param/output/1.0}}'.

If the HTTP body response is not a XML or JSON payload, the IN message payload is used to be transformed according to the current {{on-htt-status}} definition. Several XSL parameters are set to be used in the XSL transformation:
* the content identifier of the attachment is available as parameter '{{content-id}}' from namespace '{{http://petals.ow2.org/bc/rest/xsl/param/output/1.0}}',
* the HTTP response status is available as parameters '{{http-status-code}}' and '{{http-status-reason}}' from namespace '{{http://petals.ow2.org/bc/rest/xsl/param/output/1.0}}',
* each URI parameter is available without namespace | {center}-{center} | {center}No{center} |
| form-data | Define the form data to put in a part of a multi-part HTTP request:
* the attribute '{{name}}' define the name of the form data,