Difference between revisions of "Rest-call"
(13 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
==Description== | ==Description== | ||
− | + | The {{GVESB}} plugin '''rest-call''' defines the parameters for calling a Web Service using REST mode. | |
− | The {{GVESB}} plugin ''' | ||
− | |||
=={{VULCON}} / {{GVCONSOLE}} Configuration== | =={{VULCON}} / {{GVCONSOLE}} Configuration== | ||
+ | The rest-call Element is used by [[Channel]] and [[routed-call]]. Its attributes are: | ||
+ | {|class="gvtable" | ||
+ | ! Attribute !! Type !! Description | ||
+ | |- | ||
+ | | type || fixed || This attribute must assume the value '''call'''. | ||
+ | |- | ||
+ | | class || fixed || This attribute must assume the value '''it.greenvulcano.gvesb.virtual.ws.rest.RestCallOperation'''. | ||
+ | |- | ||
+ | | name || required || Operation name. Used in the [[Flow]] section to associate workflow nodes to VCL operations. | ||
+ | |} | ||
+ | and its subelements: | ||
+ | * [[Description]] | ||
+ | * [[rest-call#RestServiceInvoker|RestServiceInvoker]] | ||
+ | ===RestServiceInvoker=== | ||
− | + | This element is used by [[rest-call]]. | |
+ | |||
+ | Its attributes are: | ||
+ | {|class="gvtable" | ||
+ | ! Attribute !! Type !! Description | ||
+ | |- | ||
+ | | type || fixed || This attribute must assume the value '''invoker'''. | ||
+ | |- | ||
+ | | class || fixed || This attribute must assume the value '''it.greenvulcano.gvesb.virtual.ws.rest.RestServiceInvoker'''. | ||
+ | |- | ||
+ | | endpoint || required || Endpoint exposed by the Rest Web Service to invoke. Can contain placeholders. It must be already escaped, if needed. | ||
+ | |- | ||
+ | | method || required || HTTP method to execute to the server. | ||
+ | The attribute's admitted values are: | ||
+ | * GET | ||
+ | * POST | ||
+ | * PUT | ||
+ | * DELETE | ||
+ | * HEAD | ||
+ | * OPTIONS | ||
+ | |- | ||
+ | | timeout || optional || Timeout in seconds. | ||
+ | |- | ||
+ | | ref-dp || optional || Name of [[Data_provider|Data Provider]] to use for preparing the request. | ||
+ | |- | ||
+ | | throwsFault || optional || If ''true'' throws Exception "Error invoking operation". If ''false'' returns the Fault response. Default to false. | ||
+ | The attribute's admitted values are: | ||
+ | * true | ||
+ | * false | ||
+ | |- | ||
+ | | returnType || optional || Defines how to set the response data in the object field of output [[GVBuffer]]: | ||
+ | * context : the MessageContext | ||
+ | * envelope : the envelope as XML serialized as string | ||
+ | * body : the body as XML serialized as string | ||
+ | * body-element : the first child of body as XML serialized as string | ||
+ | * header : the header as XML serialized as string | ||
+ | * envelope-om : the envelope as OMMessage | ||
+ | * body-om : the body as OMMessage | ||
+ | * body-element-om : the first child of body as OMMessage | ||
+ | * header-om : the header as OMMessage | ||
+ | Default: context | ||
+ | |- | ||
+ | | mediaType || optional || This is used to specify the message format which the message needs to be serialized. See 'messageFormatters' configuration in axis2.xml file. Default value is: 'application/x-www-form-urlencoded' | ||
+ | |- | ||
+ | | contentType || optional || This is used to specify the message builder which the message needs to be serialized. See 'messageBuilders' configuration in axis2.xml file. Defaults to the value specified in 'mediaType' attribute. | ||
+ | |- | ||
+ | | responseMode || optional || This is used to specify if invoked service returns a response (OUT_IN) or not (OUT_ONLY). Default value is: OUT_IN | ||
+ | |} | ||
+ | |||
+ | and has the sub-elements: | ||
+ | * [[Description]] | ||
+ | * [[Proxy]] | ||
+ | * [[BasicHttpAuth]] | ||
+ | * [[NTLMHttpAuth]] |
Latest revision as of 15:11, 13 May 2014
Description
The GreenVulcano® ESB plugin rest-call defines the parameters for calling a Web Service using REST mode.
VulCon / GV Console Configuration
The rest-call Element is used by Channel and routed-call. Its attributes are:
Attribute | Type | Description |
---|---|---|
type | fixed | This attribute must assume the value call. |
class | fixed | This attribute must assume the value it.greenvulcano.gvesb.virtual.ws.rest.RestCallOperation. |
name | required | Operation name. Used in the Flow section to associate workflow nodes to VCL operations. |
and its subelements:
RestServiceInvoker
This element is used by rest-call.
Its attributes are:
Attribute | Type | Description |
---|---|---|
type | fixed | This attribute must assume the value invoker. |
class | fixed | This attribute must assume the value it.greenvulcano.gvesb.virtual.ws.rest.RestServiceInvoker. |
endpoint | required | Endpoint exposed by the Rest Web Service to invoke. Can contain placeholders. It must be already escaped, if needed. |
method | required | HTTP method to execute to the server.
The attribute's admitted values are:
|
timeout | optional | Timeout in seconds. |
ref-dp | optional | Name of Data Provider to use for preparing the request. |
throwsFault | optional | If true throws Exception "Error invoking operation". If false returns the Fault response. Default to false.
The attribute's admitted values are:
|
returnType | optional | Defines how to set the response data in the object field of output GVBuffer:
Default: context |
mediaType | optional | This is used to specify the message format which the message needs to be serialized. See 'messageFormatters' configuration in axis2.xml file. Default value is: 'application/x-www-form-urlencoded' |
contentType | optional | This is used to specify the message builder which the message needs to be serialized. See 'messageBuilders' configuration in axis2.xml file. Defaults to the value specified in 'mediaType' attribute. |
responseMode | optional | This is used to specify if invoked service returns a response (OUT_IN) or not (OUT_ONLY). Default value is: OUT_IN |
and has the sub-elements: