Petals-BC-REST 1.x

compared with
Version 5 by Nicolas Oddoux
on Sep 22, 2010 10:58.

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

Changes (14)

View Page History
The REST request is created according the HTTP method to used:
* GET:
* ** The REST URI is created from the address extension, JBI operation and JBI payload (only the children of the XML root of the JBI payload are used, the local name is the URI parameter name and the content of the tag is the URI parameter value).
* ** There is no HTTP body
* POST:
* ** The REST URI is created from the address extension and the JBI operation.
* ** The HTTP body is created from the JBI payload (The value of the XML root of the JBI payload is used)
* PUT:
* ** The REST URI is created from the address extension and the JBI operation.
* ** The HTTP body is created from an attachment (the first attachment found in the JBI message is used if there is one)
* DELETE:
* ** The REST URI is created from the address extension and the JBI operation.
* ** There is no HTTP body
For all the HTTP methods, the headers present in the protocol header JBI message property are added to the HTTP headers.


The REST response is transformed into a JBI message like this:
* In case of error (HTTP status different from 200) a JBI fault is created.
* The HTTP body if it is present is used to create a JBI attachment (the HTTP body is not a XML in all the cases).
* The JBI payload is empty.
* The HTTP headers are added to the protocol header JBI message property

In all the cases, the MEP used to call the RESTful services is defined by the petalsCDK:mep extension.



|| Attribute || Description || Default value || Required ||
| address | Address of the external Web Service to send JBI messages to. | | {center}Yes{center} |



|| Attribute || Description || Default value || Required ||
| service-name | Web Service name to expose. | | {center}No{center} |