You can create web service interaction activities in BPEL that can handle messages based on the Representational State Transfer (REST) architecture rather than WSDL operations. This means that you do not need your own WSDL file in order to create certain types of BPEL processes. You can simply instantiate a process with a request that looks like the following example:
REST is a style of architecture for describing how resources are defined and addressed on systems such as the World Wide Web. Using REST, you can send and receive REST-based messages over HTTP without an additional messaging layer such as SOAP.
You can also access partner REST services from a BPEL process.
The idea of REST is that clients and services can communicate over HTTP to exchange representations of resources. A
resource
is any item of interest, made accessible through some URL on the network. In BPEL, a
representation
is an XML document with optional attachments of a different content type.
A BPEL process can send and receive a REST request. When a REST request is sent to the process, Process Server converts it to a standard WSDL message. When the process invokes a REST service, a standard WSDL message is converted into a REST request. The response is a document representing the requested resource. The document type returned is defined by the Content-Type header of the HTTP response.
To get started with REST, you need the following:
A BPEL project that imports
aeREST.wsdl
and
aeREST.xsd
For invokes you need:
The URL of the REST resource you will address
The HTTP method you want to invoke
The content type of the resource representation you will return
For XML content returned, an optional schema for the returned message (for example, atom schema, vender specific) to address the content within the BPEL process
The query parameters specified by the REST service you want to address