|
Page Edited :
ODExSITE :
RESTful BPEL, Part I
RESTful BPEL, Part I has been edited by Alexis Midon (Jul 16, 2008). Content:
InvokeThe RESTfulvariant of the invoke activity replaces the attributes partnerLink/operation with resource and method. The method attribute identifies the HTTP method. All HTTP methods are supported, although this spec is only concerned with GET, POST, PUT and DELETE. The resource attribute identifies a BPELvariable of a simple type (xsd:uri, xsd:string, etc) used as the URL of the actual resource. The resource element can be used instead of the resource attribute to calculate the URL using an _expression_. In addition to the above, the invoke activity adds a way to map values to/from HTTP headers, using a syntax similar to that for mapping message parts, but specifying the corresponding HTTP header instead. Headers mapped by the process override default values, and some headers have special handling. The implementation shields the invoke activity from some of the details of the HTTP protocol, specifically:
This example uses the myPost variable to create a new blog post, store the response in the newPost variable, and the location of the new post in the variable newPostUrl: invoke resource=createPostsUrl method=post input=myPost output=newPost from header=location to=newPostUrl And to update the post: invoke resource=newPostUrl method=put input=updatedPost
|
Unsubscribe or edit your notifications preferences
